POST /v1/permits/stats counts permits and groups them. It counts the permits that a
Permits API search of the same area and filters would match.
Use it to see trends without paging through every permit.
- Each group returned costs one permit row: $0.012 on Free, $0.0086 on Build and $0.0072 on Growth. See Pricing.
- A call that returns no group is free. That includes a count (
limit: 0), an area with no matching permits, and a parcel address or point that selects no single parcel. - It needs accepted terms and licensed access with the
earth.searchscope, the same as a permits search. See Authentication.
Example: solar permits per month in one county
mireye_permits_stats. Send the same body inside req:
Request
- Any other key is rejected with
422. There is nosortand nocursor. - An unknown
group_byor measure is rejected with the valid values.
Groups
- With
tag, a permit with two tags counts in both groups. So the tag groups can add up to more thantotal_permits. Thenotesays so. - Groups with the same count are ordered by
key.
Measures
A measure is
null when no permit in the group has a value for it.
Response
- With
partial,not_collectedornullcoverage, every count is a lower bound. A0is then not proof that no permits exist. - Branch on
coverage, not on thenotetext.
Count for free
Sendlimit: 0 to get total_groups and total_permits with no groups. It is not
charged.
Price
- One permit row for each group returned.
- The most it can cost,
limitrows, is reserved first. Setmax_cost_usdat or above it. - A call with no group is free:
- a count (
limit: 0); - an area with no matching permits;
- a parcel address or point that selects no single parcel;
- a call that fails.
- a count (
- Send a stable
Idempotency-Keyto retry without a second charge. See Retries.
Errors
The same as a permits search. See Errors. A request that is not valid gets422 permits_invalid_request with a problems list.
Related pages
- Permits API: the permit records themselves.
- Permits parcels: one row per parcel.
- Permits coverage.
- Permits known issues.