---
title: "Cross-state premium/policy-count comparison"
method: GET
path: "/v1/compare"
---

# Cross-state premium/policy-count comparison

`GET /v1/compare`

## Request

- Base URL: `https://api.querylines.com`
- URL: `https://api.querylines.com/v1/compare`
- Auth: none declared

$0.50 per query -- the cross-state differentiator (CLAUDE.md).

## Query parameters

- `states` string, required
- `line` string
- `from` string
- `to` string
- `granularity` 'month' | 'quarter' | 'half' | 'year'
- `report_date` string

## Response `200`

Per-state series keyed by state code.

- object
  - `line` string, required
  - `granularity` 'month' | 'quarter' | 'half' | 'year', required
  - `series` object, required
  - `report_date` string, nullable, required
  - `data_as_of` string, nullable, required
  - `source` object, required

## Other responses

- `400`: Invalid query parameters.
- `402`: Payment required (x402). Returned when the x402 payment gate is enabled (PAY_TO_ADDRESS configured) and the request carries no valid payment. The full payment challenge (price/network/payTo/asset) is carried in the base64-encoded PAYMENT-REQUIRED response header (see the x402 spec), not the JSON body -- the body is `{}` for API clients. Price for this route: $0.50. Retry with a signed payment per x402 (USDC on Base mainnet); on success the response carries a PAYMENT-RESPONSE header with settlement info. When PAY_TO_ADDRESS is unset (kill switch off), this route is free and never returns 402.
- `404`: Unknown state or coverage line.
- `500`: Internal error.

---

[API](https://skmtc.dev/querylines/apis/querylines-api.md) · [All operations](https://skmtc.dev/querylines/apis/querylines-api/llms.txt) · [OpenAPI document](https://skmtc.dev/querylines/apis/querylines-api/revisions/4afb6c3e2b1f?raw)
