County Data Lookup API Reference

API Overview

County Data is a simple tool for getting data about US counties. It returns information such as average income, area, and more based on the county name provided. To use this API, you need an API key. You can get one by creating a free account and visiting your dashboard.

Important: Ensure that this API is enabled from within your dashboard to use it in your application. If not, you may receive a 403 error

View API in Directory

Client Libaries

To get started with minimal code, most of our APIs are available through client libraries:

run in postman button npm logo pypi logo nuget logo

Get County Data

2 Token

Get data about a US county

	
#GET Request
https://api.apiverve.com/v1/countydata?county=Jackson&state=MO	

	
					

x-api-key (required)

This is a required header on every request. Your API Key is found from within your dashboard

accept

This is an optional header. Set the value to application/json, application/xml, or application/yaml


statestring(required)

The two letter name of the US state the county is in (e.g., MO)

countystring(required)

The name of the US county to get data about (e.g. Jackson)


Sample Request
	
import requests

url = "https://api.apiverve.com/v1/countydata"

querystring = {'county': 'Jackson', 'state': 'MO'}

headers = {
	"x-api-key": "YOUR_API_KEY"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
	
							
	
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
	Method = HttpMethod.Get,
	RequestUri = new Uri("https://api.apiverve.com/v1/countydata?county=Jackson&state=MO"),
	Headers =
	{
		{ "x-api-key", "YOUR_API_KEY" }
	},
};
using (var response = await client.SendAsync(request))
{
	response.EnsureSuccessStatusCode();
	var body = await response.Content.ReadAsStringAsync();
	Console.WriteLine(body);
}
	
							
	
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
	if (this.readyState === this.DONE) {
		console.log(this.responseText);
	}
});

xhr.open('GET', 'https://api.apiverve.com/v1/countydata?county=Jackson&state=MO');
xhr.setRequestHeader('x-api-key', 'YOUR_API_KEY');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');

xhr.send(data);
	
							
	
const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.apiverve.com/v1/countydata?county=Jackson&state=MO',
  headers: {
    'x-api-key': 'YOUR_API_KEY'
  }
};

request(options, function (error, response, body) {
	if (error) throw new Error(error);

	console.log(body);
});
	
							
	
HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://api.apiverve.com/v1/countydata?county=Jackson&state=MO"))
		.header("x-api-key", "YOUR_API_KEY")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
	
							
	
import Foundation

let headers = [
	"x-api-key": "YOUR_API_KEY"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.apiverve.com/v1/countydata?county=Jackson&state=MO")! as URL,
				cachePolicy: .useProtocolCachePolicy,
                timeoutInterval: 10.0)

request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
	if (error != nil) {
		print(error as Any)
	} else {
		let httpResponse = response as? HTTPURLResponse
		print(httpResponse)
	}
})

dataTask.resume()
	
							
	
curl --request GET \
	--url 'https://api.apiverve.com/v1/countydata?county=Jackson&state=MO' \
	--header 'x-api-key: YOUR_API_KEY'
	
							

Sample Response
	
