# US State, DC & Territory Lookup by Postal Code, Name, or FIPS

> US State, DC & Territory Lookup by Postal Code, Name, or FIPS is a paid API for AI agents from country-codes-iso.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Looks up a US state, DC, or territory by USPS postal code, full name, or FIPS number and returns all three identifiers plus the entity type.

## Facts

- Endpoint: GET https://country-codes-iso.x402tookit.com/us-state-code?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-state-dc-territory-lookup-by-postal-code-name-or-fips-cacf3d45
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qhWo8ic44nQId411w02i2

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 us-state-dc-territory-lookup-by-postal-code-name-or-fips-cacf3d45
```

Example prompt: What is the FIPS code and full name for the US state with postal code CO?

## When to prefer this

Use this endpoint when you need to cross-reference or normalize US state, DC, or territory identifiers — specifically to convert between USPS postal codes, full names, and FIPS numbers in one call. It also returns the entity type (state vs territory vs DC), making it more informative than a simple abbreviation lookup table. Prefer this over general country-code endpoints when the lookup is specifically for US subnational divisions.

## Known failure modes

- Invalid or unrecognized query string returns a null state object with reasons explaining the mismatch
- Ambiguous input (e.g. a number that could match multiple FIPS codes) may return degraded results with a matchedOn field explaining partial resolution
- Network or service errors result in a non-200 response with no state data

## How this service works

US state, DC and territory lookup by USPS postal code, name or FIPS number; returns all three plus the type.

## Output

Returns an object containing the matched entity's USPS postal code, full official name, FIPS number, and kind (e.g. state, territory, district), along with metadata about what field was matched on, source attribution, and a summary.

## 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": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Postal code, name or FIPS: CO, Colorado, 08"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "state": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "fips": {
         "type": [
          "null",
          "string"
         ]
        },
        "kind": {
         "type": [
          "null",
          "string"
         ]
        },
        "name": {
         "type": [
          "null",
          "string"
         ]
        },
        "postal": {
         "type": [
          "null",
          "string"
         ]
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "matchedOn": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "attribution": {
       "type": [
        "null",
        "string"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-state-dc-territory-lookup-by-postal-code-name-or-fips-cacf3d45/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from country-codes-iso.x402tookit.com](https://www.zero.xyz/host/country-codes-iso.x402tookit.com/llms.txt)
