arXiv paper to text API

From $0.005 per successful call · failed calls are never charged · no account needed · Markdown version: /guides/arxiv-paper-to-text-api.md

Give an arXiv link, abstract page or PDF, and get the paper's text page by page; find the paper first by topic or ID with the arXiv search tool.

When an agent wants this

PDF to text, PDF text extraction: extract the text of a PDF document from a URL, page by page $0.005

Extract the text of a public PDF (up to 10 MB) from its URL, page by page, with title, author and page count. Choose the first page, how many pages (up to 200) and maxChars. arXiv abstract links work. If a site blocks our fetch, the Internet Archive's dated copy is read and the answer says so. Scanned, encrypted and non-PDF files fail uncharged. Use to read papers, invoices, reports and manuals into an agent.

Inputs: url (required): Absolute public http(s) URL of the PDF; firstPage: First page to read (default 1); pages: How many pages to read (1-200, default 20); maxChars: Maximum characters of text returned across all pages (1000-200000, default 50000).

Not in the free calls over HTTP; pay from the first call.

With prepaid credits this tool costs $0.002 a call: $1 by card pays for 500 calls, with no account and no subscription.

With a card key from /credits, in a header or, when your client can only fetch a URL, in the URL:

curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/pdf/text?url=https%3A%2F%2Fbitcoin.org%2Fbitcoin.pdf"
curl "https://agent-data-tools.revmesh2074.workers.dev/pdf/text?url=https%3A%2F%2Fbitcoin.org%2Fbitcoin.pdf&api_key=adt_…"

Without a key the same URL answers 402 Payment Required with x402 and MPP terms, so a wallet client pays USDC per call and retries. Over MCP (https://agent-data-tools.revmesh2074.workers.dev/mcp) this tool is pdf_text.

Example result
{
  "url": "https://bitcoin.org/bitcoin.pdf",
  "title": null,
  "author": null,
  "totalPages": 9,
  "firstPage": 1,
  "pagesRead": 1,
  "chars": 46,
  "truncated": true,
  "pages": [
    {
      "page": 1,
      "chars": 46,
      "text": "Bitcoin: A Peer-to-Peer Electronic Cash System"
    }
  ]
}

Tool page, inputs and limits

arXiv search: preprints by topic, or one paper by ID $0.01

Search arXiv, the open preprint server for physics, mathematics, computer science and AI: give search words (every word must match, quotes for a phrase) and optionally a category such as cs.AI, and get 1-20 papers by relevance or newest first, each with title, abstract, authors, dates, categories, DOI and PDF link. An arXiv ID or link returns that paper. Use to find research on a topic, cite a paper or read its abstract before the PDF.

Inputs: q (required): Search words, or an arXiv ID or link (1706.03762, arxiv.org/abs/2401.01234); count: Papers to return (1-20, default 5); sort: relevance (default), newest (submission date) or updated; category: Optional arXiv category to search in, e.g. cs.AI, cs.CL, stat.ML, hep-th.

Free first (3 successful calls per caller, no key):

curl "https://agent-data-tools.revmesh2074.workers.dev/arxiv/search?q=retrieval%20augmented%20generation&trial=1"

With a card key from /credits, in a header or, when your client can only fetch a URL, in the URL:

curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/arxiv/search?q=retrieval%20augmented%20generation"
curl "https://agent-data-tools.revmesh2074.workers.dev/arxiv/search?q=retrieval%20augmented%20generation&api_key=adt_…"

Without a key the same URL answers 402 Payment Required with x402 and MPP terms, so a wallet client pays USDC per call and retries. Over MCP (https://agent-data-tools.revmesh2074.workers.dev/mcp) this tool is arxiv_search.

Example result
{
  "query": "retrieval augmented generation",
  "total": 4912,
  "count": 1,
  "papers": [
    {
      "id": "2005.11401",
      "version": 4,
      "title": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks",
      "summary": "Large pre-trained language models have been shown to store factual knowledge in their parameters, and achieve state-of-the-art results when fine-tuned on downstream NLP tasks. …",
      "authors": [
        "Patrick Lewis",
        "Ethan Perez",
        "Aleksandra Piktus"
      ],
      "authorsTotal": 12,
      "published": "2020-05-22",
      "updated": "2021-04-12",
      "primaryCategory": "cs.CL",
      "categories": [
        "cs.CL",
        "cs.LG"
      ],
      "comment": "Accepted at NeurIPS 2020",
      "journalRef": null,
      "doi": null,
      "url": "https://arxiv.org/abs/2005.11401",
      "pdf": "https://arxiv.org/pdf/2005.11401"
    }
  ],
  "source": "arXiv API (metadata CC0)",
  "attribution": "Thank you to arXiv for use of its open access interoperability.",
  "checkedAt": "2026-11-10T22:00:00.000Z"
}

Tool page, inputs and limits

Questions

Do abstract links work?

Yes. An arxiv.org/abs/ link is read as the paper's PDF.

Does it work for scanned old papers?

Only when the PDF has a text layer; scanned images without one return little or nothing.

Does it OCR scanned PDFs?

No, it extracts the text layer. Scanned images without text return little or nothing.

How do I pay?

Each successful call costs the tool's price; failed calls are not charged. Then pay with card credits from $1 (the key goes in an Authorization header or as api_key= in the URL) or per call in USDC over x402 or MPP. No account is needed.