---
name: world-bank-documents-api-ingestion
description: "How to get World Bank Documents & Reports API data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load World Bank Documents & Reports search results into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/world-bank-documents-api
Provider: https://documents.worldbank.org/en/publication/documents-reports/api
Checked against the provider's documentation: 2026-11-03

## Access
- No key or account.
- Endpoint https://search.worldbank.org/api/v3/wds with format (json or xml), qterm, field filters, fl (fields), rows, os (offset), strdate and enddate.

## Request
```bash
curl 'https://search.worldbank.org/api/v3/wds?format=json&qterm=debt%20sustainability&rows=100&os=0&fl=docdt,docty,count,repnme,display_title,pdfurl,url,lang&strdate=2025-01-01'
```

## Format
JSON with total, rows, os and documents, an object keyed by document id (plus a facets key) whose values carry id, display_title, docdt, docty, count (country), lang, pdfurl, url and the fields requested with fl.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""World Bank Documents & Reports search -> pandas -> Parquet. No key."""
import requests
import pandas as pd

params = {"format": "json", "qterm": "debt sustainability", "rows": 100, "os": 0,
          "fl": "docdt,docty,count,repnme,display_title,pdfurl,url,lang", "strdate": "2025-01-01"}
r = requests.get("https://search.worldbank.org/api/v3/wds", params=params, timeout=90)
r.raise_for_status()
js = r.json()
docs = [d for k, d in js["documents"].items() if k != "facets"]
df = pd.DataFrame([{
    "id": d.get("id"),
    "title": d.get("display_title"),
    "doc_date": d.get("docdt"),
    "doc_type": d.get("docty"),
    "country": d.get("count"),
    "language": d.get("lang"),
    "pdf_url": d.get("pdfurl"),
    "page_url": d.get("url"),
} for d in docs])
df.to_parquet("worldbank_documents.parquet", index=False)
print(len(df), "documents on this page of", js["total"], "matches; newest:", df["doc_date"].max())
```
Run by us on 2026-11-03 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 100 documents on this page of 385 matches; newest: 2025-12-31T05:00:00Z

## Limits
- 10 rows per page by default; page with rows and os.
- A numeric rate limit is not stated; the terms bar excessive or abusive usage.

## Quirks
- documents is an object keyed by id, not a list, and includes a facets key to skip.
- Results are sorted by relevance when qterm is used, otherwise by document date descending.

## Terms and attribution
- For Materials without specific terms, the APIs may be used only for certain non-commercial uses; commercial use and derivative works need prior written consent.
- Any specific terms appear on the pages through which the Materials are accessible; attribution to The World Bank Group is required.
- Terms page: https://www.worldbank.org/ext/en/legal/terms-conditions

## Sources
- https://documents.worldbank.org/en/publication/documents-reports/api: "The World Bank offers an API that allows for the search and retrieval of the public, Bank documents available in the Documents & Reports site."
- https://documents.worldbank.org/en/publication/documents-reports/api: "The default value for rows is 10 and the default value for os is 0."
- https://www.worldbank.org/ext/en/legal/terms-conditions: "However, you may not in any event use the APIs to facilitate commercial uses of the Materials, including without limitation reselling them, charging to access them, charging to redistribute them, or charging to create derivative works based on them."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
