{
  "data": {
    "id": "aMLAr4fgFAFVm1v2o",
    "actId": "KhaQaa39DBJwYi8u2",
    "userId": "zq8lKbpLzTjGDayPC",
    "startedAt": "2026-12-01T17:24:41.104Z",
    "finishedAt": "2026-12-01T17:24:45.240Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "inputSchema": "{\n  \"title\": \"PubMed Search & Citation Input\",\n  \"description\": \"Search PubMed by keyword, URL, PMID, author, journal or MeSH term. Every filter is optional; combine as many as you need and leave the rest out.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"searchTerms\": {\n      \"title\": \"Search terms\",\n      \"type\": \"array\",\n      \"description\": \"One or more PubMed queries. Each term is searched independently and the results are merged by PMID. Full PubMed syntax works: `cancer AND immunotherapy[MeSH]`, `Smith J[Author]`, `2024[dp]`.\",\n      \"editor\": \"stringList\",\n      \"prefill\": [\n        \"machine learning oncology\"\n      ],\n      \"sectionCaption\": \"Search\"\n    },\n    \"searchUrls\": {\n      \"title\": \"PubMed URLs\",\n      \"type\": \"array\",\n      \"description\": \"Paste PubMed search or article URLs. Search URLs contribute their `term=` query; article URLs (`pubmed.ncbi.nlm.nih.gov/PMID/`) are fetched as PMIDs. Results merge with the other search inputs.\",\n      \"editor\": \"stringList\",\n      \"default\": []\n    },\n    \"pmidList\": {\n      \"title\": \"PMID list\",\n      \"type\": \"array\",\n      \"description\": \"Direct lookup: PubMed IDs to fetch without searching. Accepts IDs as strings or numbers and tokens like `PMID: 38123456`.\",\n      \"editor\": \"stringList\",\n      \"default\": []\n    },\n    \"maxItemsPerTerm\": {\n      \"title\": \"Max articles per search term\",\n      \"type\": \"integer\",\n      \"description\": \"Cap per query, from 1 to 9,999. The dataset is the sum across all terms. PubMed returns at most 9,999 records for one query; split by date range for larger corpora.\",\n      \"default\": 25,\n      \"prefill\": 1,\n      \"minimum\": 1,\n      \"maximum\": 9999\n    },\n    \"sortBy\": {\n      \"title\": \"Sort results by\",\n      \"type\": \"string\",\n      \"description\": \"Order PubMed returns for each query. `Best match` uses PubMed relevance; the other options mirror the PubMed website. Ignored for PMID lookups.\",\n      \"default\": \"relevance\",\n      \"prefill\": \"relevance\",\n      \"enum\": [\n        \"relevance\",\n        \"most_recent\",\n        \"publication_date\",\n        \"first_author\",\n        \"journal\"\n      ],\n      \"enumTitles\": [\n        \"Best match\",\n        \"Most recent\",\n        \"Publication date\",\n        \"First author\",\n        \"Journal\"\n      ]\n    },\n    \"dateFrom\": {\n      \"title\": \"Publication date from\",\n      \"type\": \"string\",\n      \"description\": \"Earliest publication date. Use YYYY, YYYY/MM or YYYY/MM/DD (e.g. `2020`, `2020/06`, `2020/06/15`).\",\n      \"editor\": \"textfield\",\n      \"sectionCaption\": \"Filters\"\n    },\n    \"dateTo\": {\n      \"title\": \"Publication date to\",\n      \"type\": \"string\",\n      \"description\": \"Latest publication date. Same formats as the from date.\",\n      \"editor\": \"textfield\"\n    },\n    \"articleType\": {\n      \"title\": \"Article type\",\n      \"type\": \"string\",\n      \"description\": \"Restrict to one PubMed publication type. `Any` keeps every type.\",\n      \"default\": \"any\",\n      \"prefill\": \"any\",\n      \"enum\": [\n        \"any\",\n        \"review\",\n        \"systematic_review\",\n        \"meta_analysis\",\n        \"clinical_trial\",\n        \"randomized_controlled_trial\",\n        \"pragmatic_clinical_trial\",\n        \"adaptive_clinical_trial\",\n        \"clinical_study\",\n        \"clinical_trial_phase_1\",\n        \"clinical_trial_phase_2\",\n        \"clinical_trial_phase_3\",\n        \"clinical_trial_phase_4\",\n        \"clinical_trial_protocol\",\n        \"observational_study\",\n        \"case_report\",\n        \"comparative_study\",\n        \"multicenter_study\",\n        \"evaluation_study\",\n        \"validation_study\",\n        \"guideline\",\n        \"practice_guideline\",\n        \"editorial\",\n        \"letter\",\n        \"comment\",\n        \"news\",\n        \"newspaper_article\",\n        \"historical_article\",\n        \"biography\",\n        \"dataset\",\n        \"government_publication\",\n        \"lecture\",\n        \"legal_case\",\n        \"patient_education_handout\",\n        \"personal_narrative\",\n        \"preprint\",\n        \"published_erratum\",\n        \"retracted_publication\",\n        \"retraction_notice\",\n        \"scientific_integrity_review\",\n        \"technical_report\",\n        \"video_audio_media\",\n        \"webcast\",\n        \"english_abstract\",\n        \"journal_article\",\n        \"research_support_nih\",\n        \"research_support_non_us\"\n      ],\n      \"enumTitles\": [\n        \"Any\",\n        \"Review\",\n        \"Systematic Review\",\n        \"Meta-Analysis\",\n        \"Clinical Trial\",\n        \"Randomized Controlled Trial\",\n        \"Pragmatic Clinical Trial\",\n        \"Adaptive Clinical Trial\",\n        \"Clinical Study\",\n        \"Clinical Trial Phase I\",\n        \"Clinical Trial Phase II\",\n        \"Clinical Trial Phase III\",\n        \"Clinical Trial Phase IV\",\n        \"Clinical Trial Protocol\",\n        \"Observational Study\",\n        \"Case Report\",\n        \"Comparative Study\",\n        \"Multicenter Study\",\n        \"Evaluation Study\",\n        \"Validation Study\",\n        \"Guideline\",\n        \"Practice Guideline\",\n        \"Editorial\",\n        \"Letter\",\n        \"Comment\",\n        \"News\",\n        \"Newspaper Article\",\n        \"Historical Article\",\n        \"Biography\",\n        \"Dataset\",\n        \"Government Publication\",\n        \"Lecture\",\n        \"Legal Case\",\n        \"Patient Education Handout\",\n        \"Personal Narrative\",\n        \"Preprint\",\n        \"Published Erratum\",\n        \"Retracted Publication\",\n        \"Retraction Notice\",\n        \"Scientific Integrity Review\",\n        \"Technical Report\",\n        \"Video-Audio Media\",\n        \"Webcast\",\n        \"English Abstract\",\n        \"Journal Article\",\n        \"NIH Research Support\",\n        \"Non-US Research Support\"\n      ]\n    },\n    \"freeFullTextOnly\": {\n      \"title\": \"Free full text only\",\n      \"type\": \"boolean\",\n      \"description\": \"Keep only articles with a free full-text version in PubMed Central.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"hasAbstractOnly\": {\n      \"title\": \"With abstract only\",\n      \"type\": \"boolean\",\n      \"description\": \"Drop records that PubMed has no abstract for.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"language\": {\n      \"title\": \"Language\",\n      \"type\": \"string\",\n      \"description\": \"Restrict to one publication language. `Any` keeps every language.\",\n      \"default\": \"any\",\n      \"prefill\": \"any\",\n      \"enum\": [\n        \"any\",\n        \"english\",\n        \"spanish\",\n        \"french\",\n        \"german\",\n        \"chinese\",\n        \"japanese\",\n        \"italian\",\n        \"portuguese\",\n        \"russian\",\n        \"korean\",\n        \"arabic\",\n        \"catalan\",\n        \"croatian\",\n        \"czech\",\n        \"danish\",\n        \"dutch\",\n        \"finnish\",\n        \"greek\",\n        \"hebrew\",\n        \"hungarian\",\n        \"indonesian\",\n        \"norwegian\",\n        \"persian\",\n        \"polish\",\n        \"romanian\",\n        \"serbian\",\n        \"slovak\",\n        \"slovenian\",\n        \"swedish\",\n        \"thai\",\n        \"turkish\",\n        \"ukrainian\",\n        \"vietnamese\"\n      ],\n      \"enumTitles\": [\n        \"Any\",\n        \"English\",\n        \"Spanish\",\n        \"French\",\n        \"German\",\n        \"Chinese\",\n        \"Japanese\",\n        \"Italian\",\n        \"Portuguese\",\n        \"Russian\",\n        \"Korean\",\n        \"Arabic\",\n        \"Catalan\",\n        \"Croatian\",\n        \"Czech\",\n        \"Danish\",\n        \"Dutch\",\n        \"Finnish\",\n        \"Greek\",\n        \"Hebrew\",\n        \"Hungarian\",\n        \"Indonesian\",\n        \"Norwegian\",\n        \"Persian\",\n        \"Polish\",\n        \"Romanian\",\n        \"Serbian\",\n        \"Slovak\",\n        \"Slovenian\",\n        \"Swedish\",\n        \"Thai\",\n        \"Turkish\",\n        \"Ukrainian\",\n        \"Vietnamese\"\n      ]\n    },\n    \"species\": {\n      \"title\": \"Study species\",\n      \"type\": \"string\",\n      \"description\": \"Use PubMed's MeSH signal to keep human or non-human animal studies. `Any` does not filter.\",\n      \"default\": \"any\",\n      \"prefill\": \"any\",\n      \"enum\": [\n        \"any\",\n        \"humans\",\n        \"animals\"\n      ],\n      \"enumTitles\": [\n        \"Any\",\n        \"Human studies\",\n        \"Animal studies\"\n      ]\n    },\n    \"excludeRetracted\": {\n      \"title\": \"Exclude retractions\",\n      \"type\": \"boolean\",\n      \"description\": \"Drop retracted publications, retraction notices and expressions of concern.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"journalFilter\": {\n      \"title\": \"Journal\",\n      \"type\": \"string\",\n      \"description\": \"Journal name or NLM abbreviation, e.g. `Nature` or `N Engl J Med`.\",\n      \"editor\": \"textfield\"\n    },\n    \"authorFilter\": {\n      \"title\": \"Author\",\n      \"type\": \"string\",\n      \"description\": \"Author in PubMed format, e.g. `Smith J` or `Smith JR`.\",\n      \"editor\": \"textfield\"\n    },\n    \"meshFilter\": {\n      \"title\": \"MeSH terms\",\n      \"type\": \"array\",\n      \"description\": \"One or more MeSH descriptors. All listed terms must be present (AND), e.g. `Lung Neoplasms` and `Machine Learning`.\",\n      \"editor\": \"stringList\",\n      \"default\": []\n    },\n    \"affiliationFilter\": {\n      \"title\": \"Author affiliation\",\n      \"type\": \"string\",\n      \"description\": \"Keep articles where an author affiliation contains this text, e.g. `Harvard` or `Mayo Clinic`.\",\n      \"editor\": \"textfield\"\n    },\n    \"includeReferences\": {\n      \"title\": \"Include reference lists\",\n      \"type\": \"boolean\",\n      \"description\": \"Add the article's cited references (citation text, PMID and DOI where PubMed has them). This can make records much larger, so it is off by default.\",\n      \"default\": false,\n      \"prefill\": false,\n      \"sectionCaption\": \"Enrichment\"\n    },\n    \"includeCitedByCount\": {\n      \"title\": \"Include cited-by count\",\n      \"type\": \"boolean\",\n      \"description\": \"Add the number of PubMed articles citing each record. Uses one extra elink request per batch of PMIDs.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"apiKey\": {\n      \"title\": \"NCBI API key\",\n      \"type\": \"string\",\n      \"description\": \"Optional free key from https://www.ncbi.nlm.nih.gov/account/ — raises the request ceiling from 3 to 10 per second for very large runs. Never required.\",\n      \"editor\": \"textfield\",\n      \"isSecret\": true\n    }\n  },\n  \"required\": []\n}",
    "readme": "# PubMed MeSH & Citation Metadata Extractor\n\nRead [PubMed](https://pubmed.ncbi.nlm.nih.gov) without fighting the website. This actor calls NCBI's public E-utilities API and turns a search, a list of PMIDs, or a set of filters into structured article records with abstracts, MeSH indexing, chemicals, funding, citation links and a ready-to-use reference string.\n\nNo login, cookie, proxy or API key is required. The optional NCBI key only raises the request ceiling for very large runs.\n\n## What it can do\n\n- Search one or many PubMed queries, including full PubMed syntax: `cancer AND immunotherapy[MeSH]`, `Smith J[Author]`, `2024[dp]`.\n- Paste PubMed search URLs or article URLs. Search URLs contribute their `term=` query; article URLs become direct PMID lookups.\n- Fetch specific PMIDs without searching. Accepts `38123456`, `PMID: 38123456` or a PubMed article URL.\n- Run a filter-only search, for example a journal, author, MeSH term, affiliation or publication-date window with no keyword.\n- Narrow by publication type, language, species (human or animal), free full text, abstract availability and retraction status.\n- Sort by best match, most recent, publication date, first author or journal.\n- Enrich every record with structured abstract sections, MeSH headings and major topics, chemicals, grants, author ORCIDs and affiliations, clinical-trial IDs, publication history, linked notices and optional reference lists.\n- Add a cited-by count and a compact AMA-style citation string.\n\n## Input\n\n| Field | Type | Default | What it does |\n|---|---|---|---|\n| `searchTerms` | array | – | PubMed queries. Each term is searched separately and merged by PMID. |\n| `searchUrls` | array | `[]` | PubMed search or article URLs. |\n| `pmidList` | array | `[]` | Direct PMID lookups, with or without a search. |\n| `maxItemsPerTerm` | integer | `25` | Cap per query, 1–9,999. The dataset is the sum across terms. |\n| `sortBy` | select | `relevance` | Best match, most recent, publication date, first author or journal. |\n| `dateFrom` / `dateTo` | text | – | Publication dates as `YYYY`, `YYYY/MM` or `YYYY/MM/DD`. |\n| `articleType` | select | `any` | 46 PubMed publication types, from Review and RCT to Preprint and Retracted Publication. |\n| `freeFullTextOnly` | boolean | `false` | Keep only records with a free full-text version. |\n| `hasAbstractOnly` | boolean | `false` | Drop records without an abstract. |\n| `language` | select | `any` | 33 common PubMed publication languages. |\n| `species` | select | `any` | Human studies, animal studies or any. |\n| `excludeRetracted` | boolean | `false` | Drop retracted publications, retraction notices and expressions of concern. |\n| `journalFilter` | text | – | Journal name or NLM abbreviation. |\n| `authorFilter` | text | – | Author in PubMed format, e.g. `Smith J`. |\n| `meshFilter` | array | `[]` | MeSH descriptors; all listed terms must match. |\n| `affiliationFilter` | text | – | Affiliation substring, e.g. `Harvard`. |\n| `includeReferences` | boolean | `false` | Add each article's cited references. Records get much larger, so this is off by default. |\n| `includeCitedByCount` | boolean | `false` | Add the number of PubMed articles citing each record. |\n| `apiKey` | secret | – | Optional free NCBI key; raises the request rate from 3/s to 10/s. |\n\nEvery filter is optional. Fill `searchTerms`/`searchUrls`/`pmidList`, one or more filters, or both. An input with no criteria stops with a clear status message.\n\n### Examples\n\nKeyword search with a MeSH filter:\n\n```json\n{\n  \"searchTerms\": [\"lung cancer screening\"],\n  \"meshFilter\": [\"Early Detection of Cancer\"],\n  \"articleType\": \"systematic_review\",\n  \"dateFrom\": \"2023\",\n  \"dateTo\": \"2025/12/31\",\n  \"maxItemsPerTerm\": 200\n}\n```\n\nJournal-only sweep with reference lists:\n\n```json\n{\n  \"journalFilter\": \"Nature\",\n  \"dateFrom\": \"2024/01\",\n  \"dateTo\": \"2024/12\",\n  \"maxItemsPerTerm\": 100,\n  \"sortBy\": \"publication_date\",\n  \"includeReferences\": true\n}\n```\n\nDirect PMID lookup with citation counts:\n\n```json\n{\n  \"pmidList\": [\"38123456\", \"33301246\"],\n  \"includeCitedByCount\": true\n}\n```\n\nFilter-only search for human RCTs:\n\n```json\n{\n  \"articleType\": \"randomized_controlled_trial\",\n  \"species\": \"humans\",\n  \"dateFrom\": \"2024\",\n  \"maxItemsPerTerm\": 250\n}\n```\n\n## Output\n\nOne row per article. Empty fields are omitted at every depth — no nulls, empty strings, empty lists or placeholder values.\n\nIdentity and links\n- `pmid`, `doi`, `doiUrl`, `pmcId`, `pmcUrl`, `articleUrl`, `shareLinks`\n\nBibliographic metadata\n- `title`, `authors`, `authorsAbbreviated`, `authorsDetails` (first name, last name, initials, ORCID, affiliations), `authorCount`, `firstAuthor`, `lastAuthor`\n- `journal`, `journalAbbrev`, `issn`, `eissn`, `journalCountry`, `nlmUniqueId`\n- `publicationDate`, `epubDate`, `articleDate`, `volume`, `issue`, `pages`, `elocationId`\n- `language`, `articleTypes`, `recordStatus`, `publicationStatus`, `vernacularTitle`, `bookTitle`, `publisher`, `publisherLocation`\n- `publicationHistory` with `received`, `accepted`, `revised`, `pubmedEntry`, `medline`, `entrez`, `pmcRelease`, `created`, `completed`, `lastRevised` dates when PubMed has them\n- `copyright`\n\nContent and indexing\n- `abstract`, `abstractSections` (label + text per section), `otherAbstracts` (non-English abstracts)\n- `meshTerms`, `meshMajor`, `meshHeadings` (term, major-topic flag, qualifiers), `keywords`\n- `chemicals` (name and registry number), `clinicalTrialIds`, `dataBanks`\n- `authorAffiliations`, `conflictOfInterest`, `grants` (grant ID, agency, acronym, country)\n- `referenceCount`, `references` (optional; citation text, PMID and DOI)\n- `citedByCount` (optional)\n- `publicationNotices` (comments, errata, retractions and updates linked by PubMed)\n\nAssessment helpers\n- `tags` — compact labels such as Review, Meta-Analysis, Clinical Trial, Preprint, Retracted or Free article\n- `integrityStatus` — `retracted`, `retraction-notice`, `expression-of-concern` or `erratum` when applicable\n- `isRetracted` — present only for retracted publications\n- `humanStudy` — true/false from MeSH when the record has a human or animal signal\n- `citation` — AMA-style reference string built from the record\n\nSearch context\n- `inputQuery`, `resultRank`, `queryTotalMatches`, `scrapedAt`\n\n## How it works\n\nThe actor uses four public NCBI endpoints: `esearch` for PMIDs and the total match count, `esummary` for bibliographic metadata, `efetch` for abstracts and indexing details, and `elink` for optional cited-by counts. Requests are paced at NCBI's published limits (3/s without a key, 10/s with one), retried on transient 429/5xx responses, and processed in batches so even 9,999-record runs stream instead of loading everything into memory.\n\nThe default test input asks for one article, so the daily check stays cheap.\n\n## Reliability and limits\n\n- **9,999 records per query.** PubMed's search API returns at most 9,999 records for one query. Split a larger topic into date windows or narrower filters and concatenate the datasets. The actor reports the true `queryTotalMatches` even when it returns the 9,999-record window.\n- **MeSH lags publication.** New articles can spend months without MeSH terms; `meshTerms` and `humanStudy` appear only after indexing. Filtering by MeSH can therefore miss very recent papers.\n- **Abstracts, DOIs, grants and reference lists are not universal.** Letters, editorials, older records and ahead-of-print papers often lack them. The field is omitted rather than invented.\n- **Reference lists are optional.** Turn on `includeReferences` when you need the citation graph; it materially increases record size and run time.\n- **The public website is not scraped.** PubMed serves a cookie wall to plain HTTP clients, while E-utilities is the API behind the same index. This actor uses the API, so it works without cookies or a browser.\n- **No full text.** PubMed Central full-text articles are not downloaded. `pmcId`/`pmcUrl` point to the free full-text version when one exists.\n\n## FAQ\n\n**Do I need an NCBI API key?**\nNo. The keyless rate is enough for normal runs. A free key helps when you routinely request thousands of records.\n\n**Why is a field missing from one record but present in another?**\nPubMed itself does not publish every field for every article. The actor omits what the source does not have and never fills a placeholder.\n\n**Can I use PubMed search tags?**\nYes. `searchTerms` is passed through to PubMed, so `[tiab]`, `[au]`, `[mh]`, `[pt]`, `[dp]`, Boolean operators and nested parentheses all work.\n\n**What happens when nothing matches?**\nThe run finishes with an empty dataset and a status message saying zero articles matched. Invalid input, such as no criteria at all, fails with an explanatory message.\n\n**Is this an official PubMed or NLM product?**\nNo. It is an independent third-party actor that reads NCBI's public E-utilities API.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "pubmed-mesh-and-citation-metadata-extractor",
      "title": "PubMed MeSH & Citation Metadata Extractor",
      "description": "Search PubMed by keyword, PMID, author, journal or MeSH and extract abstracts, MeSH headings, chemicals, grants, references, citation counts, retraction flags and a formatted citation. No login or proxy needed.",
      "version": "1.0",
      "buildTag": "latest",
      "input": {
        "title": "PubMed Search & Citation Input",
        "description": "Search PubMed by keyword, URL, PMID, author, journal or MeSH term. Every filter is optional; combine as many as you need and leave the rest out.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One or more PubMed queries. Each term is searched independently and the results are merged by PMID. Full PubMed syntax works: `cancer AND immunotherapy[MeSH]`, `Smith J[Author]`, `2024[dp]`.",
            "editor": "stringList",
            "prefill": [
              "machine learning oncology"
            ],
            "sectionCaption": "Search"
          },
          "searchUrls": {
            "title": "PubMed URLs",
            "type": "array",
            "description": "Paste PubMed search or article URLs. Search URLs contribute their `term=` query; article URLs (`pubmed.ncbi.nlm.nih.gov/PMID/`) are fetched as PMIDs. Results merge with the other search inputs.",
            "editor": "stringList",
            "default": []
          },
          "pmidList": {
            "title": "PMID list",
            "type": "array",
            "description": "Direct lookup: PubMed IDs to fetch without searching. Accepts IDs as strings or numbers and tokens like `PMID: 38123456`.",
            "editor": "stringList",
            "default": []
          },
          "maxItemsPerTerm": {
            "title": "Max articles per search term",
            "type": "integer",
            "description": "Cap per query, from 1 to 9,999. The dataset is the sum across all terms. PubMed returns at most 9,999 records for one query; split by date range for larger corpora.",
            "default": 25,
            "prefill": 1,
            "minimum": 1,
            "maximum": 9999
          },
          "sortBy": {
            "title": "Sort results by",
            "type": "string",
            "description": "Order PubMed returns for each query. `Best match` uses PubMed relevance; the other options mirror the PubMed website. Ignored for PMID lookups.",
            "default": "relevance",
            "prefill": "relevance",
            "enum": [
              "relevance",
              "most_recent",
              "publication_date",
              "first_author",
              "journal"
            ],
            "enumTitles": [
              "Best match",
              "Most recent",
              "Publication date",
              "First author",
              "Journal"
            ]
          },
          "dateFrom": {
            "title": "Publication date from",
            "type": "string",
            "description": "Earliest publication date. Use YYYY, YYYY/MM or YYYY/MM/DD (e.g. `2020`, `2020/06`, `2020/06/15`).",
            "editor": "textfield",
            "sectionCaption": "Filters"
          },
          "dateTo": {
            "title": "Publication date to",
            "type": "string",
            "description": "Latest publication date. Same formats as the from date.",
            "editor": "textfield"
          },
          "articleType": {
            "title": "Article type",
            "type": "string",
            "description": "Restrict to one PubMed publication type. `Any` keeps every type.",
            "default": "any",
            "prefill": "any",
            "enum": [
              "any",
              "review",
              "systematic_review",
              "meta_analysis",
              "clinical_trial",
              "randomized_controlled_trial",
              "pragmatic_clinical_trial",
              "adaptive_clinical_trial",
              "clinical_study",
              "clinical_trial_phase_1",
              "clinical_trial_phase_2",
              "clinical_trial_phase_3",
              "clinical_trial_phase_4",
              "clinical_trial_protocol",
              "observational_study",
              "case_report",
              "comparative_study",
              "multicenter_study",
              "evaluation_study",
              "validation_study",
              "guideline",
              "practice_guideline",
              "editorial",
              "letter",
              "comment",
              "news",
              "newspaper_article",
              "historical_article",
              "biography",
              "dataset",
              "government_publication",
              "lecture",
              "legal_case",
              "patient_education_handout",
              "personal_narrative",
              "preprint",
              "published_erratum",
              "retracted_publication",
              "retraction_notice",
              "scientific_integrity_review",
              "technical_report",
              "video_audio_media",
              "webcast",
              "english_abstract",
              "journal_article",
              "research_support_nih",
              "research_support_non_us"
            ],
            "enumTitles": [
              "Any",
              "Review",
              "Systematic Review",
              "Meta-Analysis",
              "Clinical Trial",
              "Randomized Controlled Trial",
              "Pragmatic Clinical Trial",
              "Adaptive Clinical Trial",
              "Clinical Study",
              "Clinical Trial Phase I",
              "Clinical Trial Phase II",
              "Clinical Trial Phase III",
              "Clinical Trial Phase IV",
              "Clinical Trial Protocol",
              "Observational Study",
              "Case Report",
              "Comparative Study",
              "Multicenter Study",
              "Evaluation Study",
              "Validation Study",
              "Guideline",
              "Practice Guideline",
              "Editorial",
              "Letter",
              "Comment",
              "News",
              "Newspaper Article",
              "Historical Article",
              "Biography",
              "Dataset",
              "Government Publication",
              "Lecture",
              "Legal Case",
              "Patient Education Handout",
              "Personal Narrative",
              "Preprint",
              "Published Erratum",
              "Retracted Publication",
              "Retraction Notice",
              "Scientific Integrity Review",
              "Technical Report",
              "Video-Audio Media",
              "Webcast",
              "English Abstract",
              "Journal Article",
              "NIH Research Support",
              "Non-US Research Support"
            ]
          },
          "freeFullTextOnly": {
            "title": "Free full text only",
            "type": "boolean",
            "description": "Keep only articles with a free full-text version in PubMed Central.",
            "default": false,
            "prefill": false
          },
          "hasAbstractOnly": {
            "title": "With abstract only",
            "type": "boolean",
            "description": "Drop records that PubMed has no abstract for.",
            "default": false,
            "prefill": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Restrict to one publication language. `Any` keeps every language.",
            "default": "any",
            "prefill": "any",
            "enum": [
              "any",
              "english",
              "spanish",
              "french",
              "german",
              "chinese",
              "japanese",
              "italian",
              "portuguese",
              "russian",
              "korean",
              "arabic",
              "catalan",
              "croatian",
              "czech",
              "danish",
              "dutch",
              "finnish",
              "greek",
              "hebrew",
              "hungarian",
              "indonesian",
              "norwegian",
              "persian",
              "polish",
              "romanian",
              "serbian",
              "slovak",
              "slovenian",
              "swedish",
              "thai",
              "turkish",
              "ukrainian",
              "vietnamese"
            ],
            "enumTitles": [
              "Any",
              "English",
              "Spanish",
              "French",
              "German",
              "Chinese",
              "Japanese",
              "Italian",
              "Portuguese",
              "Russian",
              "Korean",
              "Arabic",
              "Catalan",
              "Croatian",
              "Czech",
              "Danish",
              "Dutch",
              "Finnish",
              "Greek",
              "Hebrew",
              "Hungarian",
              "Indonesian",
              "Norwegian",
              "Persian",
              "Polish",
              "Romanian",
              "Serbian",
              "Slovak",
              "Slovenian",
              "Swedish",
              "Thai",
              "Turkish",
              "Ukrainian",
              "Vietnamese"
            ]
          },
          "species": {
            "title": "Study species",
            "type": "string",
            "description": "Use PubMed's MeSH signal to keep human or non-human animal studies. `Any` does not filter.",
            "default": "any",
            "prefill": "any",
            "enum": [
              "any",
              "humans",
              "animals"
            ],
            "enumTitles": [
              "Any",
              "Human studies",
              "Animal studies"
            ]
          },
          "excludeRetracted": {
            "title": "Exclude retractions",
            "type": "boolean",
            "description": "Drop retracted publications, retraction notices and expressions of concern.",
            "default": false,
            "prefill": false
          },
          "journalFilter": {
            "title": "Journal",
            "type": "string",
            "description": "Journal name or NLM abbreviation, e.g. `Nature` or `N Engl J Med`.",
            "editor": "textfield"
          },
          "authorFilter": {
            "title": "Author",
            "type": "string",
            "description": "Author in PubMed format, e.g. `Smith J` or `Smith JR`.",
            "editor": "textfield"
          },
          "meshFilter": {
            "title": "MeSH terms",
            "type": "array",
            "description": "One or more MeSH descriptors. All listed terms must be present (AND), e.g. `Lung Neoplasms` and `Machine Learning`.",
            "editor": "stringList",
            "default": []
          },
          "affiliationFilter": {
            "title": "Author affiliation",
            "type": "string",
            "description": "Keep articles where an author affiliation contains this text, e.g. `Harvard` or `Mayo Clinic`.",
            "editor": "textfield"
          },
          "includeReferences": {
            "title": "Include reference lists",
            "type": "boolean",
            "description": "Add the article's cited references (citation text, PMID and DOI where PubMed has them). This can make records much larger, so it is off by default.",
            "default": false,
            "prefill": false,
            "sectionCaption": "Enrichment"
          },
          "includeCitedByCount": {
            "title": "Include cited-by count",
            "type": "boolean",
            "description": "Add the number of PubMed articles citing each record. Uses one extra elink request per batch of PMIDs.",
            "default": false,
            "prefill": false
          },
          "apiKey": {
            "title": "NCBI API key",
            "type": "string",
            "description": "Optional free key from https://www.ncbi.nlm.nih.gov/account/ — raises the request ceiling from 3 to 10 per second for very large runs. Never required.",
            "editor": "textfield",
            "isSecret": true
          }
        },
        "required": []
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "PubMed MeSH & Citation Metadata Extractor Output",
        "description": "One record per PubMed article with authors, journal, abstract sections, MeSH headings, chemicals, grants, references, publication history, retraction flags and a ready-to-use citation string.",
        "properties": {
          "articles": {
            "type": "string",
            "title": "Articles",
            "description": "Dataset containing all scraped PubMed articles.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "dockerfile": "../Dockerfile",
      "readme": "# PubMed MeSH & Citation Metadata Extractor\n\nRead [PubMed](https://pubmed.ncbi.nlm.nih.gov) without fighting the website. This actor calls NCBI's public E-utilities API and turns a search, a list of PMIDs, or a set of filters into structured article records with abstracts, MeSH indexing, chemicals, funding, citation links and a ready-to-use reference string.\n\nNo login, cookie, proxy or API key is required. The optional NCBI key only raises the request ceiling for very large runs.\n\n## What it can do\n\n- Search one or many PubMed queries, including full PubMed syntax: `cancer AND immunotherapy[MeSH]`, `Smith J[Author]`, `2024[dp]`.\n- Paste PubMed search URLs or article URLs. Search URLs contribute their `term=` query; article URLs become direct PMID lookups.\n- Fetch specific PMIDs without searching. Accepts `38123456`, `PMID: 38123456` or a PubMed article URL.\n- Run a filter-only search, for example a journal, author, MeSH term, affiliation or publication-date window with no keyword.\n- Narrow by publication type, language, species (human or animal), free full text, abstract availability and retraction status.\n- Sort by best match, most recent, publication date, first author or journal.\n- Enrich every record with structured abstract sections, MeSH headings and major topics, chemicals, grants, author ORCIDs and affiliations, clinical-trial IDs, publication history, linked notices and optional reference lists.\n- Add a cited-by count and a compact AMA-style citation string.\n\n## Input\n\n| Field | Type | Default | What it does |\n|---|---|---|---|\n| `searchTerms` | array | – | PubMed queries. Each term is searched separately and merged by PMID. |\n| `searchUrls` | array | `[]` | PubMed search or article URLs. |\n| `pmidList` | array | `[]` | Direct PMID lookups, with or without a search. |\n| `maxItemsPerTerm` | integer | `25` | Cap per query, 1–9,999. The dataset is the sum across terms. |\n| `sortBy` | select | `relevance` | Best match, most recent, publication date, first author or journal. |\n| `dateFrom` / `dateTo` | text | – | Publication dates as `YYYY`, `YYYY/MM` or `YYYY/MM/DD`. |\n| `articleType` | select | `any` | 46 PubMed publication types, from Review and RCT to Preprint and Retracted Publication. |\n| `freeFullTextOnly` | boolean | `false` | Keep only records with a free full-text version. |\n| `hasAbstractOnly` | boolean | `false` | Drop records without an abstract. |\n| `language` | select | `any` | 33 common PubMed publication languages. |\n| `species` | select | `any` | Human studies, animal studies or any. |\n| `excludeRetracted` | boolean | `false` | Drop retracted publications, retraction notices and expressions of concern. |\n| `journalFilter` | text | – | Journal name or NLM abbreviation. |\n| `authorFilter` | text | – | Author in PubMed format, e.g. `Smith J`. |\n| `meshFilter` | array | `[]` | MeSH descriptors; all listed terms must match. |\n| `affiliationFilter` | text | – | Affiliation substring, e.g. `Harvard`. |\n| `includeReferences` | boolean | `false` | Add each article's cited references. Records get much larger, so this is off by default. |\n| `includeCitedByCount` | boolean | `false` | Add the number of PubMed articles citing each record. |\n| `apiKey` | secret | – | Optional free NCBI key; raises the request rate from 3/s to 10/s. |\n\nEvery filter is optional. Fill `searchTerms`/`searchUrls`/`pmidList`, one or more filters, or both. An input with no criteria stops with a clear status message.\n\n### Examples\n\nKeyword search with a MeSH filter:\n\n```json\n{\n  \"searchTerms\": [\"lung cancer screening\"],\n  \"meshFilter\": [\"Early Detection of Cancer\"],\n  \"articleType\": \"systematic_review\",\n  \"dateFrom\": \"2023\",\n  \"dateTo\": \"2025/12/31\",\n  \"maxItemsPerTerm\": 200\n}\n```\n\nJournal-only sweep with reference lists:\n\n```json\n{\n  \"journalFilter\": \"Nature\",\n  \"dateFrom\": \"2024/01\",\n  \"dateTo\": \"2024/12\",\n  \"maxItemsPerTerm\": 100,\n  \"sortBy\": \"publication_date\",\n  \"includeReferences\": true\n}\n```\n\nDirect PMID lookup with citation counts:\n\n```json\n{\n  \"pmidList\": [\"38123456\", \"33301246\"],\n  \"includeCitedByCount\": true\n}\n```\n\nFilter-only search for human RCTs:\n\n```json\n{\n  \"articleType\": \"randomized_controlled_trial\",\n  \"species\": \"humans\",\n  \"dateFrom\": \"2024\",\n  \"maxItemsPerTerm\": 250\n}\n```\n\n## Output\n\nOne row per article. Empty fields are omitted at every depth — no nulls, empty strings, empty lists or placeholder values.\n\nIdentity and links\n- `pmid`, `doi`, `doiUrl`, `pmcId`, `pmcUrl`, `articleUrl`, `shareLinks`\n\nBibliographic metadata\n- `title`, `authors`, `authorsAbbreviated`, `authorsDetails` (first name, last name, initials, ORCID, affiliations), `authorCount`, `firstAuthor`, `lastAuthor`\n- `journal`, `journalAbbrev`, `issn`, `eissn`, `journalCountry`, `nlmUniqueId`\n- `publicationDate`, `epubDate`, `articleDate`, `volume`, `issue`, `pages`, `elocationId`\n- `language`, `articleTypes`, `recordStatus`, `publicationStatus`, `vernacularTitle`, `bookTitle`, `publisher`, `publisherLocation`\n- `publicationHistory` with `received`, `accepted`, `revised`, `pubmedEntry`, `medline`, `entrez`, `pmcRelease`, `created`, `completed`, `lastRevised` dates when PubMed has them\n- `copyright`\n\nContent and indexing\n- `abstract`, `abstractSections` (label + text per section), `otherAbstracts` (non-English abstracts)\n- `meshTerms`, `meshMajor`, `meshHeadings` (term, major-topic flag, qualifiers), `keywords`\n- `chemicals` (name and registry number), `clinicalTrialIds`, `dataBanks`\n- `authorAffiliations`, `conflictOfInterest`, `grants` (grant ID, agency, acronym, country)\n- `referenceCount`, `references` (optional; citation text, PMID and DOI)\n- `citedByCount` (optional)\n- `publicationNotices` (comments, errata, retractions and updates linked by PubMed)\n\nAssessment helpers\n- `tags` — compact labels such as Review, Meta-Analysis, Clinical Trial, Preprint, Retracted or Free article\n- `integrityStatus` — `retracted`, `retraction-notice`, `expression-of-concern` or `erratum` when applicable\n- `isRetracted` — present only for retracted publications\n- `humanStudy` — true/false from MeSH when the record has a human or animal signal\n- `citation` — AMA-style reference string built from the record\n\nSearch context\n- `inputQuery`, `resultRank`, `queryTotalMatches`, `scrapedAt`\n\n## How it works\n\nThe actor uses four public NCBI endpoints: `esearch` for PMIDs and the total match count, `esummary` for bibliographic metadata, `efetch` for abstracts and indexing details, and `elink` for optional cited-by counts. Requests are paced at NCBI's published limits (3/s without a key, 10/s with one), retried on transient 429/5xx responses, and processed in batches so even 9,999-record runs stream instead of loading everything into memory.\n\nThe default test input asks for one article, so the daily check stays cheap.\n\n## Reliability and limits\n\n- **9,999 records per query.** PubMed's search API returns at most 9,999 records for one query. Split a larger topic into date windows or narrower filters and concatenate the datasets. The actor reports the true `queryTotalMatches` even when it returns the 9,999-record window.\n- **MeSH lags publication.** New articles can spend months without MeSH terms; `meshTerms` and `humanStudy` appear only after indexing. Filtering by MeSH can therefore miss very recent papers.\n- **Abstracts, DOIs, grants and reference lists are not universal.** Letters, editorials, older records and ahead-of-print papers often lack them. The field is omitted rather than invented.\n- **Reference lists are optional.** Turn on `includeReferences` when you need the citation graph; it materially increases record size and run time.\n- **The public website is not scraped.** PubMed serves a cookie wall to plain HTTP clients, while E-utilities is the API behind the same index. This actor uses the API, so it works without cookies or a browser.\n- **No full text.** PubMed Central full-text articles are not downloaded. `pmcId`/`pmcUrl` point to the free full-text version when one exists.\n\n## FAQ\n\n**Do I need an NCBI API key?**\nNo. The keyless rate is enough for normal runs. A free key helps when you routinely request thousands of records.\n\n**Why is a field missing from one record but present in another?**\nPubMed itself does not publish every field for every article. The actor omits what the source does not have and never fills a placeholder.\n\n**Can I use PubMed search tags?**\nYes. `searchTerms` is passed through to PubMed, so `[tiab]`, `[au]`, `[mh]`, `[pt]`, `[dp]`, Boolean operators and nested parentheses all work.\n\n**What happens when nothing matches?**\nThe run finishes with an empty dataset and a status message saying zero articles matched. Invalid input, such as no criteria at all, fails with an explanatory message.\n\n**Is this an official PubMed or NLM product?**\nNo. It is an independent third-party actor that reads NCBI's public E-utilities API.\n",
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "title": "PubMed articles",
          "views": {
            "overview": {
              "title": "Article overview",
              "transformation": {
                "fields": [
                  "pmid",
                  "title",
                  "authors",
                  "journal",
                  "publicationDate",
                  "doi",
                  "pmcId",
                  "articleTypes",
                  "citedByCount",
                  "articleUrl"
                ]
              },
              "display": {
                "component": "table",
                "properties": {
                  "pmid": {
                    "label": "PMID",
                    "format": "text"
                  },
                  "title": {
                    "label": "Title",
                    "format": "text"
                  },
                  "authors": {
                    "label": "Authors",
                    "format": "array"
                  },
                  "journal": {
                    "label": "Journal",
                    "format": "text"
                  },
                  "publicationDate": {
                    "label": "Published",
                    "format": "date"
                  },
                  "doi": {
                    "label": "DOI",
                    "format": "text"
                  },
                  "pmcId": {
                    "label": "PMC ID",
                    "format": "text"
                  },
                  "articleTypes": {
                    "label": "Article types",
                    "format": "array"
                  },
                  "citedByCount": {
                    "label": "Cited by",
                    "format": "number"
                  },
                  "articleUrl": {
                    "label": "Article URL",
                    "format": "link"
                  }
                }
              }
            },
            "citation": {
              "title": "Citation details",
              "transformation": {
                "fields": [
                  "pmid",
                  "title",
                  "authorsAbbreviated",
                  "journalAbbrev",
                  "publicationDate",
                  "volume",
                  "issue",
                  "pages",
                  "doi",
                  "citation"
                ]
              },
              "display": {
                "component": "table",
                "properties": {
                  "pmid": {
                    "label": "PMID",
                    "format": "text"
                  },
                  "title": {
                    "label": "Title",
                    "format": "text"
                  },
                  "authorsAbbreviated": {
                    "label": "Authors",
                    "format": "array"
                  },
                  "journalAbbrev": {
                    "label": "Journal",
                    "format": "text"
                  },
                  "publicationDate": {
                    "label": "Published",
                    "format": "date"
                  },
                  "volume": {
                    "label": "Volume",
                    "format": "text"
                  },
                  "issue": {
                    "label": "Issue",
                    "format": "text"
                  },
                  "pages": {
                    "label": "Pages",
                    "format": "text"
                  },
                  "doi": {
                    "label": "DOI",
                    "format": "text"
                  },
                  "citation": {
                    "label": "Citation",
                    "format": "text"
                  }
                }
              }
            }
          }
        }
      }
    },
    "buildNumber": "1.0.2",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.0"
    }
  }
}