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:

ParameterRequiredDescription
inputYesAn arXiv link or ID; both new-style (e.g. 2401.12345) and old-style (e.g. cs/0606050) are accepted. Unrecognized input returns 400
pdfNoPass 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.pdf

Response (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": "…"
  }
}
FieldDescription
arxivIdNormalized arXiv ID
absUrlarXiv abstract page URL
pdfUrlarXiv PDF URL
titlePaper title
authorsAuthor list
abstractAbstract
publishedAtPublication time; may be null
licenseUrlLicense URL recorded by arXiv; may be null
paperLicensePaper license enum mapped from licenseUrl
suggestedSlugSuggested 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/pdf
  • cache-control: private, max-age=300

Errors

Errors always take the form {"error": "message"}:

CodeDescription
400Unrecognized arXiv link or ID
401Not signed in or invalid credentials
404Paper not found on arXiv
429Rate limit exceeded
502The 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.