Labrador API Reference
Overview
The Labrador widget loads its studies, Learning Center articles and support programs from the endpoints on this page. You can also call them directly — for example, to build your own trial search page on top of your organization's study list.
Every request is authenticated with an API key from WeTrials Console. The key identifies your organization, so there is no organization parameter: study search, facet values, the widget configuration and the support programs come from your organization's study list and settings.
Table of Contents
- Base URLs
- Authentication
- Conventions
- Study Endpoints
- Widget Configuration
- Support Endpoints
- Learning Center Endpoints
- Errors
- Other Paths
Base URLs
| Environment | Base URL |
|---|---|
| Development | https://api.dev.wetrials.com |
| Production | https://api.wetrials.com |
These are the hosts the widget calls with env: 'development' and env: 'production'. An API key belongs to one environment: a key created in the development environment is not accepted by the production API, and the other way round.
Authentication
Send your API key as the apiKey query parameter on every request:
curl "https://api.wetrials.com/v2/labrador/configuration?apiKey=$WETRIALS_API_KEY"- The key is read from the query string only.
Authorizationandx-api-keyheaders are ignored. - Send
apiKeyonce. A request that repeats it is rejected as an invalid key. - The organization comes from the key; no endpoint takes an organization parameter.
See the API Key Guide for creating a key and restricting where it can be used.
Permissions
A key can be limited to some APIs in WeTrials Console (API restrictions in the API Key Guide). Each endpoint needs one permission:
| Permission | Endpoints |
|---|---|
| Labrador Study | /v2/labrador/study, /v2/labrador/study/facets, /v2/labrador/study/{nctId}, /v2/labrador/configuration |
| Support | /v2/labrador/support, /v2/labrador/support/{entryId} |
| Learning Center | /v2/learning-center/category, /v2/learning-center/entries, /v2/learning-center/entry/{entryId} |
The widget calls all of these endpoints, so a key used by the widget needs all three permissions. Without one, the matching section of the widget cannot load its content.
Conventions
- All endpoints are
GETand return JSON. - Responses carry
Access-Control-Allow-Origin: *, so you can call the API from browser code on any site. To control which sites can use your key, add a website restriction. - Repeat a parameter to send several values:
?phases=PHASE2&phases=PHASE3. Bracket forms such asphases[]=PHASE2orphases[0]=PHASE2are not recognized, and the filter is silently skipped. In JavaScript,URLSearchParams.append()produces the right form. - Languages: the study endpoints take
lngCode(en,es,fr,ko). The Support and Learning Center endpoints takelocale(en-US,es).
Study Endpoints
Search studies
GET /v2/labrador/studySearches your organization's study list. Permission: Labrador Study.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Required. Your API key. |
query | string | — | Free-text search over study titles and descriptions, conditions, keywords, the NCT ID, and facility and contact names. |
page | integer | 1 | Page number, starting at 1. |
limit | integer | 10 | Studies per page, from 1 to 100. page × limit cannot exceed 10,000. |
lngCode | string | en | Language of the study list. es, fr and ko are available only if your organization has a study list published in that language. |
conditions | string | — | One condition, exactly as it appears in the conditions facet. |
state | string | — | One location state, exactly as it appears in the locations.state facet. |
overallStatus | string, repeatable | — | Recruitment status, for example RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING or ENROLLING_BY_INVITATION. |
studyType | string, repeatable | — | INTERVENTIONAL, OBSERVATIONAL or EXPANDED_ACCESS. |
phases | string, repeatable | — | EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4 or NA. |
sex | string, repeatable | — | ALL, FEMALE or MALE — the sexes a study enrolls. To find studies open to women, send both FEMALE and ALL. |
stdAges | string, repeatable | — | CHILD, ADULT or OLDER_ADULT. |
Filter values are ClinicalTrials.gov values and must match exactly. List facet values returns the values present in your study list.
Values of one parameter are combined with OR, and different parameters with AND. For example, overallStatus=RECRUITING&overallStatus=NOT_YET_RECRUITING&phases=PHASE2 returns phase 2 studies that are recruiting or not yet recruiting.
Order without a search or filters
With no query and no filters, each page starts with your featured studies, about half a page at a time, until all of them have been shown (at most 50 take part). Their order is reshuffled every 30 minutes. Pages fetched within one of those periods never repeat or skip a study; paging across a reshuffle can.
Response
| Field | Type | Description |
|---|---|---|
hits | array | The studies on this page. See Study object. |
nbHits | integer | Number of matching studies. |
page | integer | The page returned, counted from 0: a request with page=1 returns "page": 0. |
nbPages | integer | Number of pages at this limit. Pages beyond page × limit = 10,000 cannot be requested, even if this is larger. |
hitsPerPage | integer | The limit used. |
facets | object | Number of matching studies for each filter value, in the shape described in List facet values. |
The response and each study also contain fields from the search engine (such as processingTimeMS, params, objectID and _highlightResult). They are not part of this API.
Study object
| Field | Type | Description |
|---|---|---|
nctId | string | ClinicalTrials.gov identifier. |
title | string | Plain-language title. |
shortDescription | string | Plain-language description in a few sentences. |
briefTitle, officialTitle | string | Titles as registered on ClinicalTrials.gov. |
overallStatus | string | Recruitment status. |
studyType | string | Study type. |
phases | string[] | Trial phases. |
conditions | string[] | Conditions studied. |
keywords, meshKeywords | string[] | Keywords and MeSH terms. |
sex | string | Sexes the study enrolls. |
stdAges | string[] | Age groups the study enrolls. |
minimumEligibilityAge, maximumEligibilityAge | string | Age limits, for example "18 Years". |
enrollmentInfo | object | count and type (ACTUAL or ESTIMATED) of participants. |
locations | array | Study sites: facility, city, state, zip, country, and contacts (name, role). |
isFeatured | boolean | Whether your organization features the study. |
isVerifiedByExperts | boolean | Whether the plain-language text has been reviewed by WeTrials experts. |
Fields with no value are omitted.
Example
curl -G "https://api.wetrials.com/v2/labrador/study" \
--data-urlencode "apiKey=$WETRIALS_API_KEY" \
--data-urlencode "query=glioblastoma" \
--data-urlencode "overallStatus=RECRUITING" \
--data-urlencode "overallStatus=NOT_YET_RECRUITING" \
--data-urlencode "limit=20"const apiKey = 'your-api-key';
const params = new URLSearchParams({
apiKey,
query: 'glioblastoma',
limit: '20',
});
params.append('overallStatus', 'RECRUITING');
params.append('overallStatus', 'NOT_YET_RECRUITING');
const response = await fetch(`https://api.wetrials.com/v2/labrador/study?${params}`);
const { hits, nbHits } = await response.json();Response (shortened; the numbers depend on your study list):
{
"hits": [
{
"nctId": "NCT06448286",
"title": "Glioblastoma Treatment with Advanced MRI Surgery",
"shortDescription": "Surgical removal of glioblastoma using pH weighted CEST MRI is compared with standard surgery. It is for adults with glioblastoma. Both groups receive radiation and temozolomide chemotherapy after surgery.",
"overallStatus": "NOT_YET_RECRUITING",
"studyType": "INTERVENTIONAL",
"phases": ["PHASE3"],
"conditions": ["Glioblastoma"],
"sex": "ALL",
"stdAges": ["ADULT", "OLDER_ADULT"],
"minimumEligibilityAge": "18 Years",
"enrollmentInfo": { "count": 60, "type": "ESTIMATED" },
"locations": [
{
"facility": "UCLA / Jonsson Comprehensive Cancer Center",
"city": "Los Angeles",
"state": "California",
"zip": "90095",
"country": "United States",
"contacts": [
{ "name": "Kunal S. Patel", "role": "CONTACT" },
{ "name": "Kunal S. Patel", "role": "PRINCIPAL_INVESTIGATOR" }
]
}
],
"isFeatured": false,
"isVerifiedByExperts": false
}
],
"nbHits": 295,
"page": 0,
"nbPages": 15,
"hitsPerPage": 20,
"facets": {
"overallStatus": { "RECRUITING": 258, "NOT_YET_RECRUITING": 37 }
}
}List facet values
GET /v2/labrador/study/facetsLists the values present in your study list for each filterable field, with the number of studies that carry each value. Use it to build filter menus and to get exact values for Search studies. Permission: Labrador Study.
| Parameter | Type | Description |
|---|---|---|
apiKey | string | Required. Your API key. |
The values come from your English (en) study list; this endpoint does not take lngCode.
{
"result": {
"overallStatus": {
"RECRUITING": 5910,
"ACTIVE_NOT_RECRUITING": 2896,
"NOT_YET_RECRUITING": 1379,
"ENROLLING_BY_INVITATION": 211
},
"phases": { "PHASE2": 3351, "NA": 2555, "PHASE1": 1834, "PHASE3": 1076, "EARLY_PHASE1": 173, "PHASE4": 134 },
"sex": { "ALL": 6854, "FEMALE": 2048, "MALE": 1520 }
}
}result has one entry for each of conditions, locations.state, locations.country, overallStatus, studyType, phases, sex, stdAges and isFeatured, each listing at most its 100 most common values. locations.country and isFeatured are informational: they cannot be used as search filters.
Get a study
GET /v2/labrador/study/{nctId}Returns one study with its plain-language summary. Any study WeTrials carries can be fetched, not only those in your study list, and the same goes for relatedStudies. Permission: Labrador Study.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
nctId | path | string | — | ClinicalTrials.gov identifier, for example NCT06448286. |
apiKey | query | string | — | Required. Your API key. |
lngCode | query | string | en | Language of the plain-language summary: en, es, fr or ko. |
Response
| Field | Type | Description |
|---|---|---|
simplifiedStudy | object | Plain-language summary in the requested language: shortTitle, shortDescription, summary, eligibility, outcome, armsIntervention and armsInterventionOverview. The longer fields use Markdown (lists, bold text). |
isVerifiedByExperts | boolean | Whether the plain-language summary has been reviewed by WeTrials experts. |
govStudyProtocolSection | object | The study's protocolSection as published by ClinicalTrials.gov (API v2 format), with modules such as identificationModule, statusModule, eligibilityModule and contactsLocationsModule. |
relatedStudies | array | Up to 4 similar studies: nctId, score, title, summary. Can be empty. |
relatedArticles | array | Up to 6 related Learning Center articles: entryId, score, title, type, thumbnailUrl, description. Can be empty. |
Returns 404 with { "message": "Study not found" } when there is no study with this NCT ID, or it has no summary in the requested language.
Widget Configuration
GET /v2/labrador/configurationReturns the widget menu settings your organization manages in WeTrials Console. Permission: Labrador Study.
{
"result": {
"menus": {
"studyFinder": { "enabled": true },
"learningCenter": { "enabled": true, "disabledCategoryEntryIds": [] },
"support": { "enabled": true, "disabledCategoryEntryIds": [] },
"medicalAnalyzer": { "enabled": true }
}
}
}| Field | Description |
|---|---|
menus.<menu>.enabled | Whether the widget shows the menu. |
menus.<menu>.disabledCategoryEntryIds | Learning Center or Support category IDs hidden from the menu. |
An organization that has not changed these settings gets the values shown above: every menu on, and no category hidden.
Support Endpoints
List support programs
GET /v2/labrador/supportLists the patient support programs shown in the widget's Support menu, all in one response. Permission: Support.
| Parameter | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Required. Your API key. |
locale | string | en-US | en-US or es. Any other value returns 500. |
tags | string | — | Comma-separated tag IDs, sent as one parameter (repeating tags returns 500). Returns only programs that carry all of them. Each program lists its tags in tagIds. |
{
"result": [
{
"id": "6QRITKKcp01R19fDHqoOjx",
"title": "Virtual and Local Prostate Cancer Support Groups | ZERO Prostate Cancer",
"associationAbbreviationName": "ZERO360",
"thumbnailUrl": "https://images.ctfassets.net/…/LC_169_Featured__9_.jpg",
"categoryId": "5mk11QY0HDeZSdLWeQO7BB",
"tagIds": ["socialEmotional"],
"createdAt": "2026-08-19T15:05:05.034Z"
}
]
}Programs in categories your organization hides in WeTrials Console are left out. If the Support menu is turned off for your organization, the endpoint returns 404 with { "message": "Not found" }.
Get a support program
GET /v2/labrador/support/{entryId}Permission: Support.
| Parameter | In | Type | Default | Description |
|---|---|---|---|---|
entryId | path | string | — | A program id from the list. |
apiKey | query | string | — | Required. Your API key. |
locale | query | string | en-US | en-US or es. Any other value returns 500. |
Returns { "result": … } with the program in Contentful's entry format: sys, metadata, and fields such as name, description (a Contentful Rich Text document), association, featuredImage, thumbnail and applicationLink.
Returns 404 with { "message": "Not found" } when the program does not exist, its category is hidden for your organization, or the Support menu is turned off.
Learning Center Endpoints
The Learning Center endpoints need the Learning Center permission. Each takes apiKey and an optional locale: en-US (the default) or es. Any other locale returns 500 from List articles and Get an article; List categories falls back to en-US.
These endpoints return the same content to every organization and do not apply your organization's Learning Center settings. The widget hides the menu and categories itself, from Widget Configuration: if you build your own page, skip the categories in menus.learningCenter.disabledCategoryEntryIds, and everything if menus.learningCenter.enabled is false.
List categories
GET /v2/learning-center/category{
"result": [
{
"id": "7Jt9bAp7zsyLHwb6B3oOJU",
"name": "General",
"iconUrl": "https://images.ctfassets.net/…/Frame_1820548947__1_.png",
"order": 0,
"subcategories": [
{ "id": "6lEgcDwXxFexb9oSbwNgxW", "name": "Cancer Awareness", "order": 1 },
{ "id": "4SChONEhQeBUPLPTxpHqHC", "name": "Support Resources", "order": 2 }
]
}
]
}List articles
GET /v2/learning-center/entries| Parameter | Type | Description |
|---|---|---|
categoryId | string | Only articles in this category. |
subcategoryId | string | Only articles in this subcategory. |
Returns { "result": [ … ] }, newest first and all in one response. Each article has id, title, typeId (pageBlogPost, videoPodcast or audioPodcast), categoryId, subcategoryId, thumbnailUrl, duration (videos and podcasts, in seconds), createdAt, createdAtTimestamp, updatedAt and updatedAtTimestamp.
Get an article
GET /v2/learning-center/entry/{entryId}Returns { "result": … } with the article in Contentful's entry format (sys, metadata, fields), or 404 with { "message": "Not found" }.
Errors
Errors from the API key check, and the 400 for a disallowed parameter name, carry an error label and a message. The other errors carry only message.
| Status | Body | Cause |
|---|---|---|
400 | { "message": "Invalid \"limit\" parameter: Too big: expected number to be <=100" } | page or limit is out of range in Search studies. The message names the parameter. |
400 | { "error": "Invalid request", "message": "Request contains a disallowed field name" } | A query parameter name starts with $. |
401 | { "error": "API key is required", "message": "Please provide a valid API key in the apiKey query parameter" } | No apiKey parameter, or an empty one. |
401 | { "error": "Invalid API key", "message": "The provided API key is invalid or inactive" } | The key does not exist, was deleted or is inactive, or apiKey was sent more than once. |
403 | { "error": "API access denied", "message": "This API key does not have permission to access Labrador Study" } | The key's API restrictions do not include the endpoint's permission. |
403 | { "error": "Origin required", "message": "This API key requires a valid origin header" } | The key is restricted to websites, and the request has neither an Origin nor a Referer header — for example, a call from a server or curl. |
403 | { "error": "Domain not allowed", "message": "This API key is not authorized for use from this domain" } | The key is restricted to websites, and the request comes from a site that is not on its list. |
403 | { "error": "IP not allowed", "message": "This API key is not authorized for use from this IP address" } | The key is restricted to IP addresses, and the caller's address is not on its list. |
404 | { "message": "Study not found" } or { "message": "Not found" } | See the endpoint. |
500 | { "message": "Internal Server Error" } | A server error. This includes a lngCode your organization has no study list for, a locale other than en-US or es, and a repeated tags. |
500 | { "error": "Internal server error", "message": "An error occurred while validating the API key" } | The API key could not be checked. |
500 | { "message": "Failed to fetch category information" } | List categories failed. |
See Troubleshooting in the API Key Guide for how to fix the 401 and 403 errors.
Other Paths
Paths under /labrador/ without the /v2 prefix, and other paths the widget calls itself (such as those for its Medical Analyzer and its map images), are not part of this API and are not documented here. Build integrations on the v2 endpoints above.
Last Updated: October 2026 Maintained By: WeTrials Platform Team