{
  "status": "ok",
  "error": null,
  "data": {
    "name": "jackson county",
    "state": "MO",
    "age": {
      "0-4": 0.0644100874666257,
      "5-9": 0.06532756955438819,
      "10-14": 0.065950603902357144,
      "15-19": 0.05967616438434107,
      "20-24": 0.059725950234064615,
      "25-29": 0.081924749399369279,
      "30-34": 0.075233531196524664,
      "35-39": 0.06868029092005673,
      "40-44": 0.058310609649066661,
      "45-49": 0.058805623240603636,
      "50-54": 0.05858087569042305,
      "55-59": 0.0674783182624454,
      "60-64": 0.062084377058111463,
      "65-69": 0.05099777955110233,
      "70-74": 0.038915465049622268,
      "75-79": 0.026437708656052324,
      "80-84": 0.017489057781457189,
      "85+": 0.019971238003388282
    },
    "male": 339932,
    "female": 363079,
    "deaths": {
      "suicides": 106.71428571428571,
      "homicides": 115.42857142857143,
      "vehicle": 93,
      "firearmsuicides": 55.095238095238095
    },
    "health": {
      "poorhealth": 20.588989742,
      "physicallyunhealthydays": 4.247736361,
      "mentallyunhealthydays": 4.8111015035,
      "lowbirthweightpercent": 9.1518749808,
      "smokerspercent": 20.957241772,
      "obesitypercent": 31.5,
      "foodenvindex": 7.5,
      "physicallyinactivepercent": 23.2,
      "excessivedrinkingpercent": 18.940103365,
      "alcoholimpaireddrivingdeaths": 152,
      "teenbirthrate": 31.109351559,
      "uninsured": 12.486314662,
      "withannualmammogram": 45,
      "vaccinated": 51,
      "childreninpoverty": 19.6,
      "80thpercentileincome": 108296,
      "20thpercentileincome": 23275,
      "childreninsingleparenthouseholds": 33.224850811,
      "violentcrimerate": 941.43198334,
      "averagedailypm25": 9.1,
      "severehousingproblems": 15.347550638,
      "drivealonetowork": 83.470246386,
      "longcommutedrivesalone": 33.7
    },
    "longitude": -94.347496655033936,
    "latitude": 39.016701918102484,
    "education": {
      "lessthanhighschool": 9.4,
      "highschool": 28.3,
      "somecollege": 30.7,
      "bachelors": 31.6
    },
    "zipcodes": [
      "64137",
      "64111",
      "64053",
      "64055",
      "64064",
      "64029",
      "64106",
      "64108",
      "64034",
      "64118",
      "64136",
      "64139",
      "64125",
      "64030",
      "64014",
      "64066",
      "64080",
      "64123",
      "64131",
      "64145",
      "64128",
      "64121",
      "64170",
      "64050",
      "64057",
      "64133",
      "64109",
      "64130",
      "64134",
      "64129",
      "64158",
      "64163",
      "64070",
      "64102",
      "64105",
      "64086",
      "64101",
      "64124",
      "64157",
      "64088",
      "64061",
      "64051",
      "64002",
      "64081",
      "64013",
      "64016",
      "64112",
      "64114",
      "64110",
      "64152",
      "64127",
      "64147",
      "64120",
      "64146",
      "64199",
      "64058",
      "64054",
      "64074",
      "64119",
      "64138",
      "64149",
      "64156",
      "64132",
      "64171",
      "64148",
      "64141",
      "64999",
      "64052",
      "64015",
      "64063",
      "64075",
      "64056",
      "64082",
      "64113",
      "64155",
      "64126",
      "64197",
      "64065",
      "64198"
    ],
    "lifeexpectancy": 77.19,
    "avgincome": 47054,
    "povertyrate": 13.7,
    "costofliving": {
      "livingwage": 14.55,
      "foodcosts": 3246,
      "medicalcosts": 2681,
      "housingcosts": 8136,
      "taxcosts": 6263
    },
    "landareakm2": 1565.601892,
    "areakm2": 1596.319707
  },
  "code": 200
}
	
							
	
