{
  "openapi": "3.0.1",
  "info": {
    "title": "PubMed MeSH & Citation Metadata Extractor",
    "description": "Pull structured PubMed article records by keyword, PMID, author, journal, or MeSH term, with abstracts, grant funding, conflict-of-interest statements, and a ready-made citation string. No login or proxy needed.",
    "version": "1.0",
    "x-build-id": "aMLAr4fgFAFVm1v2o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~pubmed-mesh-and-citation-metadata-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-pubmed-mesh-and-citation-metadata-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dataspryva~pubmed-mesh-and-citation-metadata-extractor/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-pubmed-mesh-and-citation-metadata-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dataspryva~pubmed-mesh-and-citation-metadata-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-pubmed-mesh-and-citation-metadata-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "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]`.",
            "items": {
              "type": "string"
            }
          },
          "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.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "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`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerTerm": {
            "title": "Max articles per search term",
            "minimum": 1,
            "maximum": 9999,
            "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
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "relevance",
              "most_recent",
              "publication_date",
              "first_author",
              "journal"
            ],
            "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"
          },
          "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`)."
          },
          "dateTo": {
            "title": "Publication date to",
            "type": "string",
            "description": "Latest publication date. Same formats as the from date."
          },
          "articleType": {
            "title": "Article type",
            "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"
            ],
            "type": "string",
            "description": "Restrict to one PubMed publication type. `Any` keeps every type.",
            "default": "any"
          },
          "freeFullTextOnly": {
            "title": "Free full text only",
            "type": "boolean",
            "description": "Keep only articles with a free full-text version in PubMed Central.",
            "default": false
          },
          "hasAbstractOnly": {
            "title": "With abstract only",
            "type": "boolean",
            "description": "Drop records that PubMed has no abstract for.",
            "default": false
          },
          "language": {
            "title": "Language",
            "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"
            ],
            "type": "string",
            "description": "Restrict to one publication language. `Any` keeps every language.",
            "default": "any"
          },
          "species": {
            "title": "Study species",
            "enum": [
              "any",
              "humans",
              "animals"
            ],
            "type": "string",
            "description": "Use PubMed's MeSH signal to keep human or non-human animal studies. `Any` does not filter.",
            "default": "any"
          },
          "excludeRetracted": {
            "title": "Exclude retractions",
            "type": "boolean",
            "description": "Drop retracted publications, retraction notices and expressions of concern.",
            "default": false
          },
          "journalFilter": {
            "title": "Journal",
            "type": "string",
            "description": "Journal name or NLM abbreviation, e.g. `Nature` or `N Engl J Med`."
          },
          "authorFilter": {
            "title": "Author",
            "type": "string",
            "description": "Author in PubMed format, e.g. `Smith J` or `Smith JR`."
          },
          "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`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "affiliationFilter": {
            "title": "Author affiliation",
            "type": "string",
            "description": "Keep articles where an author affiliation contains this text, e.g. `Harvard` or `Mayo Clinic`."
          },
          "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
          },
          "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
          },
          "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."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}