This is a reference guide for the Lilly Clinical Open Innovation API (LCOI-API). It is divided into these sections: Getting Started Trial Resource API Requests Topic Catalog API Requests Appendix
Getting Started
Resource Overview
- All resources are accessed using HTTP
- Our server is located at http://api.lillycoi.com
- This document is for Version 1 of the api, which is read-only: http://api.lillycoi.com/v1/
- All responses are formatted as JSON
- Some resources support JSON that is specially formatted for use by the MIT Exhibit application. ClinicalCollections.org is an example Django and JS app that consumes the exhibit format.
- Status codes that any resource may return are listed here: Common Status Codes. Codes that are specific to a resource are listed in the documentation for that resource.
- When making requests to the API server, values that you supply are shown in italics.
Clinical Trial Resources
- The information returned by this resource is sourced from NIH clinicaltrials.gov registry. The data is refreshed daily.
- The responses are augmented with additional data such as geo-spacial location data, and ranges for dates and ages.
- Trials resources can be requested via search, list, or by trial id.
- Each resource has a description, URL, HTTP methods, parameters, formats, authentication, limits, examples, and specific status codes.
- See appendix for details on augmented data added to responses by Lilly COI.
/trials
Description
- This endpoint will return all trials.
Resource URL
http://api.lillycoi.com/v1/trials.{format}
HTTP Methods
- GET
Parameters
limit
: (optional, number, default: 10 )
- limits the number of results returned
- example: limit=20
offset
: (optional, number, default: 0 )
- determines where to begin getting data
- example: offset=23
fields
: (optional, string of comma separated fields names, defaults to all fields)
- the response will be constrained to only the fields listed in this parameter. NOTE: only top-level fields will be targeted.
- see the appendix for a list of fields that can be supplied in this parameter
- example for .json request: fields=id,location
Formats
.json
.exhibit
Authentication Required: No
Rate Limit: No Limit
Example Usage
http://api.lillycoi.com/v1/trials.json
http://api.lillycoi.com/v1/trials.json?limit=50
http://api.lillycoi.com/v1/trials.json?offset=20&limit=100
http://api.lillycoi.com/v1/trials.json?offset=20&limit=100&fields=id,location
/trials/{id}
Description
- This endpoint will return a single trial
- {id} is an NCT identifier from clinicaltrials.gov
Resource URL
http://api.lillycoi.com/v1/trials/{id}.{format}
HTTP Methods
- GET
Parameters
fields
: (optional, string of comma separated fields names, defaults to all fields)
- the response will be constrained to only the fields listed in this parameter. NOTE: only top-level fields will be targeted.
- example for .json request: fields=id,location
Formats
.json
.exhibit
Authentication Required: No
Rate Limit: No Limit
Example Usage
http://api.lillycoi.com/v1/trials/NCT00552448.json
http://api.lillycoi.com/v1/trials/NCT00552448.json?fields=id,overall_status,location
/trials/search
Description
- This endpoint performs a search against trial data. If the provider parameter is passed (i.e.: provider=ctgov), the search is performed on that provider’s servers and returns IDs to get from our database.
- See appendix for details on the clinicaltrials.gov search engine.
Resource URL
http://api.lillycoi.com/v1/trials/search.{format}
HTTP Methods
- GET
Parameters
query
: (required, a string query )
- the query to execute on a search provider
- the query syntax is provided in the provider’s query language (See appendix for details on the clinicaltrials.gov search engine.)
- for clinicaltrials.gov, by default only the first 20 results are returned; to get more, include ‘count’ in the query, which represents the maximum number of trials to return from the query
- example: query=cond:spondylitis,recr:open,count:500
provider
: (optional, one of: ‘ctgov’, default: ctgov )
- determines which search provider to use
- for this version of the API the clinicaltrials.gov search engine is the only one available
- example: provider=ctgov
fields
: (optional, string of comma separated fields names, defaults to all fields)
- the response will be constrained to only the fields listed in this parameter. NOTE: only top-level fields will be targeted.
- example for .json request: fields=id,location
limit
: (optional, number, default: 20 )
- limits the number of results returned
- example: limit=30
offset
: (optional, number, default: 0 )
- determines where to begin getting data
- example: offset=12
Formats
.json
.exhibit
Authentication Required: No
Rate Limit: No Limit
Example Usage
http://api.lillycoi.com/v1/trials/search.json?query=cond:spondylitis,recr:open,count:500
http://api.lillycoi.com/v1/trials/search.json?query=cond:spondylitis,recr:open,count:500&fields=id,location
http://api.lillycoi.com/v1/trials/search.json?query=cond:spondylitis,recr:open,count:500&fields=id,location&offset=30&limit=10
Topic Resources
- The Topics resources are cloned from the clinicaltrials.gov Topics taxonomy.
- See http://clinicaltrials.gov/ct2/search/browse
/studytopics/categories
Description
- This endpoint will return the root categories
Resource URL
http://api.lillycoi.com/v1/studytopics/categories.{format}
HTTP Methods
- GET
Parameters
- none
Formats
.json
Authentication Required: No Rate Limit: No Limit Example Usage
http://api.lillycoi.com/v1/studytopics/categories
/studytopics/categories/{parent_id}
Description
- This endpoint will return the sub categories of the passed parent category
Resource URL
http://api.lillycoi.com/v1/studytopics/categories/{parent_id}.{format}
HTTP Methods
- GET
Parameters
- none
Formats
.json
Authentication Required: No Rate Limit: No Limit Example Usage
http://api.lillycoi.com/v1/studytopics/categories/conditions
Appendix
Common Status Codes
Status Code | Description |
---|---|
200 | Request succeeded with no error |
404 | url is not found |
500 | Request failed with an error |
Augmented Data
- We copy data from clinicaltrials.gov into the LCOI repository. We do not modify the values in this data for the .json responses.
- Some data in the .exhibit responses are formatted with html to support layout.
- We augment clinicaltrials.gov data with the following geographic data:
Lilly COI Data | Format | Derived from | Type | Description |
---|---|---|---|---|
.location.geodata.latitude | .json | ct.gov facility address | float | Latitude (city level) |
.location.geodata.longitude | .json | ct.gov facility address | float | Longitude (city level) |
.location.geodata.original | .json | N/A | string | Data sent to the geo-encoding service |
.location.geodata.formatted | .json | N/A | string | formatted version of the “original” field |
location_latlong | .exhibit | ct.gov facility address | array of strings | latitude/longitude coordinate (city level) |
When we inject CT.gov data into the LCOI repository, the following fields are added or enhanced by LCOI in support of Exhibit facets and views:
.exhibit field | comments |
---|---|
primary_outcomes | formatted w/ HTML by LCOI |
pubmed_links | formatted w/ HTML by LCOI |
results_links | formatted w/ HTML by LCOI |
secondary_outcomes | formatted w/ HTML by LCOI |
study_design | CT.gov string converted by LCOI to json array |
completion_date_iso8601 | added by LCOI when injected to LCOI repository |
completion_date_range | added by LCOI when injected to LCOI repository |
ctgov_results_link | added by LCOI when injected to LCOI repository |
duration_months | added by LCOI when injected to LCOI repository |
eligibility_maximum_age_range | added by LCOI when injected to LCOI repository |
eligibility_minimum_age_range | added by LCOI when injected to LCOI repository |
enrollment_range | added by LCOI when injected to LCOI repository |
has_results | added by LCOI when injected to LCOI repository |
last_changed_iso8601 | added by LCOI when injected to LCOI repository |
last_injected | added by LCOI when injected to LCOI repository |
location_latlong | added by LCOI when injected to LCOI repository |
primary_completion_date_iso8601 | added by LCOI when injected to LCOI repository |
primary_completion_date_range | added by LCOI when injected to LCOI repository |
start_date_iso8601 | added by LCOI when injected to LCOI repository |
start_date_range | added by LCOI when injected to LCOI repository |
type_name | added by LCOI when injected to LCOI repository |
start_date_range | added by LCOI at http request time |
completion_date_range | added by LCOI at http request time |
primary_completion_date_range | added by LCOI at http request time |
clinicaltrials.gov Search Engine
- See clinicaltrials.gov/ct2/help/help for explanation of CT.gov’s search engine
- We pass search queries to the CT.gov server. If their service is down, then LCOI API searches will fail as well.
- The API uses a slightly different syntax for search expression. Search terms are separated by comma’s instead of the & sign. Our API uses a colon in place of the = sign. Here is an example illustrating the syntactical differences:
Top Level Fields
- NIH has a page with definitions for data that we have sourced from their clinicaltrials.gov registry.
- The data returned in trial responses can be constrained to specific top-level fields in .json and .exhibit Trial responses.
- The LCOI .json format mimics the CT.gov XML schema
Here are the top-level fields for the .json format responses:
.json Top-level Fields | Type | Source |
---|---|---|
acronym | string | CT.gov |
arm_group | array | CT.gov |
attributes | array | CT.gov |
biospec_descr | object | CT.gov |
biospec_retention | string | CT.gov |
brief_summary | object | CT.gov |
brief_title | string | CT.gov |
clinical_results | object | CT.gov |
completion_date | string | CT.gov |
condition | array | CT.gov |
condition_browse | object | CT.gov |
detailed_description | object | CT.gov |
eligibility | object | CT.gov |
end_date | string | CT.gov |
enrollment | object | CT.gov |
firstreceived_date | object | CT.gov |
firstreceived_results_date | string | CT.gov |
has_expanded_access | string | CT.gov |
id | string | CT.gov |
id_info | object | CT.gov |
intervention | array | CT.gov |
intervention_browse | object | CT.gov |
is_fda_regulated | string | CT.gov |
is_section_801 | string | CT.gov |
keyword | array | CT.gov |
last_injected | string | LCOI |
lastchanged_date | object | CT.gov |
link | array | CT.gov |
location | array | CT.gov |
location_countries | object | CT.gov |
number_of_arms | string | CT.gov |
number_of_groups | string | CT.gov |
official_title | string | CT.gov |
overall_contact | object | CT.gov |
overall_contact_backup | object | CT.gov |
overall_official | array | CT.gov |
overall_status | string | CT.gov |
oversight_info | object | CT.gov |
phase | string | CT.gov |
primary_completion_date | object | CT.gov |
primary_outcome | array | CT.gov |
reference | array | CT.gov |
removed_countries | object | CT.gov |
required_header | object | CT.gov |
responsible_party | object | CT.gov |
results_reference | array | CT.gov |
secondary_outcome | array | CT.gov |
source | string | CT.gov |
sponsors | object | CT.gov |
start_date | object | CT.gov |
study_design | string | CT.gov |
study_type | string | CT.gov |
verification_date | object | CT.gov |
why_stopped | string | CT.gov |
Here are the top-level fields for the .exhibit format responses:
.exhibit Top-level Fields | Type | Source |
---|---|---|
acronym | string | CT.gov |
alt_link | string | CT.gov |
arm_groups | array | CT.gov |
biospec_description | string | CT.gov |
biospec_retention | string | CT.gov |
brief_summary | string | CT.gov |
cities | array | CT.gov |
collaborators | array | CT.gov |
completion_date | string | CT.gov |
completion_date_iso8601 | string | LCOI |
completion_date_range | string | LCOI |
completion_date_type | string | CT.gov |
condition_mesh_terms | array | CT.gov |
conditions | array | CT.gov |
countries | array | CT.gov |
ctgov_results_link | string | LCOI |
detailed_description | string | CT.gov |
duration_months | num | LCOI |
eligibility_criteria | string | CT.gov |
eligibility_gender | string | CT.gov |
eligibility_healthy_volunteers | string | CT.gov |
eligibility_maximum_age_range | string | LCOI |
eligibility_maximum_age_years | num | CT.gov |
eligibility_minimum_age_range | string | LCOI |
eligibility_minimum_age_years | num | CT.gov |
eligibility_sampling_method | string | CT.gov |
eligibility_study_population | string | CT.gov |
enrollment | num | CT.gov |
enrollment_range | string | LCOI |
enrollment_type | string | CT.gov |
funded_by | string | CT.gov |
has_expanded_access | string | CT.gov |
has_results | string | CT.gov |
has_results | string | LCOI |
health_authorities | array | CT.gov |
id | string | CT.gov |
intervention_mesh_terms | array | CT.gov |
intervention_types | array | CT.gov |
interventions | array | CT.gov |
is_fda_regulated | string | CT.gov |
is_section_801 | string | CT.gov |
keywords | array | CT.gov |
label | string | CT.gov |
last_changed | string | CT.gov |
last_changed_iso8601 | string | LCOI |
last_injected | string | LCOI |
lead_sponsor | string | CT.gov |
lead_sponsor | string | CT.gov |
location_latlong | array | LCOI |
locations | array | CT.gov |
nct_id | string | CT.gov |
number_of_arms | num | CT.gov |
official_title | string | CT.gov |
org_study_id | string | CT.gov |
overall_contact_backup_email | string | CT.gov |
overall_contact_backup_last_name | string | CT.gov |
overall_contact_backup_phone | string | CT.gov |
overall_contact_backup_phone_extension | string | CT.gov |
overall_contact_email | string | CT.gov |
overall_contact_last_name | string | CT.gov |
overall_contact_phone | string | CT.gov |
overall_contact_phone_extension | string | CT.gov |
overall_officials | array | CT.gov |
overall_status | string | CT.gov |
primary_completion_date | string | CT.gov |
primary_completion_date_iso8601 | string | LCOI |
primary_completion_date_range | string | LCOI |
primary_completion_date_type | string | CT.gov |
primary_measures | array | CT.gov |
primary_outcomes | array | CT.gov formatted w/ LCOI HTML |
pubmed_links | array | CT.gov formatted w/ LCOI HTML |
responsible_party_name_title | string | CT.gov |
responsible_party_organization | string | CT.gov |
results_links | array | CT.gov formatted w/ LCOI HTML |
secondary_id | array | CT.gov |
secondary_measures | array | CT.gov |
secondary_outcomes | array | CT.gov formatted w/ LCOI HTML |
start_date | string | CT.gov |
start_date_iso8601 | string | LCOI |
start_date_range | string | LCOI |
states | array | CT.gov |
study_design | array | CT.gov string converted by LCOI to array |
study_phase | string | CT.gov |
study_type | string | CT.gov |
type_name | string | LCOI |
url | string | CT.gov |
why_stopped | string | CT.gov |
Pingback: LCOI-API Series: Introducing the Lilly Clinical Open Innovation API « lillycoi
Pingback: LCOI-API Series: Introducing the Lilly Clinical Open Innovation API « lillycoi
Pingback: LCOI-API Series: Features – JSON and on… « lillycoi
Hello, My name is GOPINATH and I work for Merck & CO. I am trying out the API’s, it works great, however I always get null for clinical_results. I know this trial has data in clinicaltrial.gov and I am not sure whether I am using the API wrong or the clinical_results does not work. Please let me know either way how can I access clinical_results using this API. I checked with few other trials as well for which I know clinicalrials.gov has results.
Regards
GOPI
http://api.lillycoi.com/v1/trials/search.json?query=id:NCT00092677,count:20&fields=id,clinical_results
Gopi, thank you for your interest in our API. The clinical_results element in the clinicaltrials.gov XML schema is very new (see http://clinicaltrials.gov/ct2/html/images/info/public.xsd). At this time it appears that while the clinical_results element is present in the schema, the data is not being provided in the XML view of the trial (which is how we get the data). I have reached out to my contact at clinicaltrials.gov to see if we can get an update on this and will relay any pertinent info I get.
Regards,
Dave
Gopi, we have discovered that clinicaltrials.gov does indeed provide study results in XML (see http://clinicaltrials.gov/ct2/resources/download), but we are currently not downloading that data. We will look into what it will take to import this data and make it available through our API.
Thanks,
Dave
Hello David, Thanks for your response. I am using ClinicalTrials.gov and I can consistently see the data in clinical_results for the trials which says “has results” in the XML. We have developed an application using Clinical Trials.gov data directly, and so far I have not encountered any situation where the trial says “has results” and there is no data in clinial_results.
We wanted to switch over and start using lilly api due to the the additional attributes to add to the dataset. I am trying a small POC to see what it would take to switch over and thatz how I noticed it.
I am attaching 3 example trials, they all have clinical results in the xml.
http://clinicaltrials.gov/show/NCT00462748?resultsxml=true
http://clinicaltrials.gov/show/NCT00654628?resultsxml=true
http://clinicaltrials.gov/show/NCT00783263?resultsxml=true
Regards
GOPI
Yes, you are right. I have checked and we are currently pulling data from clinicaltrials.gov without the results. We will look into seeing what it will take to include the results data. Thank you for bringing this to our attention.
Regards,
Dave
Gopi, we have just pushed an update to our API that now includes the clinical results data. Can you please take a look and see if it is working as you expect? Thank you.
Dave, Thanks I checked it and it works
Regards
GOPI
Glad to hear it works for you, Gopi. Thanks again for your feedback!
Hi GOPI – any chance you might be working with or know of Greg T. at Merck? Just curious. He and I chatted a bit at the DPharm conference in Boston and I was curious whether your effort might be connected to Greg in any way. If so, please pass along greetings. Thanks for taking an interest in the API and please do feel free to let us know of ways it might be improved.
Hello Jerry, Yes I know him well. Gregg is aware of this work and he is helping me to stand in a framework for this development
Regards
GOPI
Thanks much GOPI – please do pass on my best wishes. I’d welcome a reconnection with Gregg at some point, as he was just getting started when we chatted. And, if there’s anything we might collaborate on we’re certainly open to that.
Hello Jerry and Dave, Using your API I have developed an IPAD app and I wanted to share and collect your feedback, I also wanted to discuss further on Clinical Collections, Can you please send your official email through which I can contact you ?
REgards
GOPI
HI GOPI! We’re very excited to learn more about the IPAD app and to have the discussion on Clinical Collections. If you could send a quick e-mail to coi@Lilly.com I’ll send along a response from my official Lilly e-mail that we can use to coordinate the discussions. Thanks for sharing!
Pingback: App Lab: Ideas that Matter « lillycoi
Pingback: Bigger Data Leaner Pharma - Strata
Hi guys, just a little bug report, the fields parameter for the /trials/{id} endpoint as documented above seems not to work, all fields are returned. Example: http://api.lillycoi.com/v1/trials/NCT00462748.json&fields=id,location However http://api.lillycoi.com/v1/trials/search.json?query=id:NCT00462748,count:1&fields=id,location
works fine and achieves the same thing. Just starting to tinker with this, thanks for what you’ve done here.
Gregory,
Thanks for your interest in our API. The first URL you provided is malformed. If you use a question mark instead of an ampersand, it will work correctly — http://api.lillycoi.com/v1/trials/NCT00462748.json?fields=id,location
Let us know if we can of any more assistance.
That’s what I get for copying and pasting instead of thinking; but note that the example in your documentation above makes the same error. Thanks!
Ah yes, you are right. So WE had the malformed URL. I have updated the document accordingly, and also used a real example trial that better shows how the filtering works. Thanks for bringing this to our attention!
Pingback: 2013 Open Source Convention « lillycoi
Pingback: Open Innovation Meets Visualization « lillycoi
Pingback: Clinical Trial Redesign Challenge Finalists Selected – Vote Now! « lillycoi
Do you have any plans to support searches which would compare to CT.gov’s RSS feed? Currently, I can create an RSS feed out of an arbitrary search scoped to condition “Show studies that were added or modified in the last 14 days”.
This is useful for keeping my local data in sync with CT; ideally, I just want to poll for all studies which were changed in the n hours since the last sync.
Thanks for the great work!
Thanks for your interest in our API. At this time we do not have any plans to support searches against the clinicaltrials.gov RSS feed. We have found that there are some changes made to trials that are not reflected in the RSS feed (although few), so we are doing a full compare on a daily basis (note the clinicaltrials.gov site updates its data once a day). But your question is helpful to know there is interest in such information. Our team will discuss this for future possibilities.
You may also be interested in our Follow Clinical application that allows you to subscribe to changes to a particular search against clinicaltrials.gov. It is not designed to subscribe to all trial changes, but for particular conditions or interventions. You can also subscribe to your “follows” via RSS.
Thanks again!
Hello, My name is Kate Lau and I am working for my challenge on the Patient Engagement Project.
I am trying out the API’s (get a list of clinical trials, get clinical detail by ID), it works great. However, I am trying to query an impact explanation of a specific clinical trial and a detail description of the treatment, However I can not find out any relevant information on the clinical detail.
I am not sure whether I am using the API wrong or the impact and detail description of the treatment does not store on clinical.gov. Please let me know either way how can I access to any information relevant to impact and detail description of the treatment/ trial by using this API.
Regards
Kate.
Hi Kate. It is quite possible that the impact and detail description of the treatment is not available in Clinicaltrials.gov. A suggestion would be to query using the same NCTID (the unique ClinicalTrials.gov identifier) for the trial you are interested in directly from Clinicaltrials.gov web-site, and then compare the results with what is returned from the API. If you find the data you need from the ClinicalTrials.gov directly but can’t find it in the API then we know there’s an issue with the API. Please give this a try, and let us know what you find. It there is an API issue I’ll pass the issue on to our technical team when they return in the New Year.
Hi Jerry,
Thank for your suggestion. I have made a search clinical trial detail by Lilly API and ClinicalTrial.gov. The search results is really different . The Detail Description, Eligibility, Location are available on ClinicalTrial.gov, but not available on the Lilly API’s result.
Please refer to http://api.lillycoi.com/v1/trials/NCT00843700.json
and http://clinicaltrials.gov/ct2/show/NCT00843700?term=Effectiveness+of+IPT+Adapted+for+Depressed+Women+With+Trauma+Histories+in+a+Community+Mental+Health+Center&rank=1
Thank for any advice. and Happy New Year !
Hi Kate,
Happy New Year! It looks like the data retrieved does match what’s in CT.gov. Although he data is returned in JSON format (as the API enables), the data is the same. As example, search for “eligibility” (or the other attributes you mention) in the link you shared to the returned data from the API and you’ll see the data matches what’s on the CT.gov page. Here are two blog posts that give a little more info about the API ( http://portal.lillycoi.com/2012/07/10/lcoi-api-series-introducing-the-lilly-clinical-open-innovation-api/ and http://portal.lillycoi.com/2012/07/20/lcoi-api-series-features-json-and-on/ ). We’ll have folks in the office next week who can help provide a bit more guidance if you like. Still, I wanted to share that the links you shared confirm that the data is the same. Hope this helps some!
Hi Jerry,
Thank you so much , now I got the same data in Detail Description, Eligibility, Location. Your suggested links are really helpful. Again, thank you very much.
Hello,
One quick question, do you support the API to update/retrieve schedule with health provider/ researcher? Thank in advance
Hello Kate. No, our API does not manage schedules for the investigator sites. At this time we only reflect the information that was provided to clinicaltrials.gov. For investigator sites this includes facility and contact information.
Hi Davecrumbacher, thank for your prompt response.
Hi,
we are testing the API and we are trying to search by country or state besides the condition or others fields, but we don’t know how do we have to build the GET request.
If we search only by disease (e.g. fabry disease) and status (open) we use http://api.lillycoi.com/v1/trials/search.json?query=cond:fabry,recr:open. How can we add here the country or state fields?
Thanks.
Hi Roger. The terms used for filtering by country and state are a little tricky. We are using the same terms that clinicaltrials.gov uses in their advanced search — http://clinicaltrials.gov/ct2/search/advanced, but applying them to the format of our API.
For example, to limit your example to studies in Germany, it would be http://api.lillycoi.com/v1/trials/search.json?query=cond:fabry,recr:open,cntry1=EU%3ADE. If you wanted to filter by a US state, say California, it would be http://api.lillycoi.com/v1/trials/search.json?query=cond:fabry,recr:open,state1=NA%3AUS%3ACA. You can get the values for the various countries and states by viewing the source of the clinicaltrials.gov advanced search page. Look for the select elements with ID “Country1”, “State1”, “Country2”, “State2”, etc. and see the values of the options elements within each.
Note the %3A is a URL encoded colon, which is necessary because a colon is a reserved character in our API.
I hope this helps. Let us know if you need any additional assistance. Thanks for using our API!
Pingback: LCOI-API: Clinical Trial Innovation In The Healthcare Ecosystem « lillycoi
Pingback: Partnerships in Clinical Trials Conference Preview « lillycoi
Hi,
Thanks for all of your work.
Under the .exhibit query, in the “primary_outcomes” field, there is a key named “SI”. What does this acronym mean? Is there any standard field that indicates if the outcome of a study was positive or negligible?
Thanks for your question. “SI” stands for safety issue. This is a field provided by clinicaltrials.gov. Here is the help text they provide on this field — http://clinicaltrials.gov/ct2/help/safety_issue.
To our knowledge, there is no specific field indicating study results such as “positive or negligible”. There are, however, two fields in the data available through our API that may be helpful:
1. A Lilly COI derived field indicating whether or not results have been posted (“has_results”)
2. The associated clinicaltrials.gov link for viewing results (“ctgov_results_link”)
Here is an example using our ClinicalCollections application that makes use of these two fields for filtering on results and providing links to the results:
http://www.clinicalcollections.org/trials/viewer?phase=1&cond=ALS&title=Advanced%20Search%20%3E%20ALS%20Phase%20II#has_results=Yes&view=view_outcomestable
Let us know if you have any other questions. Thanks for using our API!
Pingback: Bringng Clinical Trials To the ePatient « lillycoi
Pingback: Partnerships in Clinical Trials Wrap-Up « lillycoi
Pingback: Meet Tyler Trueg, our Patients 2 Trials Consortium Project Lead « lillycoi
Thanks so much for this wonderful resource! We’ve been using your API, and had a few questions about how often it’s updated, and which studies were included in the results from ClinicalTrials.gov and which are not.
For example, a “completed” trial from May 25 that appears on ClinicalTrials.gov (like this study: http://clinicaltrials.gov/ct2/show/NCT02152865) returns no results from your API (http://api.lillycoi.com/v1/trials/NCT02152865.json) whereas a different “completed” study from on the same day (http://clinicaltrials.gov/ct2/show/NCT02149979) returns perfect results from your API (http://api.lillycoi.com/v1/trials/NCT02149979.json)
Do you have a certain selection criteria for which studies you include and which you don’t? Any information would be very helpful! Thanks and all the best.
Hi erin – thank you for using the API, and for your questions. We do include all studies from ClinicalTrials.gov, and update nightly any changes made to the source CT.gov data. However – you’ve helped us identify a problem we are having with our update process. Our technical team is on it, and we expect to have this problem addressed today. Thank you so much for bringing this problem to our attention! We’ll report back here when the problem is solved.
Thanks so much Jerry! That would be amazing. You guys are awesome!
erin (and all!) – We have addressed the problem, and all should be well now. Please do let us know if we may be of assistance. Again, thank you for letting us know!
Fantastic! Thanks so much for your incredibly fast response. This really is a wonderful API, thanks for taking such good care of it!
Hi again Jerry! Just wondering – is your code open source? If so, where might it be available?
Hi erin (and all). The API code is not open source currently. We’re in process of working through our long term strategy, while continuing to forge ahead with some nearer term advances in the API. We’ll be sharing more as we evolve on these fronts.
Pingback: Clinical Trials – There’s An App For That! « lillycoi
1. Is there a nomenclature (dictionary of conditions) that could be shown to users as a drop down (ajax) when searching for conditions such lung cancer.
2. Same for location? That is when one enters the first few letters, choices show up.
3. Also how to use distance from a zip code or location as a search/filtering criteria?
Hello Autl. Thanks for your interest in our API. We do extract study topics from clinicaltrials.gov that may help. See the “studytopics” section on this reference page for more info. You can do a simple filter on the results by adding a “filter=” query parameter, e.g.:
http://api.lillycoi.com/v1/studytopics/links/conditions?filter=lung
Use the “callback=” parameter to wrap the result as a JSONP callback.
As for your last two questions, we actually developed a sample app that demonstrates these features — http://trials4me.lillycoi.com. This app actually has its own API that includes these two features:
1. Cities: http://trials4me.lillycoi.com/cities/us/ and http://trials4me.lillycoi.com/cities/ous/. It will return a maximum of 10 results that match the string. So the more characters you provide, the better the results will be of course. Note these results come from a cities database (http://download.geonames.org/export/dump/cities1000.zip) for the purpose of the Trials4Me app. They are not associated with the actual cities in the clinicaltrials.gov data.
2. Proximity: http://trials4me.lillycoi.com/near?query=&lat=&lng=&mi=. It will return the trials that have locations within the radius of the location specified, arranged by location. You can use km instead of mi to specify kilometers for the radius. The query parameter uses the same format as the trials API described on this page (see /trials/search endpoint). For example:
http://trials4me.lillycoi.com/near?query=cond:asthma,recr:open&lat=41.85&lng=-87.65&mi=300
Also, instead of providing lat/lng coordinates, you can provide an address, e.g.:
http://trials4me.lillycoi.com/near?query=cond:asthma,recr:open&addr=1600+Pennsylvania+Avenue+NW,Washington,+DC+20500&mi=300
A couple notes:
1. All of these API calls can be wrapped with JSONP by adding the “callback=” parameter.
2. The API at trials4me.lillycoi.com is only a sample. While the data is updated daily, it is not supported and performance may vary depending on how it is called.
I hope this helps. Let us know if you have any further questions.
Dear Dave, Greatly appreciate for your response. At http://api.lillycoi.com searching by long/lat is unavailable while at http://trials4me.lillycoi.com, data related to eligibility/etc is unavailable. How do we access access the data points comprehensively?
Atul, you are correct. The Trials4Me app provides limited trial information in its API. At this time there isn’t a single API to do what you want, but what you could do is mash up the two APIs, keyed on NCT ID. i.e. once you do the Trials4Me API call, you can use the resulting NCT IDs to call the main trials API to get the eligibility/etc info.
Hello Dave, Greatly appreciate your feedback!
1. How do we get around the problem of having to make multiple calls? For example for retrieving 10 records we end up making 11 calls. Which significantly degrades performance.
2. Would one way be for you to club the additional information in your trials4me api or for you to allow /trials/{id} API to accept multiple NCT IDs?
3. Furthermore, does triials4me API support offset and limit?
Have a great weekend! Hopefully its as nice in Indiana as it is on Long Island. Cheers.
Atul, you can retrieve multiple NCT IDs using our trials API by passing through a query to clinicaltrials.gov. For example:
http://api.lillycoi.com/v1/trials/search?query=id:NCT02017795+OR+NCT01446315+OR+NCT00688792+OR+NCT02091869+OR+NCT01461642&fields=id
I believe clinicaltrials.gov supports up to 50 NCT IDs using this approach.
The Trials4Me API does not support offset and limit at this time, as it was developed primarily for the Trials4Me web application instead of being used as a “first class” API.
I hope this helps. Thanks again for your interest in our work.
Pingback: Helping Patients Connect to Trials by Sharing Better Information « lillycoi
Pingback: Infographic: What is ClinicalTrials.gov? « lillycoi
Pingback: What is an API and why is it important in Healthcare? - Doctrly
Pingback: Our Social Journey Winds Through Medicine X « lillycoi
Pingback: What is an API and why is it important in Healthcare? | Doctrly
Hello Dave,
This is Sourabh on behalf of Atul. As you said we’re using trials4me api for Proximity search of clinical trial.It was working fine but today it stopped working as expected and giving no results. It is also not working on http://trials4me.lillycoi.com/ . Please let me know if you have modified your api.
Hello Sourabh. We too see this problem and are looking into it. I will let you know when we have an update.
Sourabh, the problem has been resolved, so the API is now working again. Please let us know if you have any questions. Thanks.
Thanks Dave, One thing I wanna know is regarding eligibility criteria. The api gives eligibility criteria as string or text block containing all inclusion and exclusion criteria. Also it is not consistent with one to another clinical trial as for some clinical trials criteria are numbered while in some they are having hyphen(-) instead numbers. Is there any api to get all these as separate criteria instead a single text block or any way to segregate the text block in to different criteria.
Please suggest and thanks in anticipation.
Hi Sourabhh! The eligibility criteria pulled from our V1 API is structured the same way it is presented from clinicaltrials.gov: a string of text from a free-text block. You are correct in that it can contain both inclusion and exclusion criteria and structure/format is highly dependent on the sponsor. We do not restructure this prior to being stored in the API.
We are currently working to create a more consistent and structured representation of eligibility criteria based on the information available via clinicaltrials.gov. We are calling these “target profiles” (read our latest post about the project here: http://portal.lillycoi.com/2014/09/10/aiming-at-target-profiles-to-create-better-patient-experiences/).
All target profiles created will be made available via our V2 API. For more information on how to use the V2 API and about how to access target profiles, go to https://developer.lillycoi.com. Feel free to use the forums if you have any questions or comments.