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

# Per-POI travel times for many blocks

`POST /v1/blocks/pois`

## Request

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

Every nearby POI and its travel time from each of many census blocks, one
row per (origin block, POI, mode). This is the batch form of
`GET /v1/blocks/{geoid}/pois`. Each row carries its origin `geoid`. The batch
is not paginated, so each origin returns all matching POIs within
`max_minutes`.

## Request body

- BlockPoisBatch
  - `dest_id` integer[], nullable
  - `max_minutes` number, nullable
  - `mode` string[], nullable
  - `origins` string[], required: Census block GEOIDs (1-250)
  - `type` integer[], nullable

## Response `200`

Successful Response

- BatchBlockPoisResponse: POST /v1/blocks/pois (routers.batch.blocks_pois_batch)
  - `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` BatchBlockPoiTime[], required
    - `address` Address, required: A POI street address; every field is nullable. (shape.shape_pois, queries.pois.detail)
      - `city` string, nullable
      - `state` string, nullable
      - `street` string, nullable
      - `zip` string, nullable
    - `dest_id` integer, required
    - `geoid` string, required: Origin block GEOID
    - `lat` number, required
    - `lon` number, required
    - `mode` string, required
    - `name` string, required
    - `travel_time` number, required: Minutes, capped at 30, 1 decimal
  - `truncated` string[], required
  - `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)
