apyhub
Back
▣ RETRIEVAL KIT

Clinical Trials Search API

What it does

The Clinical Trials Search API returns matching ClinicalTrials.gov studies from one request. Send a body with query, status, sponsor, location, condition, intervention, and maxItems when you want to narrow the search. status accepts values like RECRUITING and COMPLETED. maxItems is 1 to 100, and its default is 20.

You get a JSON result with the billed rows, the total row count, and a list of study records. Each record can include the study link, NCT ID, title, phases, status, sponsor, countries, start date, study type, conditions, enrollment, last update, interventions, and completion date.

Teams use the Clinical Trials Search API to show trial lists in research apps and internal tools. They also use it to filter studies by sponsor, location, condition, or intervention. The API helps them sort and display trial data without working with the raw ClinicalTrials.gov site.

POST
Clinical Trials Search - ClinicalTrials.gov studies
https://api.eu.apyhub.com/martin10291/clinical-trials-search

QUICKSTART

GUIDE

Quickstart

Search clinical trials by a free-text query. This minimal example sends just the required search body.

curl -X POST "https://api.eu.apyhub.com/martin10291/clinical-trials-search" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query":"obesity"}'

What you'll get back

Returns a JSON object with billed as an integer, count as an integer, and items as an array of trial objects.

Each item may include fields such as url, nctId, title, phases, status, sponsor, countries, startDate, studyType, conditions, enrollment, lastUpdate, interventions, and completionDate.

{
  "billed": 1,
  "count": 1,
  "items": [
    {
      "nctId": "NCT01234567",
      "title": "Study of Semaglutide in Adults With Obesity",
      "status": "RECRUITING"
    }
  ]
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body
Free-text search
Overall status
Sponsor, e.g. Pfizer

About this endpoint

What it does

Searches ClinicalTrials.gov studies using the filters provided in the request body and returns matching study records. The response includes the number of billed units, the total row count, and an array of study items.

Request Body

ParameterTypeMandatoryDescription
queryStringNoFree-text search.
statusENUMNoOverall status. Allowed values: RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, TERMINATED.
sponsorStringNoSponsor, e.g. Pfizer.
locationStringNoLocation, e.g. Germany.
maxItemsIntegerNoMax results. Default: 20. Minimum: 1. Maximum: 100.
conditionStringNoCondition, e.g. diabetes.
interventionStringNoDrug or intervention, e.g. semaglutide.

Response

Returns a JSON object with billed and count integer fields, plus an items array of study objects. Each item includes the study URL, NCT ID, title, phases, status, sponsor, countries, start date, study type, conditions, enrollment, last update, interventions, and completion date.

ParameterTypeMandatoryDescription
billedIntegerYesUnits charged for this call: result rows only; not-found / unavailable / invalid rows are free.
countIntegerYesNumber of rows in items.
itemsObject ArrayYesArray of study records.
items[].urlStringNoStudy URL.
items[].nctIdStringNoClinicalTrials.gov NCT identifier.
items[].titleStringNoStudy title.
items[].phasesString ArrayNoStudy phases.
items[].statusStringNoStudy status.
items[].sponsorStringNoStudy sponsor.
items[].countriesString ArrayNoCountries associated with the study.
items[].startDateStringNoStudy start date.
items[].studyTypeStringNoStudy type.
items[].conditionsString ArrayNoStudy conditions.
items[].enrollmentIntegerNoEnrollment count.
items[].lastUpdateStringNoLast update date.
items[].interventionsString ArrayNoStudy interventions.
items[].completionDateStringNoStudy completion date.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.