{
  "openapi": "3.1.0",
  "info": {
    "title": "Demographics API",
    "version": "1.0.0",
    "description": "32 Census ACS metrics for every US ZIP, county, metro, city and state: income, age, education, housing.\n\nRich US demographics for every place your users ask about, from the Census Bureau's American Community Survey 5-year estimates (2019-2023, the latest vintage): 70,312 geographies — every ZIP code (33,774 ZCTAs), county, metro area, city and town (32,324 places), state and the nation — each with 32 headline metrics. Population and age structure, median household and per-capita income, poverty, unemployment and labor-force participation, education attainment, households and broadband, housing units, homeownership, median home value, rent and year built, foreign-born share, Hispanic origin and race. Ask ZIP 90210 and get $190,382 median income against $2,000,000+ home values; profile Los Angeles County or the New York metro in one call; rank states by income (DC, Maryland, Massachusetts lead) or find the priciest ZIP codes in any state. Name search resolves places the way people type them (\"Austin\" finds Austin city, Texas, 967,862 people). Clean conventions throughout: rates as percentages, 2023 dollars, suppressed cells as null, top-coded medians clamped and documented. Built for real estate, marketing and site selection, insurance, lending, and any product that personalizes by location. Public-domain source data, self-hosted — no third-party calls at request time.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/demographics.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/demographics"
  },
  "servers": [
    {
      "url": "https://api-demographics.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Data",
      "description": "Demographics API belongs to the Data category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/demographics/county/{fips}": {
      "get": {
        "operationId": "countyDemographics",
        "summary": "County Demographics",
        "description": "County Demographics endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/county-demographics"
        },
        "parameters": [
          {
            "name": "fips",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "06037"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "geography": {
                    "geo_id": "0500000US06037",
                    "level": "county",
                    "name": "Los Angeles County, California",
                    "state": "CA",
                    "code": "06037"
                  },
                  "population": 9848406,
                  "age": {
                    "median_age": 37.9,
                    "under_18_pct": 20.9,
                    "over_65_pct": 14.7,
                    "male_pct": 49.5,
                    "female_pct": 50.5
                  },
                  "income": {
                    "median_household_income": 87760,
                    "per_capita_income": 44319,
                    "poverty_rate": 13.6
                  },
                  "employment": {
                    "unemployment_rate": 7,
                    "labor_force_participation": 64.8
                  },
                  "education": {
                    "hs_or_higher_pct": 80.7,
                    "bachelors_or_higher_pct": 35.5
                  },
                  "households": {
                    "households": 3390254,
                    "avg_household_size": 2.85,
                    "broadband_pct": 91.7
                  },
                  "housing": {
                    "housing_units": 3624084,
                    "occupied_units": 3390254,
                    "vacant_units": 233830,
                    "owner_occupied_pct": 46.1,
                    "median_home_value": 783300,
                    "median_gross_rent": 1893,
                    "median_year_built": 1965
                  },
                  "origin": {
                    "foreign_born_pct": 33.4,
                    "hispanic_pct": 48.3
                  },
                  "race": {
                    "white_pct": 35.4,
                    "black_pct": 7.8,
                    "native_american_pct": 1.3,
                    "asian_pct": 15,
                    "pacific_islander_pct": 0.2,
                    "other_race_pct": 23.6,
                    "two_or_more_races_pct": 16.7
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "dataSources",
        "summary": "Data Sources",
        "description": "Data Sources endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/data-sources"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "vintage": "ACS 5-year estimates, 2019-2023",
                  "count": 1,
                  "sources": [
                    {
                      "slug": "acs5",
                      "name": "American Community Survey 5-Year Estimates 2019-2023",
                      "publisher": "US Census Bureau",
                      "licence": "US Government work - public domain",
                      "source_url": "https://www.census.gov/programs-surveys/acs",
                      "file_url": "https://www2.census.gov/programs-surveys/acs/summary_file/2023/table-based-SF/data/5YRData/",
                      "cadence": "annual (December release)",
                      "record_count": 70312,
                      "retrieved_at": "2026-09-05"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/demographics/{geo_id}": {
      "get": {
        "operationId": "getByGeoId",
        "summary": "Get By GEO ID",
        "description": "Get By GEO ID endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/get-by-geo-id"
        },
        "parameters": [
          {
            "name": "geo_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "310M700US35620"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "geography": {
                    "geo_id": "310M700US35620",
                    "level": "metro",
                    "name": "New York-Newark-Jersey City, NY-NJ Metro Area",
                    "state": null,
                    "code": "35620"
                  },
                  "population": 19756722,
                  "age": {
                    "median_age": 39.4,
                    "under_18_pct": 21.3,
                    "over_65_pct": 16.6,
                    "male_pct": 48.7,
                    "female_pct": 51.3
                  },
                  "income": {
                    "median_household_income": 97334,
                    "per_capita_income": 54510,
                    "poverty_rate": 12.4
                  },
                  "employment": {
                    "unemployment_rate": 6.5,
                    "labor_force_participation": 65
                  },
                  "education": {
                    "hs_or_higher_pct": 87.6,
                    "bachelors_or_higher_pct": 43.5
                  },
                  "households": {
                    "households": 7362500,
                    "avg_household_size": 2.63,
                    "broadband_pct": 90.8
                  },
                  "housing": {
                    "housing_units": 7991914,
                    "occupied_units": 7362500,
                    "vacant_units": 629414,
                    "owner_occupied_pct": 51.5,
                    "median_home_value": 587400,
                    "median_gross_rent": 1780,
                    "median_year_built": 1959
                  },
                  "origin": {
                    "foreign_born_pct": 29.8,
                    "hispanic_pct": 25.4
                  },
                  "race": {
                    "white_pct": 48.4,
                    "black_pct": 16.3,
                    "native_american_pct": 0.5,
                    "asian_pct": 11.8,
                    "pacific_islander_pct": 0,
                    "other_race_pct": 12.3,
                    "two_or_more_races_pct": 10.6
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/demographics/us": {
      "get": {
        "operationId": "nationalDemographics",
        "summary": "National Demographics",
        "description": "National Demographics endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/national-demographics"
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "geography": {
                    "geo_id": "0100000US",
                    "level": "us",
                    "name": "United States",
                    "state": null,
                    "code": "US"
                  },
                  "population": 332387540,
                  "age": {
                    "median_age": 38.7,
                    "under_18_pct": 22.2,
                    "over_65_pct": 16.8,
                    "male_pct": 49.5,
                    "female_pct": 50.5
                  },
                  "income": {
                    "median_household_income": 78538,
                    "per_capita_income": 43289,
                    "poverty_rate": 12.4
                  },
                  "employment": {
                    "unemployment_rate": 5.2,
                    "labor_force_participation": 63.5
                  },
                  "education": {
                    "hs_or_higher_pct": 89.4,
                    "bachelors_or_higher_pct": 35
                  },
                  "households": {
                    "households": 127482865,
                    "avg_household_size": 2.54,
                    "broadband_pct": 89.7
                  },
                  "housing": {
                    "housing_units": 142332876,
                    "occupied_units": 127482865,
                    "vacant_units": 14850011,
                    "owner_occupied_pct": 65,
                    "median_home_value": 303400,
                    "median_gross_rent": 1348,
                    "median_year_built": 1980
                  },
                  "origin": {
                    "foreign_born_pct": 13.9,
                    "hispanic_pct": 19
                  },
                  "race": {
                    "white_pct": 63.4,
                    "black_pct": 12.4,
                    "native_american_pct": 0.9,
                    "asian_pct": 5.8,
                    "pacific_islander_pct": 0.2,
                    "other_race_pct": 6.6,
                    "two_or_more_races_pct": 10.7
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/rankings": {
      "get": {
        "operationId": "rankings",
        "summary": "Rankings",
        "description": "Rankings endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/rankings"
        },
        "parameters": [
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "county"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "25"
          },
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "median_household_income"
          },
          {
            "name": "min_population",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "10000"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "desc"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "TX"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "metric": "median_household_income",
                  "level": "county",
                  "order": "desc",
                  "page": 1,
                  "limit": 25,
                  "count": 5,
                  "results": [
                    {
                      "geo_id": "0500000US48397",
                      "name": "Rockwall County, Texas",
                      "state": "TX",
                      "code": "48397",
                      "population": 116931,
                      "value": 124917
                    },
                    {
                      "geo_id": "0500000US48085",
                      "name": "Collin County, Texas",
                      "state": "TX",
                      "code": "48085",
                      "population": 1116601,
                      "value": 117588
                    },
                    {
                      "geo_id": "0500000US48157",
                      "name": "Fort Bend County, Texas",
                      "state": "TX",
                      "code": "48157",
                      "population": 859721,
                      "value": 113409
                    },
                    {
                      "geo_id": "0500000US48259",
                      "name": "Kendall County, Texas",
                      "state": "TX",
                      "code": "48259",
                      "population": 46971,
                      "value": 110498
                    },
                    {
                      "geo_id": "0500000US48491",
                      "name": "Williamson County, Texas",
                      "state": "TX",
                      "code": "48491",
                      "population": 643889,
                      "value": 108309
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "searchGeographies",
        "summary": "Search Geographies",
        "description": "Search Geographies endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/search-geographies"
        },
        "parameters": [
          {
            "name": "level",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "place"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "20"
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Austin"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "TX"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "count": 1,
                  "results": [
                    {
                      "geo_id": "1600000US4805000",
                      "level": "place",
                      "name": "Austin city, Texas",
                      "state": "TX",
                      "code": "4805000",
                      "population": 967862
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/demographics/state/{code}": {
      "get": {
        "operationId": "stateDemographics",
        "summary": "State Demographics",
        "description": "State Demographics endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/state-demographics"
        },
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "TX"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "geography": {
                    "geo_id": "0400000US48",
                    "level": "state",
                    "name": "Texas",
                    "state": "TX",
                    "code": "TX"
                  },
                  "population": 29640343,
                  "age": {
                    "median_age": 35.5,
                    "under_18_pct": 25.2,
                    "over_65_pct": 13.2,
                    "male_pct": 49.9,
                    "female_pct": 50.1
                  },
                  "income": {
                    "median_household_income": 76292,
                    "per_capita_income": 39446,
                    "poverty_rate": 13.8
                  },
                  "employment": {
                    "unemployment_rate": 5.1,
                    "labor_force_participation": 65.3
                  },
                  "education": {
                    "hs_or_higher_pct": 85.7,
                    "bachelors_or_higher_pct": 33.1
                  },
                  "households": {
                    "households": 10747240,
                    "avg_household_size": 2.7,
                    "broadband_pct": 90
                  },
                  "housing": {
                    "housing_units": 11890808,
                    "occupied_units": 10747240,
                    "vacant_units": 1143568,
                    "owner_occupied_pct": 62.6,
                    "median_home_value": 260400,
                    "median_gross_rent": 1339,
                    "median_year_built": 1990
                  },
                  "origin": {
                    "foreign_born_pct": 17.2,
                    "hispanic_pct": 39.5
                  },
                  "race": {
                    "white_pct": 53.9,
                    "black_pct": 12.2,
                    "native_american_pct": 0.6,
                    "asian_pct": 5.3,
                    "pacific_islander_pct": 0.1,
                    "other_race_pct": 8.6,
                    "two_or_more_races_pct": 19.2
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/demographics/zip/{zip}": {
      "get": {
        "operationId": "zipDemographics",
        "summary": "ZIP Demographics",
        "description": "ZIP Demographics endpoint of the Demographics API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/demographics/zip-demographics"
        },
        "parameters": [
          {
            "name": "zip",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "90210"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "geography": {
                    "geo_id": "860Z200US90210",
                    "level": "zip",
                    "name": "ZIP 90210",
                    "state": null,
                    "code": "90210"
                  },
                  "population": 19652,
                  "age": {
                    "median_age": 51.2,
                    "under_18_pct": 18,
                    "over_65_pct": 28.3,
                    "male_pct": 51.1,
                    "female_pct": 48.9
                  },
                  "income": {
                    "median_household_income": 190382,
                    "per_capita_income": 144533,
                    "poverty_rate": 8.4
                  },
                  "employment": {
                    "unemployment_rate": 4.2,
                    "labor_force_participation": 54.2
                  },
                  "education": {
                    "hs_or_higher_pct": 96.8,
                    "bachelors_or_higher_pct": 68.4
                  },
                  "households": {
                    "households": 8025,
                    "avg_household_size": 2.45,
                    "broadband_pct": 94.9
                  },
                  "housing": {
                    "housing_units": 9714,
                    "occupied_units": 8025,
                    "vacant_units": 1689,
                    "owner_occupied_pct": 71.6,
                    "median_home_value": 2000000,
                    "median_gross_rent": 3045,
                    "median_year_built": 1967
                  },
                  "origin": {
                    "foreign_born_pct": 35.7,
                    "hispanic_pct": 5.8
                  },
                  "race": {
                    "white_pct": 82.3,
                    "black_pct": 2,
                    "native_american_pct": 0.2,
                    "asian_pct": 6.6,
                    "pacific_islander_pct": 0,
                    "other_race_pct": 1.3,
                    "two_or_more_races_pct": 7.5
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}