# /eudract/trials/search

`POST /api/eudract/trials/search`

Price: 20 credits

Search the EU Clinical Trials Register. Narrows by free text, the member state a trial was authorised in, its status there, trial phase, whether results have been posted, recruited age group and sex, the rare-disease and orphan-product flags, and the date the record was first entered in EudraCT. The register offers no filter on when the trial itself began, so a record first entered in 2020 can belong to a trial that opened years earlier; read `start_date` on each result to narrow on that. Each result carries the register summary of one trial: EudraCT number, title, sponsor, start date, the medical condition with its MedDRA-coded diseases, the recruited population, and the per-member-state protocol status.

## How to use it

This register holds EU trials authorised under the old Directive 2001/20/EC, so a trial applied for from 2022 onwards is on euctis instead unless it was filed here first. `query` also takes the register's own field syntax, so `eudract_number:2007-000570-22` looks one trial up and `sponsor:Amgen` narrows to a sponsor. `rare_disease_only` and `orphan_product_only` are one-way switches: the register applies them when set and ignores the request to invert them. `protocols` is the per-member-state status, and a trial ongoing in one country can be completed in another, so read it rather than assuming one status per trial. Feed `id` to eudract/trials for the full application form and the per-country decisions.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `query` (string, required) — Free text matched across the trial record (examples: "breast cancer", "eudract_number:2007-000570-22"; minLength: 1)
- `country` (string, nullable) — Lowercase ISO-3166 alpha-2 code of the member state the trial was authorised in (examples: "de")
- `status` (string, nullable) — Keep trials holding this status in a member state (one of: "completed", "not-authorised", "ongoing", "prematurely-ended", "prohibited-by-ca", "restarted", "suspended-by-ca", "temporarily-halted", "trial-now-transitioned")
- `phase` (string, nullable) — Keep trials of this phase (one of: "phase-one", "phase-two", "phase-three", "phase-four")
- `results_status` (string, nullable) — Keep trials with or without posted results (one of: "trials-with-results", "trials-without-results")
- `age_group` (string, nullable) — Keep trials recruiting this age group (one of: "in-utero", "preterm-new-born-infants", "newborn", "infant-and-toddler", "children", "adolescent", "under-18", "adult", "elderly")
- `sex` (string, nullable) — Keep trials recruiting subjects of this sex (one of: "both", "female-only", "male-only")
- `rare_disease_only` (boolean) — Keep only trials investigating a rare disease (default: false)
- `orphan_product_only` (boolean) — Keep only trials whose investigational product holds an orphan designation (default: false)
- `first_entered_from` (string, nullable) — Keep trials whose record was first entered in EudraCT on or after this date, YYYY-MM-DD (examples: "2020-01-01")
- `first_entered_to` (string, nullable) — Keep trials whose record was first entered in EudraCT on or before this date, YYYY-MM-DD (examples: "2020-12-31")
- `count` (integer, required) — Number of trials to return (min: 1; max: 600)

## Response

### 200 — Successful Response

- `@type` (string) (default: "EudractSearchTrial")
- `id` (string, required)
- `url` (string) (default: "")
- `sponsor_name` (string, nullable)
- `sponsor_protocol_code` (string, nullable)
- `start_date` (string, nullable)
- `medical_condition` (string, nullable)
- `diseases` (array) (default: [])
  - `@type` (string) (default: "EudractSearchDisease")
  - `term` (string) (default: "")
  - `classification_code` (string, nullable)
  - `level` (string, nullable)
  - `system_organ_class` (string, nullable)
  - `version` (string, nullable)
- `age_groups` (array) (default: [])
- `sexes` (array) (default: [])
- `protocols` (array) (default: [])
  - `@type` (string) (default: "EudractSearchProtocol")
  - `member_state` (string) (default: "")
  - `status` (string) (default: "")
- `member_states` (array) (default: [])

## Errors

### 422 — Validation Error

A date field was not YYYY-MM-DD, or the country was not an EU/EEA member state code.

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

No trial on the register matched that query.

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

