PubMed APIPubmed.com ↗
Search and retrieve biomedical research metadata from PubMed via 3 endpoints. Get abstracts, MeSH terms, authors, affiliations, DOIs, and related articles.
What is the PubMed API?
The PubMed API gives programmatic access to NCBI's biomedical literature index through 3 endpoints covering search, full article metadata retrieval, and related-article discovery. The search_articles endpoint supports PubMed's full query syntax including boolean operators and field tags, returning paginated results with PMIDs, titles, authors, journals, DOIs, and publication types. get_article exposes structured abstracts, author affiliations, MeSH terms, and keywords for any single article by PMID.
curl -X GET 'https://api.parse.bot/scraper/07de3ca0-5779-4a0c-a45b-316eb5ebe6c5/search_articles?page=1&sort=relevance&query=CRISPR+gene+editing&max_date=2026&min_date=2020&per_page=5' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace pubmed-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: PubMed SDK — search papers, get details, find related work."""
from parse_apis.pubmed_com_api import PubMed, Sort, ArticleNotFound
client = PubMed()
# Search for articles on a topic, sorted by relevance
for article in client.article_summaries.search(query="CRISPR gene editing", sort=Sort.RELEVANCE, limit=3):
print(article.title, article.journal, article.pub_date)
# Drill into the first result for full details (abstract, affiliations, MeSH)
summary = client.article_summaries.search(query="deep learning radiology", limit=1).first()
if summary:
detail = summary.details()
print(detail.title, detail.doi)
for author in detail.authors[:2]:
print(author.name, author.affiliation)
# Get a specific article by PMID
try:
paper = client.articles.get(pmid="31295471")
print(paper.title, paper.journal)
print(paper.keywords)
except ArticleNotFound as exc:
print(f"Article not found: {exc.pmid}")
# Find related articles from an instance
if paper:
for related in paper.related(limit=3):
print(related.title, related.journal)
print("exercised: article_summaries.search / summary.details / articles.get / article.related")
Full-text search across PubMed's biomedical literature index. Returns paginated article summaries matching the query term, with optional date range and sort order filtering. Results are auto-iterated; each article summary includes PMID, title, authors, journal, publication date, DOI, and publication types.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination (1-based). |
| sort | string | Sort order for results. |
| queryrequired | string | Search query using PubMed query syntax. Supports boolean operators (AND, OR, NOT), field tags ([ti] for title, [au] for author, [mh] for MeSH), and phrase matching with quotes. |
| max_date | string | Maximum publication date filter in YYYY/MM/DD or YYYY format. |
| min_date | string | Minimum publication date filter in YYYY/MM/DD or YYYY format. |
| per_page | integer | Number of results per page (1-100). |
{
"type": "object",
"fields": {
"page": "integer",
"query": "string",
"articles": "array of article summaries with pmid, title, authors, journal, pub_date, doi, pub_types",
"per_page": "integer",
"total_pages": "integer",
"total_results": "integer"
},
"sample": {
"data": {
"page": 1,
"query": "CRISPR gene editing",
"articles": [
{
"doi": "10.1016/j.lfs.2019.116636",
"pmid": "31295471",
"title": "CRISPR-Cas9 system: A new-fangled dawn in gene editing.",
"authors": [
"Gupta D",
"Bhattacharjee O"
],
"journal": "Life sciences",
"pub_date": "2019 Sep 1",
"pub_types": [
"Journal Article",
"Review"
]
}
],
"per_page": 3,
"total_pages": 8253,
"total_results": 24757
},
"status": "success"
}
}About the PubMed API
Search and Filter PubMed Literature
The search_articles endpoint accepts PubMed query syntax — including boolean operators (AND, OR, NOT) and field tags such as [ti] for title searches — and returns paginated article summaries. You can narrow results using min_date and max_date parameters (formatted YYYY/MM/DD or YYYY), control page size with per_page (1–100 results), and choose sort order. Each result in the articles array includes the article's pmid, title, authors, journal, pub_date, doi, and pub_types. Pagination metadata (total_results, total_pages, page) is returned alongside results.
Full Article Metadata
The get_article endpoint retrieves detailed metadata for a single article by its numeric PMID. The response includes a structured abstract (with labeled sections where applicable), an authors array where each entry carries both name and affiliation, a keywords array, MeSH-derived terminology, issn, journal, doi, pub_date, and pub_types. This level of detail is suited for tasks like building citation databases, extracting institutional affiliation data, or training NLP models on structured scientific text.
Related Article Discovery
The get_related_articles endpoint uses NCBI's computed similarity scores to surface topically related papers for a given pmid. The related_articles array returns summaries — pmid, title, authors, journal, pub_date, doi — and the response includes a count field and the source_pmid for reference. The limit parameter accepts 1–100. Note that very recently published articles may not yet have precomputed similarity relationships in NCBI's system, so this endpoint may return no results for articles indexed in the last few days.
The PubMed API is a managed, monitored endpoint for Pubmed.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when Pubmed.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official Pubmed.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a literature review tool that queries PubMed by keyword and date range, grouping results by journal or publication type.
- Populate a citation database with structured author affiliations and DOIs retrieved via get_article.
- Train biomedical NLP models using labeled abstract sections and MeSH terms from bulk PMID lookups.
- Recommend related reading in a research platform using get_related_articles similarity scores.
- Track publication trends in a disease area by filtering search_articles with min_date/max_date and aggregating pub_types.
- Extract institutional co-authorship networks from the authors array, which includes per-author affiliations.
- Monitor new publications for a specific topic by running recurring queries with a rolling date window.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.