Discover/Nih API
live

Nih APIpubmed.ncbi.nlm.nih.gov

Search and retrieve PubMed biomedical literature: abstracts, MeSH terms, author affiliations, clinical queries, citation matching, and NCBI E-utilities access.

Endpoint health
verified 5d ago
get_article_details
get_similar_articles
search_articles
get_search_results_count
advanced_search
11/11 passing latest checkself-healing
Endpoints
11
Updated
21d ago

What is the Nih API?

This API exposes 11 endpoints for querying and retrieving data from PubMed, covering everything from keyword search to full article metadata. The get_article_details endpoint returns structured author lists with affiliations, abstract text, MeSH keywords, DOI, PMCID, and up to 10 similar article PMIDs for a single record. Other endpoints support clinical query filters, date-range filtering, publication type tagging, citation resolution, and direct NCBI E-utilities access.

Try it
Page number for pagination
Sort order for results
Number of results per page (max 100)
Search keyword or query string
api.parse.bot/scraper/7ddf510a-9bab-463f-8e03-f25423a326e3/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/7ddf510a-9bab-463f-8e03-f25423a326e3/search_articles?page=1&sort=relevance&limit=5&query=cancer' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

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-ncbi-nlm-nih-gov-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.

"""PubMed SDK walkthrough — search, drill into details, explore similar articles."""
from parse_apis.pubmed_api import PubMed, Sort, ClinicalCategory, Utility, ArticleNotFound

client = PubMed()

# Search for recent cancer articles sorted by date, capped at 5 total items.
for summary in client.articles.search(query="immunotherapy", sort=Sort.DATE, limit=5):
    print(summary.title, summary.journal, summary.date)

# Drill into the first result's full details.
article = client.articles.search(query="CRISPR", limit=1).first()
if article:
    detail = article.details()
    print(detail.title, detail.doi, detail.publication_date)
    for author in detail.authors[:3]:
        print(author.name, author.affiliations)

    # Walk the article's similar articles sub-resource.
    for sim in detail.similar.list(limit=3):
        print(sim.title, sim.journal)

# Clinical queries: narrow therapy results for a condition.
for hit in client.articles.clinical_search(query="asthma", category=ClinicalCategory.DIAGNOSIS, limit=3):
    print(hit.pmid, hit.title)

# Typed error handling on a point-lookup.
try:
    detail = client.articles.get(pmid="99999999999")
    print(detail.abstract)
except ArticleNotFound as exc:
    print(f"Article not found: PMID {exc.pmid}")

# Quick count without fetching articles.
stats = client.articles.count(query="Alzheimer")
print(stats.query, stats.total_count)

# Direct E-utilities access for advanced use cases.
raw = client.eutilsresponses.query(utility=Utility.ESEARCH, params='{"db": "pubmed", "term": "BRCA1", "retmode": "json", "retmax": "3"}')
print(raw.esearchresult)

print("exercised: articles.search / details / similar.list / clinical_search / get / count / eutilsresponses.query")
All endpoints · 11 totalmissing one? ·

Full-text search over PubMed articles by keyword. Paginates via page number. Each result includes PMID, title, authors, journal, publication date, DOI, and URL. Sort controls ordering; limit controls page size.

Input
ParamTypeDescription
pageintegerPage number for pagination
sortstringSort order for results
limitintegerNumber of results per page (max 100)
queryrequiredstringSearch keyword or query string
Response
{
  "type": "object",
  "fields": {
    "page": "integer current page number",
    "limit": "integer results per page",
    "total": "integer total number of matching results",
    "articles": "array of article summaries with pmid, title, authors, journal, date, doi, url"
  },
  "sample": {
    "data": {
      "page": 1,
      "limit": 5,
      "total": 5631045,
      "articles": [
        {
          "doi": "10.1093/qjmed/hcag147",
          "url": "https://pubmed.ncbi.nlm.nih.gov/42268677/",
          "date": "2026 Jun 10",
          "pmid": "42268677",
          "title": "Global burden of non-communicable diseases attributable to ambient fine particulate matter pollution in adults aged 65 years and older from 1990 to 2021.",
          "authors": [
            "Zheng Z",
            "Hairong Z"
          ],
          "journal": "QJM"
        }
      ]
    },
    "status": "success"
  }
}

About the Nih API

Search and Retrieval

The search_articles endpoint accepts a query string and returns paginated article summaries, each carrying pmid, title, authors, journal, date, doi, and url. Pagination is controlled by page and limit (up to 100 per page), with a total field indicating the full result count. For more precise targeting, advanced_search accepts PubMed field-tag syntax — for example, ("lung cancer"[Title]) AND Nature[Journal] or date ranges using 2020:2024[PDAT] — and returns the same article summary shape.

Filtering by Type, Journal, and Date

search_by_journal narrows results to a specific journal using the journal parameter, with an optional query to filter within it. search_by_article_type appends a [Publication Type] tag to any query, filtering for types like Clinical Trial, Review, or Meta-Analysis. search_with_date_filter accepts start_date and end_date in YYYY/MM/DD format and returns matching pmids plus a total count — useful as a first pass before fetching full details. get_search_results_count returns only a total_count for a query without pulling article records, which is useful for scoping result volume before committing to pagination.

Clinical and Citation Utilities

