Life sciences · API guide

Clinical Trial API: Records, Queries, and Research Workflows

Retrieve trial records, understand the returned fields, and plan a research application around the evidence available.

A clinical trial API gives an application access to study records or related clinical information. The ClinicalTrials.gov API v2 is the documented interface for retrieving records from ClinicalTrials.gov. Start with its studies endpoint to search a population of records, inspect the returned fields, and retrieve additional pages as needed.

These records can support trial discovery, research screening, and update tracking. Patsnap Open’s Clinical Trial Search and Clinical Trial Result Search APIs provide another route for applications that need to find trials by drug, target, or disease and retrieve reported results.

Which clinical trial API should you use?

Choose around the source, query fields, and output your application requires. These routes can serve overlapping research needs.

Application need Starting point
Search ClinicalTrials.gov study records ClinicalTrials.gov API v2 study search
Retrieve a known NCT record ClinicalTrials.gov /api/v2/studies/{nctId}
Detect changes in retrieved registry records Periodic retrieval, source-update fields, and comparison with stored records
Search trials using target, drug, disease, or organization filters Patsnap Clinical Trial Search
Inspect reported findings ClinicalTrials.gov posted results where available, or Patsnap Clinical Trial Result Search for its documented result records

For condition or intervention searches, compare the supported fields and returned records against your feature requirements. For a target-led investigation, consider Patsnap’s target filters and clinical-result search operations.

Where to get clinical trial data

The official ClinicalTrials.gov API reference documents the v2 interface. Its study-search endpoint is:

https://clinicaltrials.gov/api/v2/studies

The v2 migration guide also identifies the single-study route, /api/v2/studies/{nctId}. Use the record’s NCT identifier when your application needs to return to a particular study.

Begin with a small public request before building a larger import. The example below was retrieved without an API key; your own application should follow the current service guidance for request handling.

What a trial record can provide

Map fields to the research task before deciding what to store.

Record information Application use
NCT identifier and study title Identify a study and link back to its registry record
Conditions and interventions Screen records against a research question
Overall study status Display the status reported in the record
Study dates Distinguish study milestones from publication or update dates
Record-update information Track the source version reviewed by the application
Results availability Determine whether posted results need to be retrieved and examined

Separate study events, registry updates, and your retrieval time in the data model. They answer different questions. A record downloaded today can describe a study completed years ago.

Make a query and inspect the response

This request searches for asthma-related records and asks for one record per page:

https://clinicaltrials.gov/api/v2/studies?query.cond=asthma&pageSize=1&format=json

On September 11, 2026, the first page returned NCT00962455, titled “Feedback Reports and e-Learning in Primary Care Spirometry.” The following is a shortened projection of fields from that response, retaining their original nesting:

{
  "studies": [
    {
      "protocolSection": {
        "identificationModule": {
          "nctId": "NCT00962455",
          "briefTitle": "Feedback Reports and e-Learning in Primary Care Spirometry"
        },
        "statusModule": {
          "overallStatus": "COMPLETED"
        }
      },
      "hasResults": false
    }
  ]
}

The full response also supplied a nextPageToken. This example demonstrates response structure, not the most recent or most relevant asthma study; returned ordering can change.

Two fields deserve separate treatment: overallStatus described the study as completed, while hasResults was false. Completion status does not itself establish that results are posted in the registry. Nor does the absence of posted registry results establish that no publication exists elsewhere. The study record is the appropriate starting point for further inspection.

Retrieve further pages and retain update context

To continue the same search, take the returned nextPageToken and send it as pageToken with the original query parameters. URL-encode the value when constructing the request.

The sequence is:

  1. Send the search request and read studies.
  2. Save the returned records using their NCT identifiers.
  3. If nextPageToken is present, request the next page using pageToken.
  4. Continue until the response no longer supplies a next-page token.

In the example check, the second page returned NCT00658255. This verified two-page retrieval only; it was not a complete download of the search population.

For recurring retrieval, keep the query, retrieval timestamp, and source-update information. Distinguish a newly encountered record from a newly registered study. If a request fails, preserve the last successful state so a retry does not silently omit or duplicate records.

Turn records into an AI research application

Keep the retrieval and analysis layers distinguishable:

Search request → Registry records → Screening or extraction → Source review

For example, an assistant can help organize supplied records by condition, intervention, or study design, and explain which records appear relevant to a question. The application should retain the NCT identifier with each output so the reviewer can inspect its basis.

For AI-assisted trial screening, useful tasks include:

  • Screening: identify records relevant to the question.
  • Classification: organize reported conditions, interventions, and study designs.
  • Extraction and comparison: present recorded fields with their NCT identifiers and source dates.
  • Review prioritization: flag missing information or differences that warrant inspection.

Keep protocol descriptions separate from reported findings. AI should preserve missing fields, avoid inventing unreported results, and identify when the available record cannot support a clinical conclusion. Check publications separately when registry results are unavailable.

The registry supplies records; the application supplies the screening and analysis layer.

Search trials and clinical findings with Patsnap APIs

ClinicalTrials.gov is a direct starting point for applications built around its registry records. When the feature starts with a target or drug and needs related trials and reported findings, evaluate the research filters and result records available through Patsnap Open.

Patsnap Clinical Trial Search is a REST API with documented research filters, including target, disease, and organization. Clinical result search is a separate operation for locating clinical-result information.

These operations let developers build trial discovery and findings review through the same API catalog. Review the identifiers required by each operation before constructing the queries.

Example: follow a target into clinical evidence

Research question: Which trials are associated with this target, and which reported results should we review?

Target → Trial search → Relevant studies → Clinical-result search → Findings for review

Resolve the target identifier required by the API, retrieve candidate trials, and check their interventions and study scope. Search for relevant result records using the supported filters, then verify study identifiers, populations, and outcomes before linking findings to a trial. The application is responsible for verifying these links between records.

Start with the Clinical Trial Search operation for the required trial filters, then add clinical-result retrieval if the feature needs findings. The Patsnap first-request guide covers authentication and request setup. Retain source identifiers when bringing additional records into your application so cross-source matches can be reviewed.

Frequently asked questions

Does the ClinicalTrials.gov API return results for every study?

Results availability varies by record. Check the results indicator and inspect available result information separately from the study’s overall status.

Can I retrieve one study by its identifier?

The v2 API provides /api/v2/studies/{nctId} for a specific NCT identifier. This is useful when revisiting a study already selected by your application.

Should a research application store the download date or the study-update date?

Store both with clear labels. The download date records when your application retrieved the data; source-update information describes the record you retrieved.

Sources and disclosure

Published by Patsnap. The ClinicalTrials.gov example reflects two public API pages retrieved September 11, 2026. It illustrates fields and pagination, without assessing clinical findings. Patsnap API descriptions are documentation-based; those operations were not executed for this article.

Help us improve

Something wrong, out of date, or missing on this page? Tell us and it goes straight to the team that maintains it.