Search Scientific Documents

GEThttps://api.filesearch.dev/v2/datasets/scientific/search

Search PubMed Central open-access articles and ClinicalTrials.gov study records. The same query returns the same list: no model is involved, and results from the two sources are merged in a fixed order.

Every result is a document with full text available. Its download_url fetches that document as markdown from GET /v2/datasets/scientific/documents/{doc_type}/{doc_id}. Send the same Authorization header when following it.

limit applies per source, so a request can return up to twice that many results. When one source fails, results from the other are still returned and the failure is listed in errors.

Query parameters

qstringRequired2-2000 characters

Search query, 2 to 2000 characters.

limitintegerOptional1-25Defaults to 10

Maximum results per source, 1 to 25.

recency_yearsintegerOptional1-50Defaults to 10

Prefer documents from this many years back, where the source supports date filtering. 1 to 50.

Response

Successful Response

querystring

The query that was searched.

errorsmap from strings to stringsOptional

Per-source error messages (empty when all succeeded).

execution_time_msinteger or nullOptional
resultslist of objectsOptional
results_by_sourcemap from strings to lists of objectsOptional

Results grouped by source (pmc, clinicaltrials).

sources_searchedlist of stringsOptional
total_resultsintegerOptionalDefaults to 0

Errors

GET/v2/datasets/scientific/search
import json
import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"

headers = {
    "Authorization": f"Bearer {API_KEY}",
}

response = requests.get(
    f"{BASE_URL}/v2/datasets/scientific/search",
    headers=headers,
    params={"q": "PARP inhibitor BRCA1 breast cancer", "limit": 5, "recency_years": 10},
    timeout=30.0,
)

print(json.dumps(response.json(), indent=2))
200
{
  "query": "PARP inhibitor BRCA1 breast cancer",
  "errors": {},
  "execution_time_ms": 842,
  "results": [
    {
      "download_url": "https://api.filesearch.dev/v2/datasets/scientific/documents/pmc/PMC6503629",
      "type": "pmc",
      "full_text_available": true,
      "journal": "Cancer Research",
      "pmcid": "PMC6503629",
      "title": "PARP inhibitors and homologous recombination deficiency in breast cancer",
      "year": 2024
    },
    {
      "download_url": "https://api.filesearch.dev/v2/datasets/scientific/documents/clinicaltrials/NCT02000622",
      "type": "clinical_trial",
      "full_text_available": true,
      "nct_id": "NCT02000622",
      "phase": "PHASE3",
      "status": "ACTIVE_NOT_RECRUITING",
      "title": "Olaparib as Adjuvant Treatment in Patients With Germline BRCA Mutated High Risk HER2 Negative Primary Breast Cancer"
    }
  ],
  "results_by_source": {
    "pmc": [
      {
        "download_url": "https://api.filesearch.dev/v2/datasets/scientific/documents/pmc/PMC6503629",
        "type": "pmc",
        "full_text_available": true,
        "journal": "Cancer Research",
        "pmcid": "PMC6503629",
        "title": "PARP inhibitors and homologous recombination deficiency in breast cancer",
        "year": 2024
      }
    ],
    "clinicaltrials": [
      {
        "download_url": "https://api.filesearch.dev/v2/datasets/scientific/documents/clinicaltrials/NCT02000622",
        "type": "clinical_trial",
        "full_text_available": true,
        "nct_id": "NCT02000622",
        "phase": "PHASE3",
        "status": "ACTIVE_NOT_RECRUITING",
        "title": "Olaparib as Adjuvant Treatment in Patients With Germline BRCA Mutated High Risk HER2 Negative Primary Breast Cancer"
      }
    ]
  },
  "sources_searched": [
    "pmc",
    "clinicaltrials"
  ],
  "total_results": 2
}
Was this page helpful?