API Home (BETA)
The ClinicalTrials.gov BETA application programming interface (API) is being made available for beta testing and feedback. After further development, it is intended to replace the current API.
If you are looking for information about clinical studies, please visit ClinicalTrials.gov.

The ClinicalTrials.gov application programming interface (API) provides a toolbox for programmers and other technical users to use to access all posted information on ClinicalTrials.gov study records data. The API is designed for encoding simple and complex search expressions and parameters in URLs. Clicking on query URLs retrieves study records from ClinicalTrials.gov. Use of ClinicalTrials.gov data is subject to these Terms and Conditions.

If you are looking for information about clinical studies, please visit ClinicalTrials.gov.

Documentation

Use the following links to learn about the ClinicalTrials.gov API.
Link Description
API URLs List of info URLs for accessing information about the API and query URLs with parameters.
Query URL Responses Description of information returned by query URLs.
Search Expressions and Syntax Types and syntax of search expressions used in query URLs.
Search Operators List of operators with examples and descriptions of search expressions used in query URLs.
Data Element-to-API Field Crosswalks List of ClinicalTrials.gov data elements and their corresponding API fields.
Study Structure and Fields Organization of API fields within a ClinicalTrials.gov study record and other information.
Search Areas List and description of ways to specify the portions of a study record to search, ranging from multiple API fields (e.g., BasicSearch, ConditionsSearch) to a single field (e.g., Acronym).

Interactive Demonstrations

Use the following demonstrations to explore and develop the three types of query URLs available for accessing different levels of API data from ClinicalTrials.gov.
Query URL Type Description Example
Full Studies Retrieves all content from the first study record returned for a submitted query by default. Returns up to 100 study records per query when the minimum rank and maximum rank parameters are set in a query URL and up to 100,000 records using the Full Studies interactive demonstration. https://ClinicalTrials.gov/api/query/full_studies?expr=heart+attack
Study Fields Retrieves the values of one or more fields from up to 100,000 study records returned for a submitted query by default. Returns up to 1,000 study records per query when the minimum rank and maximum rank parameters are set in a query URL and up to 100,000 records using the Study Fields interactive demonstration. https://ClinicalTrials.gov/api/query/study_fields?expr=heart+attack&fields=NCTId,Condition,BriefTitle
Field Values Retrieves a unique list of values for one study field from all study records returned for a submitted query. https://ClinicalTrials.gov/api/query/field_values?expr=heart+attack&field=Condition