# Article Search for PubMed: Abstracts & MeSH Terms (`forgeloop/pubmed-articles`) Actor

Search PubMed by query, author, journal and date, or look up PMIDs. Get title, abstract, authors, affiliations, journal, MeSH terms, keywords, DOI and PMC id through the official NCBI E-utilities. Optional NCBI API key. Monitor mode for new articles. Pay per paper.

- **URL**: https://apify.com/forgeloop/pubmed-articles.md
- **Developed by:** [Markus Heiß](https://apify.com/forgeloop) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 papers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Article Search for PubMed: Abstracts & MeSH Terms

Search PubMed by query, author, journal and date, or look up a list of PMIDs. Get one row per article with title, abstract, authors, affiliations, journal, publication date, MeSH terms, keywords, DOI and PMC id.

Built for literature monitoring, research dashboards, RAG pipelines and AI agents, bibliometrics and competitive R\&D tracking in medicine and the life sciences. The Actor uses the official NCBI E-utilities and follows their rate rules. No website is scraped.

Not affiliated with NCBI, NLM or the NIH.

### What it does

- **Searches all of PubMed** with the same syntax as the PubMed website: field tags like `[ti]`, `[au]`, `[mh]`, `[ta]`, `[dp]`, `AND`, `OR`, `NOT` and quoted phrases.
- **Separate fields** for author and journal, combined with AND.
- **Date range** on the publication date, the date the record was added to PubMed (Entrez date) or the last modification.
- **Sorts** by best match, publication date or most recently added.
- **Looks up PMIDs** as numbers, `PMID: 31452104` or pubmed.ncbi.nlm.nih.gov URLs.
- **Full records:** structured abstracts with their section labels, all authors, affiliations, MeSH headings with qualifiers and major topics, author keywords, publication types, grants, DOI and PMC id.
- **Up to 10,000 articles per run,** fetched 200 per request.
- **Optional NCBI API key** for 10 instead of 3 requests per second.
- **Monitor mode:** returns only articles that earlier runs with the same search have not returned. Run it on a schedule to get new papers in your field.
- **Common output shape** shared with our arXiv and Crossref Actors, so you can merge the datasets.

### Use cases

- **Literature monitoring:** get new articles on a drug, a disease or a method every week, or every new paper of a research group.
- **Research dashboards:** count articles per MeSH term, journal or year.
- **RAG and AI agents:** feed titles, abstracts and MeSH terms into a vector store, or let an agent search PubMed as a tool.
- **Bibliometrics:** build author, journal and MeSH networks, follow how a topic grows.
- **Competitive R\&D tracking:** follow what companies, hospitals and universities publish on a target or a technology.

### Input

| Field | Description | Default |
|---|---|---|
| Search query | Words or PubMed syntax, for example `"long covid"[ti] AND fatigue` | |
| Author | Author, for example `Doudna JA` | |
| Journal | Journal title or abbreviation, for example `N Engl J Med` | |
| PMIDs | PubMed ids or URLs to look up, instead of or in addition to a search | |
| Date from / to | Date range, `YYYY-MM-DD` | |
| Date type | `publication`, `entrez` (added to PubMed) or `modification` | `publication` |
| Sort by | `relevance` (best match), `pub_date` or `most_recent` | `relevance` |
| Max results | Search results per run, 1 to 10,000 | 50 |
| Only new articles (monitor mode) | Skip articles that earlier monitor runs returned | off |
| NCBI API key | Optional, allows 10 instead of 3 requests per second | |

Give at least one of search query, author, journal, date range or PMIDs.

Example:

```json
{
  "query": "glp-1 receptor agonist AND obesity",
  "dateFrom": "2025-01-01",
  "dateTo": "2025-12-31",
  "sort": "pub_date",
  "maxResults": 100
}
```

PMID lookup:

```json
{
  "pmids": ["23287718", "PMID: 31452104", "https://pubmed.ncbi.nlm.nih.gov/42995706/"]
}
```

### Output

One dataset item per article:

```json
{
  "source": "pubmed",
  "id": "42995706",
  "doi": "10.1016/j.ypmed.2025.108433",
  "title": "The association of a healthy lifestyle index with risk of all-cause hospitalization and mortality in US postmenopausal women.",
  "abstract": "OBJECTIVE: A healthy lifestyle-characterized by physical activity, non-smoking, healthy diet, no alcohol, adequate sleep, and normal body mass index-has been linked to reduced chronic and acute disease risk. ...\n\nMETHODS: ...",
  "authors": ["Rita Peila", "Xiaonan Xue", "Michael J La Monte", "Linda G Snetselaar", "Bernhard Haring", "Aladdin H Shadyab", "JoAnn E Manson", "Thomas E Rohan"],
  "affiliations": ["Department of Epidemiology and Population Health, Albert Einstein College of Medicine, Bronx, NY, USA.", "..."],
  "journal": "Preventive medicine",
  "publishedAt": "2025-10-25",
  "updatedAt": "2026-11-07",
  "categories": [],
  "keywords": ["Hospitalization", "Lifestyle behaviors", "Mortality", "Postmenopause", "Prospective study", "Women"],
  "meshTerms": ["Humans", "Female", "Middle Aged", "Postmenopause", "Hospitalization", "Aged", "Healthy Lifestyle", "United States", "Mortality", "..."],
  "url": "https://pubmed.ncbi.nlm.nih.gov/42995706/",
  "pdfUrl": null,
  "citationCount": null,
  "license": null,
  "extra": {
    "pmcid": null,
    "pmcUrl": null,
    "journalAbbreviation": "Prev Med",
    "issn": "1096-0260",
    "volume": "202",
    "issue": null,
    "pages": "108433",
    "journalDate": "2026-01",
    "electronicDate": "2025-10-25",
    "language": ["eng"],
    "publicationTypes": ["Journal Article"],
    "publicationStatus": "ppublish",
    "citationStatus": "MEDLINE",
    "mesh": [{ "descriptor": "Hospitalization", "ui": "D006760", "major": true, "qualifiers": ["statistics & numerical data"] }],
    "grants": [],
    "copyright": "Copyright © 2025 Elsevier Inc. All rights reserved.",
    "authorDetails": [{ "name": "Rita Peila", "isCollective": false, "orcid": null, "affiliations": ["Department of Epidemiology and Population Health, Albert Einstein College of Medicine, Bronx, NY, USA."] }]
  },
  "error": null,
  "fetchedAt": "2026-11-14T16:19:32.792Z"
}
```

- `id` is the PMID.
- `publishedAt` is the electronic publication date when PubMed has one, otherwise the date of the journal issue. Both are in `extra` as `electronicDate` and `journalDate`. Dates can be partial, like `2026-01` or `2001`, when the journal gives no day.
- `updatedAt` is the date the record was last revised.
- `abstract` is plain text. Sections of structured abstracts start with their label, for example `METHODS: `, and are separated by a blank line.
- `meshTerms` lists the MeSH descriptors. `extra.mesh` adds the MeSH id, the qualifiers and whether the term is a major topic.
- `affiliations` lists the affiliations of all authors as text. Email addresses in affiliations are removed.
- `authors` holds collective names like consortia too. `extra.authorDetails` adds ORCID ids where PubMed has them.
- `extra.pmcUrl` links to the free full text in PubMed Central when there is one.
- `categories`, `pdfUrl`, `citationCount` and `license` are part of the common shape of our paper Actors. PubMed does not provide them, so they are empty.
- Invalid PMIDs and PMIDs that PubMed does not know return an item with `error` set, for example `Not found in PubMed: 99999999`.

Export as JSON, CSV or Excel, or read it through the Apify API.

### Monitor mode

Turn on "Only new articles" and run the Actor on a schedule. It keeps the PMIDs it has seen per search in the named key-value store `pubmed-articles-monitor` of your account, at most the last 20,000 per search.

- The first run returns up to "Max results" and marks them as seen.
- Later runs return only articles that were not in an earlier result. Records seen before are not fetched again.
- Sort by "Most recently added" so new records come first.
- A search is the same when query, author, journal, PMIDs, date range, date type and sort are the same. Max results can change.

To start over, delete the `pubmed-articles-monitor` store or the key of one search in it.

### Pricing

Pay per paper: 0.001 USD per delivered article, so 1.00 USD per 1,000 articles. Error items, duplicates and articles skipped in monitor mode are free. You can cap the cost of a run with the maximum charge setting in Apify.

Each run also has a start fee of 0.00005 USD per GB of memory, which Apify shows as Actor Start.

You do not pay NCBI anything. An NCBI API key is free.

### Limits

- PubMed returns at most the first 10,000 results of a search. Split larger searches by date range.
- Without an API key the Actor sends at most 3 requests per second, with a key at most 10. A run of 10,000 articles needs about 51 requests and takes well under a minute.
- PubMed has no citation counts and no license data. For citation counts, look up the DOIs with our Crossref Actor.
- Full text is not part of the output. Use `extra.pmcUrl` for open access articles.
- Very new records may have no MeSH terms yet. NLM indexers add them later.

### Data source, permitted use and legal

- **Data source:** the official NCBI E-utilities at eutils.ncbi.nlm.nih.gov (esearch and efetch, database pubmed). The Actor does not scrape pubmed.ncbi.nlm.nih.gov pages.
- **Terms of NLM:** PubMed data comes from the National Library of Medicine. Follow the NCBI website and data usage policies and the NLM terms and conditions. Do not suggest that NLM, NCBI or the NIH endorse your product.
- **Copyright of abstracts:** NLM does not claim copyright on the abstracts in PubMed, but journal publishers or authors may. You are responsible for checking the rights before you republish abstracts. The copyright note of the publisher is in `extra.copyright` when PubMed has one.
- **No affiliation:** Not affiliated with NCBI, NLM or the NIH.
- **No contact data:** The output holds author names, ORCID ids and affiliations as text. Email addresses are removed from affiliations and never returned.
- **Snapshot:** Results show the data at the time of the run. We do not guarantee that they are complete, current or correct.
- **For business use:** This Actor is offered to businesses only, not to consumers.
- **Permitted use:** Use the data for research, analysis and services that respect the rights of publishers and authors.
- **Your responsibility:** You choose the searches and decide what happens with the results. Your NCBI API key stays in your input, it is stored as a secret and never written to the output or the log.
- **No circumvention:** The Actor uses the public E-utilities only. It does not bypass rate limits or access restrictions.
- **Request volume:** One request at a time, at most 3 requests per second without an API key and at most 10 with your key, as NCBI asks. Every request carries `tool=forgeloop-pubmed`. On HTTP 429 the Actor waits before it tries again. NCBI asks to run series of more than 100 requests on weekends or between 9 pm and 5 am Eastern Time on weekdays. A single run needs at most about 51 requests, but plan large scheduled jobs for these hours.
- **Provider:** forgeloop, Markus Heiss, Austria. [Imprint](https://devhem.github.io/forgeloop-legal/imprint.html), [Privacy Notice](https://devhem.github.io/forgeloop-legal/privacy.html), [Terms of Use](https://devhem.github.io/forgeloop-legal/terms.html).

### Questions and issues

Open an issue on the Actor page.

# Actor input Schema

## `query` (type: `string`):

Words to search, as on the PubMed website. The full PubMed syntax works: field tags like \[ti], \[au], \[mh], \[ta], \[dp], AND, OR, NOT and quoted phrases, for example "long covid"\[ti] AND fatigue.

## `author` (type: `string`):

Author as last name and initials, for example Doudna JA, or a full name. Combined with the other fields by AND.

## `journal` (type: `string`):

Journal title or NLM abbreviation, for example Nature, N Engl J Med or Lancet Oncol.

## `pmids` (type: `array`):

Look up articles by PubMed id instead of, or in addition to, a search. Accepts numbers (31452104), "PMID: 31452104" and pubmed.ncbi.nlm.nih.gov URLs. PMIDs that PubMed does not know return a free error item. Max results does not apply to this list.

## `dateFrom` (type: `string`):

Only articles with a date on or after this day (YYYY-MM-DD, also YYYY-MM or YYYY). Which date is set under Date type.

## `dateTo` (type: `string`):

Only articles with a date on or before this day (YYYY-MM-DD, also YYYY-MM or YYYY).

## `dateType` (type: `string`):

Date the range applies to. Publication date is the date of the journal issue or the electronic publication. Entrez date is the day the record was added to PubMed, the best choice for monitoring.

## `sort` (type: `string`):

Order of the search results. Best match is the relevance order of the PubMed website.

## `maxResults` (type: `integer`):

Maximum number of search results. PubMed returns at most the first 10,000 results of a search. Records are fetched 200 per request.

## `monitorMode` (type: `boolean`):

Return only articles that earlier monitor runs with the same search have not returned. Seen PMIDs are kept in the named key-value store "pubmed-articles-monitor" of your account, at most 20,000 per search. Use it with a schedule and sort by most recently added.

## `ncbiApiKey` (type: `string`):

Optional. With your own free NCBI API key the Actor sends up to 10 requests per second instead of 3. Create one in your NCBI account under Account settings, API Key Management. Runs without a key work fine for small and medium searches.

## Actor input object example

```json
{
  "query": "crispr base editing",
  "dateType": "publication",
  "sort": "relevance",
  "maxResults": 20,
  "monitorMode": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "crispr base editing",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("forgeloop/pubmed-articles").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "crispr base editing",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("forgeloop/pubmed-articles").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "crispr base editing",
  "maxResults": 20
}' |
apify call forgeloop/pubmed-articles --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,forgeloop/pubmed-articles"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LUFdHXPFdxyFW3I7N/builds/TeG44HDsPOexmtvHf/openapi.json
