NCBI API
Read-only live access to NCBI PubMed search and bibliographic records, PubMed Central full-text articles, and MeSH vocabulary search and descriptor details. Search routes preserve NCBI pagination and the PubMed date, article-type, and text-availability filters.
Endpoint health
Loading verification…
Connect your agent
Connect through MCP so your agent can find this API, read its docs, and call its endpoints.
Add the server from your terminal.
claude mcp add --transport http agent-data https://agent-data.motie.dev/mcpIn Claude Code, run /mcp, select agent-data, then Authenticate. Sign in to your agent-data account in the browser.
Then ask your agent to use the NCBI API for your task.
Call it over HTTP
Get an API keySign up free, generate an API key, and set it as AGENT_DATA_API_KEY in your environment. Your first 100 calls each month are free.
curl --request GET --get 'https://api.agent-data.dev/ncbi-nlm-nih-gov/v1/pubmed/search' \
--header "Authorization: Bearer $AGENT_DATA_API_KEY" \
--data-urlencode 'query=machine learning[Title]'Endpoints
Inputs and response fields for every endpoint in this API.
GETPubmed search/v1/pubmed/search
Pubmed Search
Input
queryRequiredQuery · stringSearch query string accepted by PubMed E-utilities.
Example: machine learning[Title]
sortOptionalQuery · string | nullOptional NCBI sort order verified against E-utilities: relevance, pub_date, Author, or JournalName.
Example: relevance
retmaxOptionalQuery · integer, min: 1, max: 100, default: 20Number of results to return, from 1 through 100.
Example: 2
retstartOptionalQuery · integer, min: 0, default: 0Zero-based result offset for pagination.
Example: 0
min_dateOptionalQuery · string | nullOptional inclusive publication date lower bound, YYYY/MM/DD or YYYY.
Example: 2020/01/01
max_dateOptionalQuery · string | nullOptional inclusive publication date upper bound, YYYY/MM/DD or YYYY.
Example: 2024/12/31
article_typeOptionalQuery · string | nullOptional PubMed publication type, such as Review.
Example: Review
text_availabilityOptionalQuery · string | nullOptional PubMed availability filter, such as free full text.
Example: free full text
Response
itemsobject[]items[].doi?string | nullitems[].pmidstringitems[].pmcid?string | nullitems[].titlestringitems[].journalstringitems[].publication_date?string | nulltotalintegerretmaxintegerretstartintegerFields marked ? are optional.
GETPubmed articles by pmid/v1/pubmed/articles/{pmid}
Pubmed Article
Input
pmidRequiredPath · stringNumeric PubMed ID (PMID).
Example: 30943338
Response
doi?string | nullpmidstringpmcid?string | nulltitlestringauthorsstring[]journalstringabstract?string | nullkeywordsstring[]mesh_termsobject[]mesh_terms[].ui?string | nullmesh_terms[].termstringFields marked ? are optional.
GETPmc articles by pmcid/v1/pmc/articles/{pmcid}
Pmc Article
Input
pmcidRequiredPath · stringPubMed Central identifier with the PMC prefix.
Example: PMC13590562
Response
pmcidstringtitlestringauthorsstring[]abstract?string | nullfindings?string | nulloutcomes?string | nullsectionsobject[]sections[].textstringsections[].headingstringfull_textstringpopulation?string | nullsource_urlstringstudy_type?string | nulllimitations?string | nullkey_insights?string | nullinterventions?string | nullFields marked ? are optional.
GETMesh search/v1/mesh/search
Mesh Search
Input
queryRequiredQuery · stringSearch term to find in the NCBI MeSH vocabulary.
Example: diabetes
retmaxOptionalQuery · integer, min: 1, max: 100, default: 20Number of MeSH matches to return, from 1 through 100.
Example: 3
retstartOptionalQuery · integer, min: 0, default: 0Zero-based result offset for pagination.
Example: 0
Response
itemsobject[]items[].idstringitems[].termstringitems[].mesh_uistringtotalintegerretmaxintegerretstartintegerGETMesh terms by term id/v1/mesh/terms/{term_id}
Mesh Term
Input
term_idRequiredPath · stringNumeric MeSH descriptor identifier returned by MeSH search.
Example: 68056731
Response
idstringtermstringmesh_uistringsynonymsstring[]definitionstringtree_numbersstring[]Don’t see the endpoint you need?
Ask agent-data to add an endpoint or return more fields. Extensions are free and keep existing endpoints working.
An account is required to submit an extension. Prepare your request, then sign in to build.