Authentication
To make any requests to the America’s Health Rankings API, you must authenticate with an API key.
You can create an API key by following the steps in the Create an API Key guide.
Once you have an API key, include your API key in the X-Api-Key
header of your API requests to authenticate.
For example:
GET https://api.americashealthrankings.org/graphql HTTP/1.1
Content-Type: application/json
X-Api-Key: <API_KEY>
You must replace <API_KEY>
with your API key.
Examples
To interact with our GraphQL server, you can use GraphQL clients like Apollo Client, Relay or even JavaScript's fetch
.