TEI XML files are machine-readable structured text parsed by Grobid.
Download options
Option 1: API (up to ~10K files)
Download files one at a time from the content API. Each download costs $0.01.has_content filter to find works with available content:
content_url field on any work object to see if content is available.
With a free API key ($1/day), you can download about 100 files per day. Good for research projects, building small corpora, or sampling.
Option 2: OpenAlex CLI (up to a few million files)
For larger downloads, use the OpenAlex CLI. It handles parallel downloads, retries, checkpointing, and resume automatically.Option 3: Complete archive sync
For the complete archive (all 60M files), we provide direct access to the storage bucket via time-limited credentials. Files are stored on Cloudflare R2, which is fully S3-compatible. One-time download: 30-day R2 read access to sync the complete archive. Ongoing sync: Persistent R2 read access is included with the enterprise subscription. See the pricing page for details, or contact us to get started. How it works:1
Get credentials
We generate R2 API credentials with read-only access.
2
Sync with AWS CLI
3
Stay current
For ongoing sync, run periodically to get new files.
%PDF magic bytes and skip implausibly small objects) so your pipeline is robust to any in-flight changes.
Mapping work IDs to files
Files in the archive bucket are named by UUID, not work ID. A work’s PDF and its TEI XML are stored as separate objects with different UUIDs — the file names alone won’t tell you which PDF and which XML belong to the same work:The manifest (for archive sync)
If you’ve synced the bucket, use the manifest we publish in theopenalex-pdfs bucket itself:
aws s3 sync of the bucket pulls the manifest down alongside the content (into a local _manifest/content_index/ folder), so you typically already have it.
UUIDs are stored without their file extension — append
.pdf and .xml.gz to build the object keys. A work may have a PDF but no XML (GROBID can’t parse every PDF), so grobid_xml_id is sometimes empty.
Query it directly with any Parquet reader — no need to load it into a database:
- Join
openalex_idto your works snapshot to attach metadata. - Join
pdf_uuid/grobid_xml_idto your synced files to attach the PDF and TEI XML.
_manifest/ prefix whenever you re-sync the archive.
The content endpoint (for per-work fetches)
If you’re fetching files one at a time through the content API rather than syncing the bucket, you don’t deal with UUIDs at all — the endpoint resolves the work ID to the underlying object server-side:has_content and content_urls:
has_content.pdf:true (available in the snapshot and the API; content_urls is API-only), then fetch each work by ID. This is convenient for small-to-medium sets, but at archive scale prefer the manifest above — the join is offline and costs nothing.
TEI XML quality and limitations
GROBID (project, docs) is the state of the art for converting scholarly PDFs to structured TEI XML. But PDF parsing is genuinely hard, and a meaningful share of files will contain errors — missing or duplicated references, occasional self-references (the paper’s own DOI picked up from its header or footer), wrong or partial header metadata, and the odd truncated section. You can see how GROBID performs field-by-field in the project’s own benchmarks. GROBID also can’t parse every PDF. It doesn’t do OCR, so scanned or image-only PDFs produce little or nothing useful, and unusual or malformed PDFs can fail outright. Filter onhas_content.grobid_xml:true to limit your set to works where we have a parse.
We pass GROBID’s output through unchanged, including any errors it made. You can catch some with simple guard clauses — for example, drop any reference whose DOI matches the work’s own DOI, and cross-check GROBID’s header metadata against the OpenAlex Work record (which draws on Crossref and other sources independently of GROBID).
A lot of people today actually want Markdown rather than XML for LLM and RAG pipelines. We don’t have Markdown parses yet, though they’re on the roadmap. In the meantime you can roll your own by downloading the PDFs we provide and running them through one of the newer PDF→Markdown tools like Marker, Docling, or MinerU.
Licensing
The PDFs retain their original copyright. OpenAlex does not grant any additional rights to the content. To check the license for a specific work, use thebest_oa_location.license field in the API: