API Reference
arXiv lookup
GET /api/arxiv looks up arXiv paper metadata, or proxies the paper PDF.
GET /api/arxiv looks up paper metadata by arXiv link or ID, and can also stream-proxy the paper PDF. Typical usage: use it to fetch metadata and a suggestedSlug first, then call POST /api/repositories to complete indexing.
Authentication
Requires read permission: a browser session or an API Key (x-api-key).
Request
Query parameters:
| Parameter | Required | Description |
|---|---|---|
| input | Yes | An arXiv link or ID; both new-style (e.g. 2401.12345) and old-style (e.g. cs/0606050) are accepted. Unrecognized input returns 400 |
| No | Pass pdf=1 to receive the PDF byte stream instead of metadata |
Examples
curl "https://citeark.com/api/arxiv?input=https://arxiv.org/abs/2401.12345" \
-H "x-api-key: $CITEARK_API_KEY"curl "https://citeark.com/api/arxiv?input=2401.12345&pdf=1" \
-H "x-api-key: $CITEARK_API_KEY" \
-o paper.pdfResponse (metadata mode)
On success returns 200:
{
"metadata": {
"arxivId": "2401.12345",
"absUrl": "https://arxiv.org/abs/2401.12345",
"pdfUrl": "https://arxiv.org/pdf/2401.12345",
"title": "…",
"authors": ["…"],
"abstract": "…",
"publishedAt": "2024-01-01T00:00:00Z",
"licenseUrl": "http://creativecommons.org/licenses/by/4.0/",
"paperLicense": "CC-BY-4.0",
"suggestedSlug": "…"
}
}| Field | Description |
|---|---|
| arxivId | Normalized arXiv ID |
| absUrl | arXiv abstract page URL |
| pdfUrl | arXiv PDF URL |
| title | Paper title |
| authors | Author list |
| abstract | Abstract |
| publishedAt | Publication time; may be null |
| licenseUrl | License URL recorded by arXiv; may be null |
| paperLicense | Paper license enum mapped from licenseUrl |
| suggestedSlug | Suggested repository slug generated from the title; can be used directly in POST /api/repositories |
Response (pdf=1 mode)
Stream-proxies the PDF bytes, with headers:
content-type: application/pdfcache-control: private, max-age=300
Errors
Errors always take the form {"error": "message"}:
| Code | Description |
|---|---|
| 400 | Unrecognized arXiv link or ID |
| 401 | Not signed in or invalid credentials |
| 404 | Paper not found on arXiv |
| 429 | Rate limit exceeded |
| 502 | The arXiv API is temporarily unavailable; please retry later |
Rate limit
Metadata lookups: 30 per hour per account; PDF proxy: 10 per hour per account. Exceeding the limit returns 429 with a Retry-After header.