# Market Size

> Market Size is a paid API for AI agents from agent-vending-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Estimates the size of a U.S. household market segment using Census and ACS PUMS data, with a 90% margin of error for custom criteria.

## Facts

- Endpoint: POST https://agent-vending-production.up.railway.app/v1/market-size?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/market-size-84b98ee7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XGvtVsxHlCOdzksbQygOK

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 market-size-84b98ee7 -d '<json body>'
```

Example prompt: How many renter households with annual income between $50,000 and $100,000 are there in Travis County, Texas? Give me a Census-backed estimate with a margin of error.

## When to prefer this

Use this endpoint when you need a statistically defensible, Census-backed estimate of a specific U.S. household market segment defined by income, tenure, age, family structure, housing costs, or other household characteristics. It is especially valuable when you need an official margin of error for investor presentations, market research, or planning. Prefer this over generic demographic APIs when the query is specifically about household counts filtered by multiple socioeconomic criteria at the state, county, or PUMA level.

## Known failure modes

- Unsupported geography type or criteria combination — request refused and not charged
- County not composed of whole PUMAs when custom filters are used — returns refusal
- Invalid filter variable, operator, or value — schema validation error
- Geography not found or ambiguous name — error response
- Dollar amounts outside ACS PUMS coverage range — refusal or no result
- Too many filters (>8) — schema validation error

## How this service works

Pay-per-call machine utilities for autonomous agents.

## Output

Returns the strongest defensible household count available: either an official Census published estimate or a direct ACS PUMS survey estimate, both accompanied by a 90% confidence margin of error. Unsupported geography/criteria combinations are refused without charge.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "unit": {
   "enum": [
    "household"
   ],
   "type": "string",
   "description": "Household markets only"
  },
  "filters": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "variable",
     "operator",
     "value"
    ],
    "properties": {
     "value": {
      "description": "number; [low, high] for between; owner|renter for tenure; true/false for children_present; married_couple|other_family|nonfamily for family_status"
     },
     "operator": {
      "enum": [
       ">=",
       ">",
       "<",
       "<=",
       "==",
       "between",
       "in"
      ],
      "type": "string"
     },
     "variable": {
      "enum": [
       "household_income",
       "tenure",
       "householder_age",
       "children_present",
       "household_size",
       "family_status",
       "gross_rent",
       "monthly_owner_costs",
       "monthly_housing_cost",
       "home_value"
      ],
      "type": "string"
     }
    }
   },
   "maxItems": 8,
   "description": "All filters are combined with AND. Dollar amounts are 2023 dollars."
  },
  "geography": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "name": {
     "type": "string",
     "description": "County name, e.g. \"Ventura County\""
    },
    "puma": {
     "type": "string",
     "description": "5-digit 2020 PUMA code"
    },
    "type": {
     "enum": [
      "state",
      "county",
      "puma",
      "us",
      "place",
      "tract",
      "zcta",
      "county_set"
     ],
     "type": "string"
    },
    "zcta": {
     "type": "string"
    },
    "state": {
     "type": "string",
     "description": "State name, postal code or FIPS (not needed for us/zcta)"
    },
    "tract": {
     "type": "string"
    },
    "counties": {
     "type": "array",
     "items": {
      "type": "object"
     },
     "description": "county_set: 2-50 counties"
    },
    "place_fips": {
     "type": "string"
    },
    "county_fips": {
     "type": "string",
     "description": "3-digit county FIPS (alternative to name)"
    }
   },
   "description": "Where to size the market. Custom criteria combinations: state, puma, or a county made of whole PUMAs. us, place, tract, zcta and county_set are answered only when a published Census table covers the criteria (e.g. renter households); otherwise the request is refused, no charge.",
   "additionalProperties": true
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": {
   "label": "2023 ACS 5-year, table B25003",
   "table": "B25003",
   "universe": "Occupied housing units (households)"
  },
  "status": "OK",
  "criteria": [
   "tenure=renter"
  ],
  "warnings": [],
  "geography": {
   "type": "county",
   "geoid": "06111",
   "display_name": "Ventura County, California"
  },
  "uncertainty": {
   "label": "90% margin of error (official Census)",
   "level": 0.9,
   "lower": 97600,
   "upper": 101700,
   "display": "97,600–101,700 households"
  },
  "data_vintage": "ACS 2019-2023 5-year (2023 release)",
  "estimate_type": "OFFICIAL_CENSUS_ESTIMATE",
  "estimated_market": {
   "raw": 99657,
   "count": 100000,
   "display": "~100,000 households"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/market-size-84b98ee7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-vending-production.up.railway.app](https://www.zero.xyz/host/agent-vending-production.up.railway.app/llms.txt)
