Scientific Research Digest

Scientific Research Digest · GPT アクション

PubMed GPT Search API

API for searching PubMed database and retrieving abstracts using GPT.

  • GET /esearch.fcgisearchPubMedIDs

    Search PubMed for the latest papers and get a list of paper IDs based on a query

  • GET /efetch.fcgifetchAbstracts

    Retrieve abstracts for given PubMed paper IDs. Should run this based on the output of a call to the searchPubMedIDs endpoint.

元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "PubMed GPT Search API",
    "description": "API for searching PubMed database and retrieving abstracts using GPT.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://eutils.ncbi.nlm.nih.gov/entrez/eutils"
    }
  ],
  "paths": {
    "/esearch.fcgi": {
      "get": {
        "description": "Search PubMed for the latest papers and get a list of paper IDs based on a query",
        "operationId": "searchPubMedIDs",
        "parameters": [
          {
            "name": "db",
            "in": "query",
            "description": "Database to search. For PubMed, this should be 'pubmed'.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "pubmed"
            }
          },
          {
            "name": "term",
            "in": "query",
            "description": "Search term(s) or phrase.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "reldate",
            "in": "query",
            "description": "Only return items that are within the last n days. So, to find papers within the last 3 months, use reldate=90",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "retmax",
            "in": "query",
            "description": "Number of records to return.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting mechanism. Either use relevance or pub_date.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "relevance"
            }
          },
          {
            "name": "datetype",
            "in": "query",
            "description": "Datetype. Options are 'mdat' (modification date), 'pdat' (publication date) and 'edat' (Entrez date). Should use pdat in most cases.",
            "required": false,
            "schema": {
              "type": "string",
              "default": "pdat"
            }
          }
        ],
        "deprecated": false
      }
    },
    "/efetch.fcgi": {
      "get": {
        "description": "Retrieve abstracts for given PubMed paper IDs. Should run this based on the output of a call to the searchPubMedIDs endpoint.",
        "operationId": "fetchAbstracts",
        "parameters": [
          {
            "name": "db",
            "in": "query",
            "description": "Database to retrieve abstracts from. Should be 'pubmed'.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "pubmed"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "List of PubMed IDs to retrieve abstracts for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "retmode",
            "in": "query",
            "description": "Return mode. Use 'text' in most cases to avoid response too large errors.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rettype",
            "in": "query",
            "description": "Return type. Use 'abstract' in most cases since these are useful in providing summaries.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {}
  }
}