Data USA API
datausa.io · Government
US Census and economic data visualized — population, wages, education, employment, and housing for states, cities, counties, and industries. Free, no API key.
Authentication
No authentication requiredFree to use with no key needed.
Sample Requests
GET
Get population data
Get current population for all US states.
https://datausa.io/api/data?year=latest&measures=Population&drilldowns=State
Hover any highlighted part to learn what it does
curl -X GET "https://datausa.io/api/data?year=latest&measures=Population&drilldowns=State"
import requests
params = {
"year": "latest",
"measures": "Population",
"drilldowns": "State"
}
response = requests.get(
"https://datausa.io/api/data",
params=params,
)
print(response.json())const url = new URL('https://datausa.io/api/data');
url.searchParams.set('year', 'latest');
url.searchParams.set('measures', 'Population');
url.searchParams.set('drilldowns', 'State');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://datausa.io/api/data")
q := baseURL.Query()
q.Set("year", "latest")
q.Set("measures", "Population")
q.Set("drilldowns", "State")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://datausa.io/api/data")
uri.query = URI.encode_www_form({
"year" => "latest",
"measures" => "Population",
"drilldowns" => "State"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://datausa.io/api/data?" . http_build_query([
"year" => "latest",
"measures" => "Population",
"drilldowns" => "State"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- No API key needed
- State populations: GET /api/data?drilldowns=State&measures=Population&year=latest
- City data: GET /api/data?drilldowns=Place&Geography=16000US0644000&measures=Average+Wage&year=latest (LA)
- Industry wages: GET /api/data?drilldowns=Industry+Group&measures=Average+Wage&year=latest
- More examples at datausa.io/about/api
What can you build with Data USA API?
Data USA API is a Government API. Developers commonly use government APIs for:
- surfacing public datasets in citizen-facing apps
- building transparency and civic engagement tools
- accessing legislation, court records, and official data
- powering research and journalism tools
- creating compliance and regulatory monitoring dashboards
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Data USA API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide