# REST reference

A small public REST surface supports location lookup, MA catalog search, and published-content access.

[Download the generated OpenAPI document](/openapi.json). Its schemas come from shared contracts. The API-host operations and main-site content operations have different origins; use the origin declared for each operation.

## Location lookup

```bash
curl 'https://api.thepocketprotector.com/api/zip-counties?zip=60614'
```

Use the returned county choices. Do not infer a county from a ZIP prefix or choose the first of several counties.

## MA catalog search

```bash
curl 'https://api.thepocketprotector.com/api/ma-plans?zip=60614&limit=1'
```

This is a catalog lookup, not a personalized ranking or eligibility determination. Read the query echo, actual coverage year, pagination and service-area context. The public MCP handles the guided workflow.

## Search published content

```bash
curl https://thepocketprotector.com/api/public-content/search \
  -H 'Content-Type: application/json' \
  -d '{"query":"enrollment","content_type":"all","limit":5}'
```

The POST body keeps topic queries out of URLs. Do not include beneficiary information.

## Retrieve a content item

```bash
curl 'https://thepocketprotector.com/api/public-content/items/learn:how-to-choose-medicare-plan'
```

Use an ID returned by search. HTTP 404 means the item is not published or no longer available; HTTP 503 means the service could not complete the read.

## Limits

Public content uses shared weighted work and concurrency limits as well as local and edge limits. See [Operations](/operations/) for the budgets. MCP and API-host limits are separate: respect Retry-After, including when shared capacity is busy. These interfaces are intended for server-side integrations; no browser CORS permission is implied.
