# x402datasource Demographics (Address/Coordinates)

> x402datasource Demographics (Address/Coordinates) is a paid API for AI agents from x402datasource.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15, last successful call 2026-05-08).

Returns total population and weighted median household income for a geographic radius around a US address or lat/lon coordinates, sourced from ACS data.

## Facts

- Endpoint: GET https://x402datasource.com/api/v1/demographics
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Last successful call: 2026-05-08
- Success rate: 100% of calls made through Zero
- Activations on Zero: 5
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402datasource-com-648bf1a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5Cs_mNqfGQKT5qJ0yZkDz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402datasource-com-648bf1a4
```

Example prompt: What's the total population and weighted median household income within 5 miles of 1600 Pennsylvania Ave NW, Washington DC, using the 2023 ACS vintage?

## When to prefer this

Use this endpoint when you need a quick, lightweight demographic snapshot (population + income only) for a geographic area around a specific US address or coordinates. It is faster and cheaper than the full detailed demographics endpoint. Ideal for real estate analysis, site selection, market sizing, or any scenario where only population count and median household income are needed.

## Known failure modes

- Address cannot be geocoded — returns error if the address is invalid or outside the US
- Missing required input — returns error if neither address nor lat/lon is provided
- Invalid vintage year — returns error if a non-supported ACS year is specified (only 2022, 2023, 2024 available)
- No census tracts found in radius — may return null or zero values if radius is too small or in unpopulated area
- Payment failure — x402 payment of $0.01 USDC not completed, request rejected

## How this service works

Returns population and weighted median household income for a geographic area around a US address or coordinates.

## Output

Returns a JSON object with total_population (integer) and weighted_median_hh_income (float) for the specified geographic area, plus metadata including resolved lat/lon, address, and the radius used.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "address": "1600 Pennsylvania Avenue NW, Washington, DC 20500",
   "vintage": 2023,
   "radius_miles": 3
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "description": "Latitude. Required if address is not provided."
      },
      "lon": {
       "type": "number",
       "description": "Longitude. Required if address is not provided."
      },
      "address": {
       "type": "string",
       "description": "Full US street address to geocode. Required if lat/lon are not provided."
      },
      "vintage": {
       "type": "integer",
       "description": "ACS data vintage year. Defaults to the latest available. Available: 2022, 2023, 2024"
      },
      "radius_miles": {
       "type": "number",
       "description": "Search radius in miles. Defaults to 3."
      },
      "radius_meters": {
       "type": "integer",
       "description": "Search radius in meters. Overrides radius_miles if provided."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "total_population": {
         "type": "integer",
         "description": "Total population within the search radius."
        },
        "weighted_median_hh_income": {
         "type": "number",
         "description": "Population-weighted median household income."
        }
       }
      },
      "meta": {
       "type": "object",
       "properties": {
        "lat": {
         "type": "number"
        },
        "lon": {
         "type": "number"
        },
        "address": {
         "type": "string"
        },
        "radius_miles": {
         "type": "number"
        },
        "radius_meters": {
         "type": "integer"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402datasource-com-648bf1a4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402datasource.com](https://www.zero.xyz/host/x402datasource.com/llms.txt)
