{
  "openapi": "3.0.1",
  "info": {
    "title": "arXiv & PubMed Papers Scraper + OpenAlex Citations API",
    "description": "Scrape & cross-deduplicate arXiv preprints and NIH PubMed papers enriched with live OpenAlex citations, DOIs, ORCIDs, ROR institutions, MeSH/arXiv taxonomies, grants & open-access PDFs. Built for AI literature review, RAG & Apify MCP.",
    "version": "1.0",
    "x-build-id": "pTuDVLl2zjJSsLOcU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/autotroph~arxiv-pubmed-openalex-normalizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-autotroph-arxiv-pubmed-openalex-normalizer",
        "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/autotroph~arxiv-pubmed-openalex-normalizer/runs": {
      "post": {
        "operationId": "runs-sync-autotroph-arxiv-pubmed-openalex-normalizer",
        "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/autotroph~arxiv-pubmed-openalex-normalizer/run-sync": {
      "post": {
        "operationId": "run-sync-autotroph-arxiv-pubmed-openalex-normalizer",
        "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": {
          "sources": {
            "title": "Academic Sources",
            "type": "array",
            "description": "Sources to query: any combination of 'arxiv' and 'pubmed' (defaults to ['arxiv', 'pubmed'], round-robin balanced).",
            "items": {
              "type": "string"
            },
            "default": [
              "arxiv",
              "pubmed"
            ]
          },
          "query": {
            "title": "Search Query (Optional)",
            "type": "string",
            "description": "Free-text search keywords applied across selected sources (e.g., 'large language models', 'CRISPR gene editing', 'protein folding'). Leave blank for latest AI/ML + biomedical research.",
            "default": ""
          },
          "arxivCategories": {
            "title": "arXiv Categories (Optional)",
            "type": "array",
            "description": "Optional arXiv subject categories (e.g., ['cs.AI', 'cs.LG', 'cs.CL', 'q-bio.GN']). Defaults to ['cs.AI', 'cs.LG', 'cs.CL'] when no query or arXiv IDs are supplied.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "arxivIds": {
            "title": "Specific arXiv IDs (Optional)",
            "type": "array",
            "description": "Optional exact arXiv IDs or URLs for direct normalization (e.g., ['1706.03762', '2501.12948']).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "pmids": {
            "title": "Specific PubMed IDs / PMIDs (Optional)",
            "type": "array",
            "description": "Optional exact numeric PubMed PMIDs for direct normalization (e.g., ['38786024', '38909984']).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "meshTerms": {
            "title": "PubMed MeSH Terms (Optional)",
            "type": "array",
            "description": "Optional NIH Medical Subject Headings (MeSH) descriptors to filter PubMed queries (e.g., ['CRISPR-Cas Systems', 'Immunotherapy', 'mRNA Vaccines']).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "publishedAfter": {
            "title": "Published After (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Optional inclusive lower publication date bound in ISO YYYY-MM-DD format (e.g., '2023-01-01').",
            "default": ""
          },
          "publishedBefore": {
            "title": "Published Before (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Optional inclusive upper publication date bound in ISO YYYY-MM-DD format (e.g., '2026-12-31').",
            "default": ""
          },
          "sortBy": {
            "title": "Sort Order",
            "enum": [
              "relevance",
              "submittedDate",
              "citations"
            ],
            "type": "string",
            "description": "Result ordering: 'relevance' (default), 'submittedDate' (most recent first), or 'citations' (highest OpenAlex cited_by_count first).",
            "default": "relevance"
          },
          "minCitations": {
            "title": "Minimum Citation Count",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum OpenAlex citation count filter (0 disables filter).",
            "default": 0
          },
          "openAccessOnly": {
            "title": "Open-Access Only",
            "type": "boolean",
            "description": "When true, emit only papers with verified open-access status or direct PDF link.",
            "default": false
          },
          "maxItems": {
            "title": "Max Normalized Papers",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of deduplicated, normalized academic papers to emit (1 to 500).",
            "default": 10
          },
          "includeOpenAlexEnrichment": {
            "title": "Enrich OpenAlex Citation Graph",
            "type": "boolean",
            "description": "Batch-enrich papers with live OpenAlex citation counts, FWCI, ORCIDs, ROR institutions, funding grants, and OA PDF URLs.",
            "default": true
          },
          "deduplicateAcrossSources": {
            "title": "Cross-Source Deduplication",
            "type": "boolean",
            "description": "Merge duplicate papers appearing in both arXiv and PubMed (by canonical DOI or normalized title) into a single unified record.",
            "default": true
          },
          "strictValidation": {
            "title": "Drop Records Failing Integrity Checks",
            "type": "boolean",
            "description": "When true, records failing deterministic identifier, date, or schema integrity checks are skipped instead of billed/pushed.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}