clinical_queries_search appends a PubMed Clinical Queries filter based on category and scope, narrowing results to clinically relevant literature. single_citation_matcher uses NCBI's ecitmatch utility to resolve a known citation — identified by journal, year, and optionally volume, issue, first_page, and author — to a specific PMID, returning full article details including abstract and similar_pmids. get_similar_articles returns up to 10 related article summaries for a given PMID using PubMed's built-in relatedness algorithm; very recently indexed articles may return fewer results.

Direct E-Utilities Access

The search_pubmed_ncbi_eutils POST endpoint passes parameters directly to any NCBI E-utility — esearch, esummary, efetch, elink, einfo, egquery, espell, or ecitmatch. The utility parameter names the target, and params is a JSON string of query parameters. The response includes either a structured esearchresult object (for esearch) or a raw content string for non-JSON responses, giving full access to the E-utilities interface without building the request layer yourself.

Reliability & maintenanceVerified

The Nih API is a managed, monitored endpoint for pubmed.ncbi.nlm.nih.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when pubmed.ncbi.nlm.nih.gov 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.ncbi.nlm.nih.gov 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.

Last verified
5d ago
Latest check
11/11 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a literature review tool that fetches abstracts and MeSH keywords via get_article_details for a list of PMIDs.
  • Filter clinical trial publications by date range using search_with_date_filter and search_by_article_type together.
  • Resolve a bibliography entry to a verified PMID using single_citation_matcher with journal, year, and first author.
  • Aggregate article counts across journals and topics using get_search_results_count without pulling full records.
  • Surface related reading recommendations by querying get_similar_articles for any article a user is viewing.
  • Scope a systematic review by journal using search_by_journal with keyword filters and pagination.
  • Execute raw E-utilities queries — including efetch for full-text XML — through search_pubmed_ncbi_eutils.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does PubMed have an official developer API?+
Yes. NCBI provides the E-utilities API at https://www.ncbi.nlm.nih.gov/books/NBK25501/, which offers programmatic access to PubMed and other NCBI databases. This Parse API wraps that interface and adds structured endpoints for common use cases like clinical queries, citation matching, and journal-scoped search.
What does `get_article_details` return beyond a basic summary?+
It returns the full abstract text, a structured authors array with each author's name, forename, lastname, initials, and affiliations, the journal_name, doi, pmcid, keywords (MeSH terms), copyright, and a similar_pmids array of up to 10 related article IDs generated by PubMed's relatedness algorithm.
Does the API return full-text article content?+
No. The API returns abstracts, metadata, and MeSH terms but not full-text body content — that depends on journal licensing and is not part of PubMed's public metadata layer. The search_pubmed_ncbi_eutils endpoint can call efetch for PubMed Central records where open-access full text is available. You can fork this API on Parse and revise it to add a dedicated endpoint that parses efetch XML responses for PubMed Central articles.
How does pagination work across the search endpoints?+
search_articles supports explicit page and limit parameters (up to 100 per page) and returns a total field for calculating page counts. advanced_search, search_by_journal, clinical_queries_search, and search_by_article_type return a single page of results controlled by a limit parameter but do not expose a page offset parameter. search_with_date_filter returns only PMIDs and a total count, not paginated article summaries.
Does the API expose author h-index, citation counts, or impact factor data?+
No. The API returns author names and affiliations from article records but does not include citation counts, h-index, or journal impact factors — those metrics are not part of PubMed's article metadata. You can fork this API on Parse and revise it to add an endpoint that fetches citation data from a source that exposes it, such as Semantic Scholar or Europe PMC.
Page content last updated . Spec covers 11 endpoints from pubmed.ncbi.nlm.nih.gov.
Related APIs in HealthcareSee all →
ncbi.nlm.nih.gov API
Search and retrieve biomedical literature from NCBI databases including PubMed, PubMed Central, and MeSH. Supports full-text extraction, metadata lookup, and research filtering.
pmc.ncbi.nlm.nih.gov API
Search millions of full-text biomedical research articles and access their metadata, citations, and related papers from PubMed Central. Find articles by topic, discover similar research, explore journal collections, and retrieve detailed citation information to support your literature review and research.
mdpi.com API
Access MDPI's open-access academic content programmatically. Search across thousands of peer-reviewed articles, retrieve full structured text, extract key findings, and browse journal metadata including impact factors and CiteScores.
clinicaltrials.gov API
Search and retrieve comprehensive information about clinical trials worldwide, including study details, eligibility criteria, locations, and outcomes data. Access structured metadata and statistics to find relevant research studies matching your specific medical conditions or research interests.
springer.com API
Search and retrieve metadata for millions of articles, books, and journals from Springer Nature's research library using DOI or ISBN lookups, with powerful filtering and pagination options. Get detailed information about academic publications including journal details, article metadata, and book information to power your research tools and discovery applications.
jstor.org API
Search and browse millions of academic articles, journals, and research issues from JSTOR's library, or retrieve specific articles and journal details to explore scholarly content by subject. Access peer-reviewed research across multiple disciplines to find the academic sources you need.
pewresearch.org API
Search and retrieve Pew Research Center publications, reports, and expert profiles across a wide range of topics, including technology, politics, science, religion, and social trends. Access detailed report content, key findings, charts, and methodology information, and filter results by topic, format, or region to stay informed on the latest research and data.
aeaweb.org API
Search for academic papers across American Economic Association journals to instantly access abstracts, author information, JEL classifications, and citation metrics. Retrieve detailed article information to stay current with the latest economic research and citations from premier sources like the American Economic Review.