<Root>
  <status>ok</status>
  <error />
  <data>
    <name>jackson county</name>
    <state>MO</state>
    <age>
      <_x0030_-4>0.0644100874666257</_x0030_-4>
      <_x0035_-9>0.06532756955438819</_x0035_-9>
      <_x0031_0-14>0.065950603902357144</_x0031_0-14>
      <_x0031_5-19>0.05967616438434107</_x0031_5-19>
      <_x0032_0-24>0.059725950234064615</_x0032_0-24>
      <_x0032_5-29>0.081924749399369279</_x0032_5-29>
      <_x0033_0-34>0.075233531196524664</_x0033_0-34>
      <_x0033_5-39>0.06868029092005673</_x0033_5-39>
      <_x0034_0-44>0.058310609649066661</_x0034_0-44>
      <_x0034_5-49>0.058805623240603636</_x0034_5-49>
      <_x0035_0-54>0.05858087569042305</_x0035_0-54>
      <_x0035_5-59>0.0674783182624454</_x0035_5-59>
      <_x0036_0-64>0.062084377058111463</_x0036_0-64>
      <_x0036_5-69>0.05099777955110233</_x0036_5-69>
      <_x0037_0-74>0.038915465049622268</_x0037_0-74>
      <_x0037_5-79>0.026437708656052324</_x0037_5-79>
      <_x0038_0-84>0.017489057781457189</_x0038_0-84>
      <_x0038_5_x002B_>0.019971238003388282</_x0038_5_x002B_>
    </age>
    <male>339932</male>
    <female>363079</female>
    <deaths>
      <suicides>106.71428571428571</suicides>
      <homicides>115.42857142857143</homicides>
      <vehicle>93</vehicle>
      <firearmsuicides>55.095238095238095</firearmsuicides>
    </deaths>
    <health>
      <poorhealth>20.588989742</poorhealth>
      <physicallyunhealthydays>4.247736361</physicallyunhealthydays>
      <mentallyunhealthydays>4.8111015035</mentallyunhealthydays>
      <lowbirthweightpercent>9.1518749808</lowbirthweightpercent>
      <smokerspercent>20.957241772</smokerspercent>
      <obesitypercent>31.5</obesitypercent>
      <foodenvindex>7.5</foodenvindex>
      <physicallyinactivepercent>23.2</physicallyinactivepercent>
      <excessivedrinkingpercent>18.940103365</excessivedrinkingpercent>
      <alcoholimpaireddrivingdeaths>152</alcoholimpaireddrivingdeaths>
      <teenbirthrate>31.109351559</teenbirthrate>
      <uninsured>12.486314662</uninsured>
      <withannualmammogram>45</withannualmammogram>
      <vaccinated>51</vaccinated>
      <childreninpoverty>19.6</childreninpoverty>
      <_x0038_0thpercentileincome>108296</_x0038_0thpercentileincome>
      <_x0032_0thpercentileincome>23275</_x0032_0thpercentileincome>
      <childreninsingleparenthouseholds>33.224850811</childreninsingleparenthouseholds>
      <violentcrimerate>941.43198334</violentcrimerate>
      <averagedailypm25>9.1</averagedailypm25>
      <severehousingproblems>15.347550638</severehousingproblems>
      <drivealonetowork>83.470246386</drivealonetowork>
      <longcommutedrivesalone>33.7</longcommutedrivesalone>
    </health>
    <longitude>-94.347496655033936</longitude>
    <latitude>39.016701918102484</latitude>
    <education>
      <lessthanhighschool>9.4</lessthanhighschool>
      <highschool>28.3</highschool>
      <somecollege>30.7</somecollege>
      <bachelors>31.6</bachelors>
    </education>
    <zipcodes>64137</zipcodes>
    <zipcodes>64111</zipcodes>
    <zipcodes>64053</zipcodes>
    <zipcodes>64055</zipcodes>
    <zipcodes>64064</zipcodes>
    <zipcodes>64029</zipcodes>
    <zipcodes>64106</zipcodes>
    <zipcodes>64108</zipcodes>
    <zipcodes>64034</zipcodes>
    <zipcodes>64118</zipcodes>
    <zipcodes>64136</zipcodes>
    <zipcodes>64139</zipcodes>
    <zipcodes>64125</zipcodes>
    <zipcodes>64030</zipcodes>
    <zipcodes>64014</zipcodes>
    <zipcodes>64066</zipcodes>
    <zipcodes>64080</zipcodes>
    <zipcodes>64123</zipcodes>
    <zipcodes>64131</zipcodes>
    <zipcodes>64145</zipcodes>
    <zipcodes>64128</zipcodes>
    <zipcodes>64121</zipcodes>
    <zipcodes>64170</zipcodes>
    <zipcodes>64050</zipcodes>
    <zipcodes>64057</zipcodes>
    <zipcodes>64133</zipcodes>
    <zipcodes>64109</zipcodes>
    <zipcodes>64130</zipcodes>
    <zipcodes>64134</zipcodes>
    <zipcodes>64129</zipcodes>
    <zipcodes>64158</zipcodes>
    <zipcodes>64163</zipcodes>
    <zipcodes>64070</zipcodes>
    <zipcodes>64102</zipcodes>
    <zipcodes>64105</zipcodes>
    <zipcodes>64086</zipcodes>
    <zipcodes>64101</zipcodes>
    <zipcodes>64124</zipcodes>
    <zipcodes>64157</zipcodes>
    <zipcodes>64088</zipcodes>
    <zipcodes>64061</zipcodes>
    <zipcodes>64051</zipcodes>
    <zipcodes>64002</zipcodes>
    <zipcodes>64081</zipcodes>
    <zipcodes>64013</zipcodes>
    <zipcodes>64016</zipcodes>
    <zipcodes>64112</zipcodes>
    <zipcodes>64114</zipcodes>
    <zipcodes>64110</zipcodes>
    <zipcodes>64152</zipcodes>
    <zipcodes>64127</zipcodes>
    <zipcodes>64147</zipcodes>
    <zipcodes>64120</zipcodes>
    <zipcodes>64146</zipcodes>
    <zipcodes>64199</zipcodes>
    <zipcodes>64058</zipcodes>
    <zipcodes>64054</zipcodes>
    <zipcodes>64074</zipcodes>
    <zipcodes>64119</zipcodes>
    <zipcodes>64138</zipcodes>
    <zipcodes>64149</zipcodes>
    <zipcodes>64156</zipcodes>
    <zipcodes>64132</zipcodes>
    <zipcodes>64171</zipcodes>
    <zipcodes>64148</zipcodes>
    <zipcodes>64141</zipcodes>
    <zipcodes>64999</zipcodes>
    <zipcodes>64052</zipcodes>
    <zipcodes>64015</zipcodes>
    <zipcodes>64063</zipcodes>
    <zipcodes>64075</zipcodes>
    <zipcodes>64056</zipcodes>
    <zipcodes>64082</zipcodes>
    <zipcodes>64113</zipcodes>
    <zipcodes>64155</zipcodes>
    <zipcodes>64126</zipcodes>
    <zipcodes>64197</zipcodes>
    <zipcodes>64065</zipcodes>
    <zipcodes>64198</zipcodes>
    <lifeexpectancy>77.19</lifeexpectancy>
    <avgincome>47054</avgincome>
    <povertyrate>13.7</povertyrate>
    <costofliving>
      <livingwage>14.55</livingwage>
      <foodcosts>3246</foodcosts>
      <medicalcosts>2681</medicalcosts>
      <housingcosts>8136</housingcosts>
      <taxcosts>6263</taxcosts>
    </costofliving>
    <landareakm2>1565.601892</landareakm2>
    <areakm2>1596.319707</areakm2>
  </data>
  <code>200</code>
