---
title: "Per-category travel times for many blocks"
method: POST
path: "/v1/blocks/summary"
tags: ["batch"]
---

# Per-category travel times for many blocks

`POST /v1/blocks/summary`

## Request

- Base URL: `https://api.close.city`
- URL: `https://api.close.city/v1/blocks/summary`
- Auth: HTTP bearer

Fastest travel time from each of many census blocks to each destination
category, by mode. This is the batch form of `GET /v1/blocks/{geoid}/summary`.
Each result row carries its origin `geoid`, and per-block population and land
area come back in `blocks`. The whole batch counts as one request against the
rate limit.

## Request body

- BlockSummaryBatch
  - `mode` string[], nullable: Travel modes; default all
  - `origins` string[], required: Census block GEOIDs (1-250)
  - `type` integer[], nullable: Destination type ids; default all

## Response `200`

Successful Response

- BatchBlockSummaryResponse: POST /v1/blocks/summary (routers.batch.blocks_summary_batch)
  - `blocks` BlockMeta[], required: Per-origin block metadata
    - `geoid` string, required: 15-digit census block GEOID
    - `land_area_m2` number, nullable: Block land area in square metres
    - `population` integer, nullable
  - `errors` OriginError[], required
    - `detail` string, required
    - `type` string, required: Error slug: block-not-found, no-block-data, point-not-covered, or poi-not-found
  - `results` BatchBlockCategoryTime[], required
    - `dest_type_id` integer, required
    - `geoid` string, required: Origin block GEOID
    - `mode` string, required: Travel mode label, e.g. 'walk'
    - `travel_time` number, required: Minutes, capped at 30, 1 decimal
  - `truncated` string[], required: Origin GEOIDs skipped once the row budget was spent
  - `truncated_reason` string, nullable: 'insufficient-balance' or 'row-budget'; null if nothing was truncated

## Other responses

- `400`: Invalid request (e.g. invalid-parameters, invalid-cursor, invalid-bbox, missing-location, missing-area, invalid-geometry, polygon-too-complex, missing-origins, too-many-origins)
- `401`: Missing or invalid API key (missing-key, invalid-key)
- `403`: Key disabled (account-disabled)
- `429`: Rate limited or token balance exhausted (rate-limited, tokens-exhausted); sets Retry-After
- `503`: Backend temporarily unavailable (debit-unavailable, store-unavailable); may set Retry-After

---

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