# Instructions for AI agents using Palavue

Palavue provides derived measures for every US county. Follow these rules.

1. Start free: `GET https://api.palavue.com/v1/catalog`, `GET https://api.palavue.com/v1/measures`, `GET https://api.palavue.com/v1/counties?q=<name>&state=<ST>`. No key needed.
2. A person buys a plan; you cannot buy. Use `quote_order` or `POST https://api.palavue.com/v1/quote` to get a `cart_url` for them.
3. Authenticate with `Authorization: Bearer $PALAVUE_KEY`. Never print or store the key in logs, files or chat.
4. Ask only for what you need: `metrics` limits measures; pulls return at most 100 counties, page with `after` until `next` is null. Prefer `If-None-Match` on single counties.
5. Respect limits: 60/min and 10,000 records/day (Pay once, Subscribe); 600/min and no cap on On demand. On 429, back off.
6. On demand bills per record. Check `GET /v1/me` and set `POST /v1/spend-controls` (cap_usd) before large pulls. On 402 `payment_failed`, tell the person to replace their card; do not retry in a loop.
7. Read `status`: `reported` is a number; `estimated` is a repeated old value, not a forecast; `unavailable` and `held` are empty. A blank is missing, not zero. `national_rank` 1 is highest; `cohort_n` differs per measure.
8. Say what a measure cannot say (`cannot_say` in the definitions). Ranks and associations are not causes.
9. Credit: "Source: Palavue County Economy Bundle (palavue.com), edition <edition>". Redistribution and model training are not included.
10. Errors are JSON `{"error": "<code>", "message": "..."}`; branch on `error`.

Full guide: https://palavue.com/llms-full.txt. Prompts: https://palavue.com/prompts.md. Docs: https://palavue.com/docs.html. MCP server: https://api.palavue.com/mcp.