</Root>
	
							
	
status: ok
error: 
data:
  name: jackson county
  state: MO
  age:
    0-4: 0.0644100874666257
    5-9: 0.0653275695543882
    10-14: 0.0659506039023571
    15-19: 0.0596761643843411
    20-24: 0.0597259502340646
    25-29: 0.0819247493993693
    30-34: 0.0752335311965247
    35-39: 0.0686802909200567
    40-44: 0.0583106096490667
    45-49: 0.0588056232406036
    50-54: 0.058580875690423
    55-59: 0.0674783182624454
    60-64: 0.0620843770581115
    65-69: 0.0509977795511023
    70-74: 0.0389154650496223
    75-79: 0.0264377086560523
    80-84: 0.0174890577814572
    85+: 0.0199712380033883
  male: 339932
  female: 363079
  deaths:
    suicides: 106.714285714286
    homicides: 115.428571428571
    vehicle: 93
    firearmsuicides: 55.0952380952381
  health:
    poorhealth: 20.588989742
    physicallyunhealthydays: 4.247736361
    mentallyunhealthydays: 4.8111015035
    lowbirthweightpercent: 9.1518749808
    smokerspercent: 20.957241772
    obesitypercent: 31.5
    foodenvindex: 7.5
    physicallyinactivepercent: 23.2
    excessivedrinkingpercent: 18.940103365
    alcoholimpaireddrivingdeaths: 152
    teenbirthrate: 31.109351559
    uninsured: 12.486314662
    withannualmammogram: 45
    vaccinated: 51
    childreninpoverty: 19.6
    80thpercentileincome: 108296
    20thpercentileincome: 23275
    childreninsingleparenthouseholds: 33.224850811
    violentcrimerate: 941.43198334
    averagedailypm25: 9.1
    severehousingproblems: 15.347550638
    drivealonetowork: 83.470246386
    longcommutedrivesalone: 33.7
  longitude: -94.3474966550339
  latitude: 39.0167019181025
  education:
    lessthanhighschool: 9.4
    highschool: 28.3
    somecollege: 30.7
    bachelors: 31.6
  zipcodes:
  - 64137
  - 64111
  - 64053
  - 64055
  - 64064
  - 64029
  - 64106
  - 64108
  - 64034
  - 64118
  - 64136
  - 64139
  - 64125
  - 64030
  - 64014
  - 64066
  - 64080
  - 64123
  - 64131
  - 64145
  - 64128
  - 64121
  - 64170
  - 64050
  - 64057
  - 64133
  - 64109
  - 64130
  - 64134
  - 64129
  - 64158
  - 64163
  - 64070
  - 64102
  - 64105
  - 64086
  - 64101
  - 64124
  - 64157
  - 64088
  - 64061
  - 64051
  - 64002
  - 64081
  - 64013
  - 64016
  - 64112
  - 64114
  - 64110
  - 64152
  - 64127
  - 64147
  - 64120
  - 64146
  - 64199
  - 64058
  - 64054
  - 64074
  - 64119
  - 64138
  - 64149
  - 64156
  - 64132
  - 64171
  - 64148
  - 64141
  - 64999
  - 64052
  - 64015
  - 64063
  - 64075
  - 64056
  - 64082
  - 64113
  - 64155
  - 64126
  - 64197
  - 64065
  - 64198
  lifeexpectancy: 77.19
  avgincome: 47054
  povertyrate: 13.7
  costofliving:
    livingwage: 14.55
    foodcosts: 3246
    medicalcosts: 2681
    housingcosts: 8136
    taxcosts: 6263
  landareakm2: 1565.601892
  areakm2: 1596.319707
