1. US Census API
  2. Population
GET

/v1/census/population

center
address
radius*
api_key*
curl --request GET \
     --url https://osm.buntinglabs.com/v1/census/population \

This API endpoint estimates the population inside a circle from US Census data. You can provide either a coordinate (latitude and longitude) or an address, plus a radius around the center.

Request Parameters

center
string

The center of the circle as a coordinate. Residents inside this circle will be counted in calculating the population count.

The center coordinate is formatted as longitude,latitude. One of center or address is required.

address
string

The center of the circle as an address. Residents inside this circle will be counted in calculating the population count.

If the address is ambiguous, the best result will be chosen, which may or may not be the target address. To get the best results, provide the full address, including: building number, street name, city name, state, zip code, and country.

An example address is 335 McAllister St, San Francisco, CA 94102. One of center or address is required.

radiusRequired
number

The radius around the center, in meters. Maximum radius is 16,093 meters (10 miles).

api_keyRequired
string

Your account’s API key. You can create an API key by registering for an account and copy and paste it from your account dashboard.

Response

When population is successfully calculated, a 200 OK response will be issued, with Content-Type: application/json. The body will have a property population which will be a number representing the number of residents in the circle, estimated from US Census data.

population
number

The expected number of residents in the circle, based on US census data.

source
string

A descriptive source for the data, including the year the data was collected.

In the event of an error, an error response will be issued, usually with a 5xx error code. The error will be JSON-formatted, with an error field describing the cause.

error
string

The error message if the extract request parameters were incorrectly formatted.

This response field will not be present if the extract succeeds.

Data License

This API serves data from the US Census Bureau, which is freely available.

curl --get 'https://osm.buntinglabs.com/v1/census/population' \
     --data "center=-118.328228,33.342819" \
     --data "radius=1000.0" \
     --data "api_key=demo"
{
  "population": 3364,
  "source": "US Census Bureau"
}