curl --request POST \
--url https://api.aisa.one/apis/v1/census-gov/census/popest-list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "counties"
}
'import requests
url = "https://api.aisa.one/apis/v1/census-gov/census/popest-list"
payload = { "file": "counties" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: 'counties'})
};
fetch('https://api.aisa.one/apis/v1/census-gov/census/popest-list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/census-gov/census/popest-list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => 'counties'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/census-gov/census/popest-list"
payload := strings.NewReader("{\n \"file\": \"counties\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/census-gov/census/popest-list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"counties\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/census-gov/census/popest-list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"counties\"\n}"
response = http.request(request)
puts response.read_bodyPopest list
Full collection of county or sub-county population estimates (annual population, births, deaths, migration) for a vintage, optionally for one state.
curl --request POST \
--url https://api.aisa.one/apis/v1/census-gov/census/popest-list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "counties"
}
'import requests
url = "https://api.aisa.one/apis/v1/census-gov/census/popest-list"
payload = { "file": "counties" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({file: 'counties'})
};
fetch('https://api.aisa.one/apis/v1/census-gov/census/popest-list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/census-gov/census/popest-list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => 'counties'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/census-gov/census/popest-list"
payload := strings.NewReader("{\n \"file\": \"counties\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/census-gov/census/popest-list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"counties\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/census-gov/census/popest-list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"counties\"\n}"
response = http.request(request)
puts response.read_bodyRequest contract
- Method and path: POST /apis/v1/census-gov/census/popest-list
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/census-gov/census/popest-list
{
"operationId": "census-gov.census.popest-list",
"method": "POST",
"path": "/apis/v1/census-gov/census/popest-list",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"file": "counties",
"page_size": 6,
"state": "30"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"continuation": {
"description": "Opaque cursor from the previous page's next_cursor. It pins the vintage, file, Last-Modified and size; when the source has moved on the call fails with invalid_input at /continuation (issue code publication_changed) instead of mixing versions.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"file": {
"description": "counties: counties/totals/co-est<YYYY>-alldata.csv (states and counties). subcounty: cities/totals/sub-est<YYYY>.csv (national, ~7.5 MB) or, with state, sub-est<YYYY>_<state>.csv.\n\nProvider reference: allowed values [\"counties\", \"subcounty\"].",
"type": "string"
},
"page_size": {
"description": "Records (geography-years) per page; default 500.\n\nProvider reference: minimum 1; maximum 2000.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 2000,
"min": 1
}
},
"state": {
"description": "Optional 2-digit state FIPS. counties: keeps that state's rows (state row included). subcounty: reads the per-state file sub-est<YYYY>_<n>.csv instead of the national file. Pattern: ^[0-9]{2}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"sumlev": {
"description": "Optional summary level filter (050 counties only, 162 incorporated places, 061 county subdivisions ...). Pattern: ^[0-9]{3}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"vintage": {
"description": "Vintage year YYYY of the 2020-YYYY directory. Default: the newest directory listed under popest/datasets/.\n\nProvider reference: minimum 2021; maximum 2035.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 2035,
"min": 2021
}
}
},
"required": [
"file"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
Response
List Vintage 2020-YYYY population estimates from one PEP file as one record per geography and estimate year: counties (SUMLEV 040 states and 050 counties; components of change, group quarters and per-1,000 rates) or subcounty (places, county subdivisions, consolidated cities; population only). The whole file is fetched per call (2.1 MB counties, 7.5 MB national subcounty, ~30 KB per state) and paged from memory; the cursor pins vintage, file, Last-Modified and size and a changed file fails with publication_changed. source_record_id = v:::<geo_id>:. Names are decoded from Latin-1.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
content_hash | string | SHA-256 of the raw file bytes as served (the publisher posts no hash). |
count | number | |
file | string | counties: counties/totals/co-est-alldata.csv (states and counties). subcounty: cities/totals/sub-est.csv (national, ~7.5 MB) or, with state, sub-est_.csv. |
file_name | string | |
file_url | string | |
has_more | boolean | |
hash_source | string | |
last_modified | string | Last-Modified header of the file, ISO 8601. |
next_cursor | string | |
observed_at_ms | number | |
offset | number | |
publication_id | string | |
records | object[] | |
retrieved_at | string | |
size_bytes | number | Content-Length of the file (raw bytes as served). |
source_url | string | |
state | string | |
sumlev | string | |
total_geographies | number | Rows of the file after the state/sumlev filter. |
total_records | number | total_geographies x years. |
vintage | number | |
vintage_directory | string | |
years | number[] | Estimate years carried by the file (POPESTIMATE columns). |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.