code: 200

	
							
Live Test API in Playground

Response Types

The County Data Lookup API supports the following response content types:

application/json, application/xml, application/yaml

You can specify the response content type by setting the Accept header in your request. If you don't specify a content type, the API will default to application/json.

Authentication

The County Data Lookup API uses an API Key to authenticate requests. You can view and manage your API key by visiting your dashboard.

Your API keys carry many privileges. To keep them from being abused, please do not share the keys on client-side code or Github etc. Keep them very secure.

To use any API, you must have it enabled from within your dashboard. Disabled APIs will fail to respond to your requests.

All requests made to the API must contain the header x-api-key in each of your requests. API requests without authentication will fail.

All API requests must also be made over secure HTTPS. Requests made over plain HTTP will fail.

Error Code Meaning
401 Your request was made with invalid credentials. This error also appears when you don't pass the x-api-key header in your request.
403 Typically, this occurs when you are trying to access an API that you have not enabled.

Rate Limits

	
{
    "status": "error",
    "data": null,
    "error": "tokens have been depleted",
    "code": 429
}
	
							

Each subscription has its own monthly token limit. Your token count is based on your subscription plan. If you reach your limits, don't worry. You can always upgrade or downgrade at any time.

When you reach your limit, the service will stop responding and typically return an HTTP 429 response status code. The error will also contain a detailed JSON.

The County Data Lookup API uses the following error code:

Error Code Meaning
429 You have exceeded your rate limit and further requests will be denied until the next cycle.

Error Codes

For reference, the County Data Lookup API uses the following error codes:

Error Code Meaning
Code Message
200 The request was successful. The response will include the requested data.
400 The request was invalid. The response will include a message that explains the error.
401 The request was not authorized. Usually, this means that the API key is missing or invalid.
403 This means that the request was trying to access a resource that it does not have permission to access.
404 This means that the resource you are trying to access does not exist.
429 This means that you have reached the rate limit. The response will include a Retry-After header that indicates how many seconds you need to wait before making a new request.
500 This means that there was an error on the server side. We are alerted when this happens and we will work to fix it as soon as possible.
ON THIS PAGE