Pubmed Search Articles
pubmed_search_articlesSearch PubMed using full query syntax and filters like author, journal, MeSH, date range, and species. Returns PMIDs with optional summaries and supports pagination for large result sets.
Instructions
Search PubMed with full query syntax, filters, and date ranges. Returns PMIDs and optional brief summaries. Supports field-specific filters (author, journal, MeSH terms), common filters (language, species, free full text), and pagination via offset for paging through large result sets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order: relevance (default), pub_date (newest first), author, or journal | relevance |
| query | Yes | PubMed search query (supports full NCBI syntax). Must carry a search term: a value that is blank once markup, bracketed field tags (`[pdat]`), parentheses, and invisible characters such as a zero-width space are disregarded is rejected rather than sent to PubMed. | |
| author | No | Filter by author name (e.g. "Smith J"). An empty string applies no filter; a value of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| offset | No | Result offset for pagination (0-based). PubMed serves at most the first 9999 records of a result set, so this caps at 9998; narrow the query or add filters to reach anything beyond it. | |
| journal | No | Filter by journal name. An empty string applies no filter; a value of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| species | No | Filter by species | |
| language | No | Filter by language (e.g. "english"). An empty string applies no filter; a value of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| dateRange | No | Filter by date range. The filter is applied only when both `minDate` and `maxDate` are non-empty; either one empty disables the entire date range. A partial date covers its whole year or month, and a range whose `minDate` falls after its `maxDate` is rejected: `2024/06` to `2024` is valid, `2024/07` to `2024/06/30` is not. | |
| meshTerms | No | Filter by MeSH terms. Multiple terms are AND'd — all must match. Empty strings are skipped; an element of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| maxResults | No | Maximum results to return | |
| hasAbstract | No | Only include articles with abstracts | |
| freeFullText | No | Only include free full text articles | |
| summaryCount | No | Fetch brief summaries for top N results (0 = PMIDs only). Above the 50 cap, pass the remaining PMIDs to pubmed_fetch_articles. | |
| publicationTypes | No | Filter by publication type (e.g. "Review", "Clinical Trial", "Meta-Analysis"). Multiple values are OR'd — any match qualifies. Empty strings are skipped; an element of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| pmids | No | PubMed IDs | |
| query | No | Original query | |
| notice | No | Optional guidance when the result set does not reflect what was asked for — a field tag PubMed ignored, a phrase it matched nothing for, a dateRange dropped for having one bound, no matches at all, or paging past the end. Absent when nothing applies. | |
| offset | No | Result offset used | |
| searchUrl | No | PubMed search URL | |
| summaries | No | Brief summaries (empty array when summaryCount is 0) | |
| totalCount | No | Total matching articles | |
| appliedFilters | No | Normalized filter values that were applied to the PubMed query | |
| effectiveQuery | No | Sanitized query sent to PubMed after applying all active filters |