# Location Compare

> Location Compare 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-11).

Compare 2–10 U.S. geographies side-by-side across up to 16 Census demographic, income, education, housing, and workforce metrics in a single call.

## Facts

- Endpoint: POST https://agent-vending-production.up.railway.app/v1/location-compare?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/location-compare-a7d1d6e8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9yRzxUt_0p3s-WzZ_I5_V

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 location-compare-a7d1d6e8 -d '<json body>'
```

Example prompt: Compare Austin TX, Denver CO, and Nashville TN side by side across all 16 core Census metrics — population, income, education, housing, and workforce — and include national benchmarks so I can see where each city stands relative to the U.S. average.

## When to prefer this

Choose this endpoint when you need a structured, multi-metric side-by-side comparison of 2–10 specific U.S. locations rather than a profile of a single place, a similarity search, or a ranked site-selection query. It is ideal when the user already knows which locations to compare and wants normalized Census statistics with optional national benchmarks and percentiles in one call, rather than making separate lookups and aligning data manually.

## Known failure modes

- Fewer than 2 or more than 10 locations provided — request rejected
- Mixed geography types (e.g. state + county) without allow_mixed_geography_types=true — request refused without charge
- Unresolvable location name or GEOID — returns error for that geography
- Census data unavailable for a given tract or ZCTA — metric returned as null
- Invalid metric name in custom list — validation error returned

## How this service works

Pay-per-call machine utilities for autonomous agents.

## Output

Returns a structured side-by-side table of requested metrics for each input geography, optionally including U.S. national and state-level benchmark values and national percentile rankings for each metric, enabling direct quantitative comparison across locations.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "metrics": {
   "oneOf": [
    {
     "enum": [
      "CORE_COMPARE"
     ],
     "type": "string"
    },
    {
     "type": "array",
     "items": {
      "enum": [
       "total_population",
       "median_age",
       "median_household_income",
       "per_capita_income",
       "poverty_rate",
       "unemployment_rate",
       "labor_force_participation_rate",
       "bachelors_or_higher_pct",
       "high_school_or_higher_pct",
       "homeownership_rate",
       "median_home_value",
       "median_gross_rent",
       "uninsured_rate",
       "foreign_born_pct",
       "under18_pct",
       "65plus_pct"
      ],
      "type": "string"
     }
    }
   ],
   "description": "Default CORE_COMPARE (16 metrics) or a subset list"
  },
  "locations": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "type"
    ],
    "properties": {
     "name": {
      "type": "string",
      "description": "e.g. \"Ventura County\", \"Thousand Oaks\", \"91362\", \"CA\", tract code"
     },
     "type": {
      "enum": [
       "state",
       "county",
       "place",
       "zcta",
       "tract"
      ],
      "type": "string"
     },
     "geoid": {
      "type": "string",
      "description": "Census GEOID alternative to name (county 5, place 7, tract 11 digits)"
     },
     "state": {
      "type": "string",
      "description": "State name, postal code or FIPS (county/place/tract by name)"
     },
     "county": {
      "type": "string",
      "description": "County name or FIPS (tract only)"
     }
    },
    "description": "A U.S. geography by type plus name or GEOID. No Census table or variable IDs needed.",
    "additionalProperties": true
   },
   "maxItems": 10,
   "minItems": 2,
   "description": "2-10 geographies of the same type (mixed types only with allow_mixed_geography_types)"
  },
  "include_benchmarks": {
   "type": "boolean",
   "description": "U.S./state reference values and national percentiles (default true)"
  },
  "allow_mixed_geography_types": {
   "type": "boolean",
   "description": "Default false (mixed types refused, not charged)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "OK",
  "product": "location_compare",
  "summary": {
   "largest_differences": [
    {
     "lowest": "San Diego County, California",
     "metric": "median_age",
     "highest": "Ventura County, California",
     "difference": 2.3,
     "difference_unit": "years",
     "national_percentile_spread": 14
    }
   ]
  },
  "locations": [
   {
    "name": "Ventura County, California",
    "geoid": "06111",
    "geo_type": "county"
   },
   {
    "name": "Orange County, California",
    "geoid": "06059",
    "geo_type": "county"
   },
   {
    "name": "San Diego County, California",
    "geoid": "06073",
    "geo_type": "county"
   }
  ],
  "comparison": [
   {
    "unit": "usd",
    "lowest": {
     "geoid": "06073",
     "estimate": 102285
    },
    "metric": "median_household_income",
    "values": [
     {
      "geoid": "06111",
      "moe_90": 1391,
      "estimate": 107327,
      "national_percentile": {
       "percentile": 96.91
      }
     },
     {
      "geoid": "06059",
      "moe_90": 986,
      "estimate": 113702,
      "national_percentile": {
       "percentile": 98.03
      }
     },
     {
      "geoid": "06073",
      "moe_90": 899,
      "estimate": 102285,
      "national_percentile": {
       "percentile": 95.98
      }
     }
    ],
    "highest": {
     "geoid": "06059",
     "estimate": 113702
    },
    "comparison_status": "SIGNIFICANT_DIFFERENCE",
    "largest_difference": {
     "difference": 11417,
     "difference_unit": "usd",
     "significance_90": {
      "significant": true
     },
     "percent_difference_vs_lowest": 11.16
    }
   }
  ],
  "provenance": [
   {
    "dataset": "acs/acs5/profile",
    "provider": "census_acs",
    "release_year": 2023
   }
  ],
  "data_vintage": {
   "label": "ACS 5-Year 2019-2023",
   "dataset": "ACS 5-Year",
   "release_year": 2023
  },
  "vintage_check": {
   "release_year": 2023,
   "same_vintage": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/location-compare-a7d1d6e8/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)
