Skip to main content

An official website of the United States government

Here's how you know

HealthCare.gov for Developers

We’re making our source code freely available on GitHub. All of our educational content about the Health Insurance Marketplace® is available in machine-readable formats so that innovators, entrepreneurs, and partners can turn it into new products and services.

Open Source and Accessible

All content is available through an API. Everyone can use the API to embed content from HealthCare.gov. As official content gets updated on HealthCare.gov, the new content will update automatically and appear on websites using the HealthCare.gov API.
From day one, we embraced the principles of open data, universal access, and accessibility through simplicity. We produce standards compliant code to make our content accessible to people with disabilities.

HealthCare.gov Content API

Our web content is published as HTML pages and JSON data. JSON stands for JavaScript Object NotationThis link goes to an external site

You are leaving HealthCare.gov.

You're about to connect to a third-party site. Select CONTINUE to proceed or CANCEL to stay on this site.

Learn more about links to third-party sites.

Continue
 and it is a machine-readable data exchange format. Use our JSON API to build applications and websites that share the latest content from HealthCare.gov.

API Endpoints

There are three types of data available through HTTP GET requests to the HealthCare.gov Content API:
  • Content objects: the body content and metadata for each post on this website
  • Content collections: groups of posts by type of content, such as article or glossary term
  • Content index: a site-wide index of all posts and their metadata
Each endpoint will return a JSON object or array or data.
Content objects
Each content post is available as JSON object. To access a JSON object for a post, replace the trailing slash on the end of a post’s URL with the extension .json.
Request structure:
Response structure:
The content API returns objects that may include the follow attributes:
{ "url": "", "title": "", "content": "", "author": "", "date: "", "lang": "", // Language code: "en" for English, "es" for Spanish "categories": [], // Content types and language code "tags": [], // An array of content tags, such as "promote" "topics": [], // Associated topics (for articles) "layout": "", // The layout used to display the content "order": 0, // Contextual position of the content }
Example:
Content collections
Collections are a list of post objects by content type. The following content types are available: articles, blog, questions, glossary, states, and topics.
Request structure:
Response structure:
Collects return a JSON object with a single key and value. The key is the content type, and the value is an array of post objects, defined above.
Example:
Content Index
The index is an abridged list of metadata for all posts on this website. Use it to get an aggregate view of content and to generate additional queries of post objects.
Request structure:
Response structure:
The index API returns an array of summary objects for the metadata of each post.
{ "tags": [], // An array of content tags, such as "promote" "categories": [], // Content types and language code "topics": [], // Associated topics (for articles) "title": "", // The post's title "es-title": "" // Spanish translation of the post's title, "url": "", // URL to the HTML version of the post (add .json for post object) "bite": "", // A short summary of the post "es-bite": "", // The post summary in Spanish "state": [] // Associated states for the post }
Additional metadata fields may be available to further categorize some posts.
Example:

Using the content API

Most web and application frameworks include support for working directly with JSON. For example, the following JavaScript code uses the popular JQuery library to request a definition for a glossary term and insert it into containers on a web page:
$.getJSON('https://www.healthcare.gov/glossary/childrens-health-insurance-program-…', function(d) { $('h1').html(d.title); $('#content').html(d.content); });
For more information about JSON and resources in various programming languages, please see the JSON specification documentationThis link goes to an external site

You are leaving HealthCare.gov.

You're about to connect to a third-party site. Select CONTINUE to proceed or CANCEL to stay on this site.

Learn more about links to third-party sites.

Continue
.
Cross-domain requests
For client-side JavaScript applications, the HealthCare.gov API supports cross-domain requests. The API is CORS-enabled, which means that it authorizes requests for content from other origin servers. With CORS enabled, making cross-domain API requests in modern web browsers is done the in the same way that same-domain requests are made, like in the above example. Read more about using CORSThis link goes to an external site

You are leaving HealthCare.gov.

You're about to connect to a third-party site. Select CONTINUE to proceed or CANCEL to stay on this site.

Learn more about links to third-party sites.

Continue
.
The API also supports JSONP requests. By adding a callback parameter to the request, the API will wrap the response in the value of the callback parameter, for example:
This allows the request to be embedded as a script instead of a JSON object that needs to be parsed. JSONP is considered less secure than CORS, but in some cases with a trusted host, it is a useful solution. Read more about JSONPThis link goes to an external site

You are leaving HealthCare.gov.

You're about to connect to a third-party site. Select CONTINUE to proceed or CANCEL to stay on this site.

Learn more about links to third-party sites.

Continue
.

Other Federal Resources for Developers