curl --request POST \
--url https://alpha.api.trycaesar.com/v1/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"canonical_url": "<string>",
"content": {
"format": "markdown",
"include_offsets": true,
"max_chars": 2,
"passage_ids": [
"<string>"
],
"range": {
"capture_id": "<string>",
"max_chars": 2,
"start_char": 1
},
"selection": "full_document"
},
"debug": {},
"doc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include": [],
"query": "<string>"
}
'import requests
url = "https://alpha.api.trycaesar.com/v1/document"
payload = {
"canonical_url": "<string>",
"content": {
"format": "markdown",
"include_offsets": True,
"max_chars": 2,
"passage_ids": ["<string>"],
"range": {
"capture_id": "<string>",
"max_chars": 2,
"start_char": 1
},
"selection": "full_document"
},
"debug": {},
"doc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include": [],
"query": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
canonical_url: '<string>',
content: {
format: 'markdown',
include_offsets: true,
max_chars: 2,
passage_ids: ['<string>'],
range: {capture_id: '<string>', max_chars: 2, start_char: 1},
selection: 'full_document'
},
debug: {},
doc_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
include: [],
query: '<string>'
})
};
fetch('https://alpha.api.trycaesar.com/v1/document', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access": {
"rate_limit": {
"limit_rps": 123,
"remaining": 123,
"reset_at": "<string>"
}
},
"doc": {
"canonical_url": "<string>",
"doc_id": "<string>",
"first_seen_at": "<string>",
"last_seen_at": "<string>",
"source_url": "<string>",
"content_digest": "<string>",
"headings": [
"<string>"
],
"latest_capture_id": "<string>",
"meta_description": "<string>",
"published_at": "<string>",
"title": "<string>"
},
"request_id": "<string>",
"session_id": "<string>",
"$schema": "<string>",
"capture_history": [
{
"capture_id": "<string>",
"capture_time": "<string>",
"content_digest": "<string>",
"content_format": "<string>"
}
],
"content": {
"char_count": 123,
"format": "<string>",
"selection": "<string>",
"text": "<string>",
"truncated": true,
"start_char": 123
},
"passages": [
{
"doc_id": "<string>",
"ordinal": 123,
"passage_id": "<string>",
"text": "<string>",
"char_end": 123,
"char_start": 123,
"section_heading": "<string>",
"section_path": [
"<string>"
]
}
],
"provenance": {
"capture_id": "<string>",
"capture_time": "<string>"
},
"usage": {
"bytes_returned": 123,
"requests": 123
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"details": {}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}Get a document
Inspect one canonical document and retrieve selected content.
curl --request POST \
--url https://alpha.api.trycaesar.com/v1/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"canonical_url": "<string>",
"content": {
"format": "markdown",
"include_offsets": true,
"max_chars": 2,
"passage_ids": [
"<string>"
],
"range": {
"capture_id": "<string>",
"max_chars": 2,
"start_char": 1
},
"selection": "full_document"
},
"debug": {},
"doc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include": [],
"query": "<string>"
}
'import requests
url = "https://alpha.api.trycaesar.com/v1/document"
payload = {
"canonical_url": "<string>",
"content": {
"format": "markdown",
"include_offsets": True,
"max_chars": 2,
"passage_ids": ["<string>"],
"range": {
"capture_id": "<string>",
"max_chars": 2,
"start_char": 1
},
"selection": "full_document"
},
"debug": {},
"doc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"include": [],
"query": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
canonical_url: '<string>',
content: {
format: 'markdown',
include_offsets: true,
max_chars: 2,
passage_ids: ['<string>'],
range: {capture_id: '<string>', max_chars: 2, start_char: 1},
selection: 'full_document'
},
debug: {},
doc_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
include: [],
query: '<string>'
})
};
fetch('https://alpha.api.trycaesar.com/v1/document', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"access": {
"rate_limit": {
"limit_rps": 123,
"remaining": 123,
"reset_at": "<string>"
}
},
"doc": {
"canonical_url": "<string>",
"doc_id": "<string>",
"first_seen_at": "<string>",
"last_seen_at": "<string>",
"source_url": "<string>",
"content_digest": "<string>",
"headings": [
"<string>"
],
"latest_capture_id": "<string>",
"meta_description": "<string>",
"published_at": "<string>",
"title": "<string>"
},
"request_id": "<string>",
"session_id": "<string>",
"$schema": "<string>",
"capture_history": [
{
"capture_id": "<string>",
"capture_time": "<string>",
"content_digest": "<string>",
"content_format": "<string>"
}
],
"content": {
"char_count": 123,
"format": "<string>",
"selection": "<string>",
"text": "<string>",
"truncated": true,
"start_char": 123
},
"passages": [
{
"doc_id": "<string>",
"ordinal": 123,
"passage_id": "<string>",
"text": "<string>",
"char_end": 123,
"char_start": 123,
"section_heading": "<string>",
"section_path": [
"<string>"
]
}
],
"provenance": {
"capture_id": "<string>",
"capture_time": "<string>"
},
"usage": {
"bytes_returned": 123,
"requests": 123
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"details": {}
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"request_id": "<string>",
"type": "error",
"$schema": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional client session identifier.
Body
Canonical URL from a result's canonical_url; lookup alternative to doc_id. Either doc_id or canonical_url is required.
Controls for returned document content: selection strategy, format, size cap, and continuation range.
Show child attributes
Show child attributes
Reserved for internal evaluation harnesses; ignored for public callers.
Show child attributes
Show child attributes
Canonical document identifier (UUID) from a search result's doc_id; stable across searches and recrawls. Either doc_id or canonical_url is required.
"0c944fa8-4c8f-4f48-9b08-0fb2fd3438ec"
Sections to return. Omit it for everything available; otherwise an allowlist of passages, capture_history, and content (document metadata is always returned - send just metadata for a metadata-only read).
metadata, passages, capture_history, content Query context for passage selection when content.selection is query_relevant.
Response
Document payload.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A URL to the JSON Schema for this object.
"https://alpha.api.trycaesar.com/DocumentResponse.json"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes