Healthcare.gov

Healthcare.gov

Health

Educational content about the US Health Insurance Marketplace. People 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.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Healthcare.gov

🚀 Quick Start Examples

Healthcare.gov Javascript Examplejavascript
// Healthcare.gov API Example
const response = await fetch('https://www.healthcare.gov/developers/', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Exploring Healthcare.gov API

If you are interested in healthcare data or you're building an application in the healthcare sector, then you are in the right place!

Healthcare.gov provides a set of APIs giving developers access to healthcare data (i.e., health plans available on the individual and small group markets), part of President Obama’s Affordable Care Act. In this blog, we will explore how to use the Healthcare.gov API in Javascript.

Getting Started

First, let's explore Healthcare.gov's API documentation. Follow the below steps to get started:

  1. Visit the Healthcare.gov Developers Website at https://www.healthcare.gov/developers/. Here, you will find API documentation and information on how to register to use the API.

  2. Once you have registered, you will receive an API key which can be used to make API requests.

JavaScript Examples

Here are a few examples of how to make API requests to Healthcare.gov using Javascript:

Example 1: Retrieving a Health Plan

const apiKey = 'your-api-key';
const planId = '123456';

fetch(`https://api.healthcare.gov/api/glossary/${planId}?apikey=${apiKey}`)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

Example 2: Searching for Health Plans

const apiKey = 'your-api-key';
const state = 'DC';
const zipCode = '20002';

fetch(`https://api.healthcare.gov/v3.0/states/${state}/plans/search?zip=${zipCode}&apikey=${apiKey}`)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

Example 3: Retrieving Health Plan Data by State and County

const apiKey = 'your-api-key';
const state = 'VA';
const county = '51059';

fetch(`https://www.healthcare.gov/api/glossary/region/state/${state}/county/${county}/?apikey=${apiKey}`)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

Conclusion

Healthcare.gov's API provides valuable healthcare data. In this blog, we explored how to use the API in Javascript with a few examples. We hope that you found this blog informative and that it helps you get started with using Healthcare.gov's API for your healthcare application. Happy coding!

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jun 30Jul 2Jul 4Jul 704008001440Minutes
Online
Offline

Related APIs in Health