Skip to content

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 ​

  1. Base URLs
  2. Authentication
  3. Conventions
  4. Study Endpoints
  5. Widget Configuration
  6. Support Endpoints
  7. Learning Center Endpoints
  8. Errors
  9. Other Paths

Base URLs ​

EnvironmentBase URL
Developmenthttps://api.dev.wetrials.com
Productionhttps://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:

bash
curl "https://api.wetrials.com/v2/labrador/configuration?apiKey=$WETRIALS_API_KEY"
  • The key is read from the query string only. Authorization and x-api-key headers are ignored.
  • Send apiKey once. 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:

PermissionEndpoints
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 GET and 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 as phases[]=PHASE2 or phases[0]=PHASE2 are 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 take locale (en-US, es).

Study Endpoints ​

Search studies ​

http
GET /v2/labrador/study

Searches your organization's study list. Permission: Labrador Study.

Query parameters ​

ParameterTypeDefaultDescription
apiKeystring—Required. Your API key.
querystring—Free-text search over study titles and descriptions, conditions, keywords, the NCT ID, and facility and contact names.
pageinteger1Page number, starting at 1.
limitinteger10Studies per page, from 1 to 100. page × limit cannot exceed 10,000.
lngCodestringenLanguage of the study list. es, fr and ko are available only if your organization has a study list published in that language.
conditionsstring—One condition, exactly as it appears in the conditions facet.
statestring—One location state, exactly as it appears in the locations.state facet.
overallStatusstring, repeatable—Recruitment status, for example RECRUITING, NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING or ENROLLING_BY_INVITATION.
studyTypestring, repeatable—INTERVENTIONAL, OBSERVATIONAL or EXPANDED_ACCESS.
phasesstring, repeatable—EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4 or NA.
sexstring, repeatable—ALL, FEMALE or MALE — the sexes a study enrolls. To find studies open to women, send both FEMALE and ALL.
stdAgesstring, 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 ​

FieldTypeDescription
hitsarrayThe studies on this page. See Study object.
nbHitsintegerNumber of matching studies.
pageintegerThe page returned, counted from 0: a request with page=1 returns "page": 0.
nbPagesintegerNumber of pages at this limit. Pages beyond page × limit = 10,000 cannot be requested, even if this is larger.
hitsPerPageintegerThe limit used.
facetsobjectNumber 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 ​

FieldTypeDescription
nctIdstringClinicalTrials.gov identifier.
titlestringPlain-language title.
shortDescriptionstringPlain-language description in a few sentences.
briefTitle, officialTitlestringTitles as registered on ClinicalTrials.gov.
overallStatusstringRecruitment status.
studyTypestringStudy type.
phasesstring[]Trial phases.
conditionsstring[]Conditions studied.
keywords, meshKeywordsstring[]Keywords and MeSH terms.
sexstringSexes the study enrolls.
stdAgesstring[]Age groups the study enrolls.
minimumEligibilityAge, maximumEligibilityAgestringAge limits, for example "18 Years".
enrollmentInfoobjectcount and type (ACTUAL or ESTIMATED) of participants.
locationsarrayStudy sites: facility, city, state, zip, country, and contacts (name, role).
isFeaturedbooleanWhether your organization features the study.
isVerifiedByExpertsbooleanWhether the plain-language text has been reviewed by WeTrials experts.

Fields with no value are omitted.

Example ​

bash
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"
javascript
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):

json
{
  "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 ​

http
GET /v2/labrador/study/facets

Lists 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.

ParameterTypeDescription
apiKeystringRequired. Your API key.

The values come from your English (en) study list; this endpoint does not take lngCode.

json
{
  "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 ​

http
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.

ParameterInTypeDefaultDescription
nctIdpathstring—ClinicalTrials.gov identifier, for example NCT06448286.
apiKeyquerystring—Required. Your API key.
lngCodequerystringenLanguage of the plain-language summary: en, es, fr or ko.

Response ​

FieldTypeDescription
simplifiedStudyobjectPlain-language summary in the requested language: shortTitle, shortDescription, summary, eligibility, outcome, armsIntervention and armsInterventionOverview. The longer fields use Markdown (lists, bold text).
isVerifiedByExpertsbooleanWhether the plain-language summary has been reviewed by WeTrials experts.
govStudyProtocolSectionobjectThe study's protocolSection as published by ClinicalTrials.gov (API v2 format), with modules such as identificationModule, statusModule, eligibilityModule and contactsLocationsModule.
relatedStudiesarrayUp to 4 similar studies: nctId, score, title, summary. Can be empty.
relatedArticlesarrayUp 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 ​

http
GET /v2/labrador/configuration

Returns the widget menu settings your organization manages in WeTrials Console. Permission: Labrador Study.

json
{
  "result": {
    "menus": {
      "studyFinder": { "enabled": true },
      "learningCenter": { "enabled": true, "disabledCategoryEntryIds": [] },
      "support": { "enabled": true, "disabledCategoryEntryIds": [] },
      "medicalAnalyzer": { "enabled": true }
    }
  }
}
FieldDescription
menus.<menu>.enabledWhether the widget shows the menu.
menus.<menu>.disabledCategoryEntryIdsLearning 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 ​

http
GET /v2/labrador/support

Lists the patient support programs shown in the widget's Support menu, all in one response. Permission: Support.

ParameterTypeDefaultDescription
apiKeystring—Required. Your API key.
localestringen-USen-US or es. Any other value returns 500.
tagsstring—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.
json
{
  "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 ​

http
GET /v2/labrador/support/{entryId}

Permission: Support.

ParameterInTypeDefaultDescription
entryIdpathstring—A program id from the list.
apiKeyquerystring—Required. Your API key.
localequerystringen-USen-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 ​

http
GET /v2/learning-center/category
json
{
  "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 ​

http
GET /v2/learning-center/entries
ParameterTypeDescription
categoryIdstringOnly articles in this category.
subcategoryIdstringOnly 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 ​

http
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.

StatusBodyCause
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