{"openapi":"3.1.0","info":{"title":"MapLark APIs","description":"A fast, hosted API for querying live OpenStreetMap data from PostGIS. Ask for the features you care about (cafes, bike paths, bridges, buildings, and more) and get back clean geometry, ready to drop on a map or into your pipeline.\n\n- **Flexible filters:** bounding box, radius, containing area, or OSM ID, combined with OSM tags and a small tag query language (AND, OR, negation, numeric and regex compares).\n- **Your format:** GeoJSON by default, or FlatGeobuf, GeoParquet, CSV, and TSV via the `Accept` header.\n- **Extras:** places, feature counts, density grids, and routing helpers alongside the main query.\n\n### Good to know\n- **Start with `GET /v3/osm_features`** \n- **Limits depend on your tier:** max results, search area size, request rate, and monthly usage units. Large areas with no tags are the quickest way to hit them.\n- **Too many matches is an error, not a truncation.** If the match set is larger than your tier's `max_limit` the request fails with `result_too_large`. Narrow the area or add tags. A lower `limit` just truncates (`X-Has-More: true`).\n- **Usage is metered.** Cost grows with query time, so tight filters are cheaper and faster.\n\n### What's new (2026-11-04)\n- **`node_ids` param on `GET /v3/osm_features`:** way features now carry `properties.node_ids`, the ordered OSM node IDs (on by default). \n- **`members` param on `GET /v3/osm_features`:** relation features now carry `properties.members`, the ordered members as `{type, ref, role}` objects (on by default). \n### What's new (2026-10-13)\n- **Tags query language:** the `tags` param now supports AND, OR, negation, numeric compares, and regex.\n- **Density endpoint:** get feature density grids for an area.","version":"1.1.0"},"paths":{"/health":{"get":{"summary":"Health check","description":"Returns service and DB connectivity status.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/osm_features":{"get":{"tags":["OSM Features API"],"summary":"Deprecated. Paginated OSM features. Use GET /v3/osm_features.","description":"Deprecated. Paginated OSM features. Use `GET /v3/osm_features`.\n\nPages with `cursor` and headers `X-Returned`, `X-Has-More`, `X-Next-Cursor`.\n`limit` defaults to 1000 (max 10000). Results are ordered by `osm_id`.\n\nCredits match `/v3/osm_features` per page. Charged after the query.\nLarger, slower, or heavier pages cost more.","operationId":"get_features_v2_osm_features_get","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","title":"Type"}},{"name":"way_shape","in":"query","required":false,"schema":{"type":"string","title":"Way Shape"}},{"name":"shape","in":"query","required":false,"schema":{"type":"string","deprecated":true,"title":"Shape"},"deprecated":true},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"}},{"name":"radius","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Radius"}},{"name":"bbox","in":"query","required":false,"schema":{"type":"string","title":"Bbox"}},{"name":"osm_ids","in":"query","required":false,"schema":{"type":"string","title":"Osm Ids"}},{"name":"within","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Within"}},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":85,"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`","default":[],"title":"Tags"},"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`"},{"name":"or_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Or Tags"},"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"not_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Not Tags"},"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"disable_budget_warning","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Disable Budget Warning"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"zoom","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Zoom"}},{"name":"min_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Length M"}},{"name":"max_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Max Length M"}},{"name":"min_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Area M2"}},{"name":"max_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Max Area M2"}},{"name":"centroid","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Centroid"}},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"Way features include `properties.node_ids`, the ordered OSM node IDs of the way (a closed way repeats its first ID). Default true. Pass false for smaller responses.\n\n**Known limitation:** for polygon ways, `node_ids` follow the original way order, but the stored ring is normalized (counter-clockwise, starting at a different vertex), so `node_ids[n]` does not line up with the nth coordinate of the geometry. The outline itself is correct. Line ways are unaffected.","default":true,"title":"Node Ids"},"description":"Way features include `properties.node_ids`, the ordered OSM node IDs of the way (a closed way repeats its first ID). Default true. Pass false for smaller responses.\n\n**Known limitation:** for polygon ways, `node_ids` follow the original way order, but the stored ring is normalized (counter-clockwise, starting at a different vertex), so `node_ids[n]` does not line up with the nth coordinate of the geometry. The outline itself is correct. Line ways are unaffected."},{"name":"clipGeometry","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Clipgeometry"}}],"responses":{"200":{"description":"Feature page. Choose encoding with the media-type dropdown (``Accept``). Default ``application/geo+json``.","content":{"application/geo+json":{"schema":{"$ref":"#/components/schemas/GeoJSONFeatureCollectionResponse"},"example":{"type":"FeatureCollection","features":[{"type":"Feature","id":"way/123456789","geometry":{"type":"Polygon","coordinates":[[[18.0701,59.334],[18.0703,59.334],[18.0703,59.3342],[18.0701,59.3342],[18.0701,59.334]]]},"properties":{"tags":{"building":"yes","addr:street":"Kungsgatan"},"centroid":{"type":"Point","coordinates":[18.0702,59.3341]},"area_m2":412.5}}]}},"text/csv":{"schema":{"type":"string"},"example":"id,geometry,centroid,length_m,area_m2,node_ids,tags,members\nway/123456789,\"POLYGON((18.0701 59.334,18.0703 59.334,18.0703 59.3342,18.0701 59.3342,18.0701 59.334))\",POINT(18.0702 59.3341),,412.5,,\"{\"\"addr:street\"\":\"\"Kungsgatan\"\",\"\"building\"\":\"\"yes\"\"}\",\n"},"text/tab-separated-values":{"schema":{"type":"string"},"example":"id\tgeometry\tcentroid\tlength_m\tarea_m2\tnode_ids\ttags\tmembers\nway/123456789\tPOLYGON((18.0701 59.334,18.0703 59.334,18.0703 59.3342,18.0701 59.3342,18.0701 59.334))\tPOINT(18.0702 59.3341)\t\t412.5\t\t\"{\"\"addr:street\"\":\"\"Kungsgatan\"\",\"\"building\"\":\"\"yes\"\"}\"\t\n"},"application/flatgeobuf":{"schema":{"type":"string","format":"binary","description":"FlatGeobuf binary FeatureCollection."}},"application/vnd.apache.parquet":{"schema":{"type":"string","format":"binary","description":"GeoParquet (Apache Parquet) binary FeatureCollection."}}},"headers":{"X-Returned":{"description":"Number of features in this page.","schema":{"type":"integer"}},"X-Has-More":{"description":"Whether another page is available (`true` / `false`).","schema":{"type":"string"}},"X-Next-Cursor":{"description":"Opaque cursor for the next page when X-Has-More is true.","schema":{"type":"string"}}}},"400":{"description":"Bad request: invalid filters, spatial limits, or query parameters."},"401":{"description":"Unauthorized: missing or invalid API key."},"403":{"description":"Forbidden: unrecognized tier."},"429":{"description":"Too many requests: per-second rate limit."},"422":{"description":"Validation error in one or more request parameters."}}}},"/v3/osm_features":{"get":{"tags":["OSM Features API"],"summary":"Query OpenStreetMap features by tags and bounding box and get GeoJSON, FlatGeobuf, GeoParquet, or CSV.","description":"Returns OSM features matching the given filters in one response\n(default GeoJSON FeatureCollection).\n\n**Spatial anchors**:\n- `bbox` - overlap this rectangle.\n- `location`, `radius` - within `radius` metres of `location=lat,lng`.\n  A filter, not a ranking.\n- `within=relation/<id>` or `within=way/<id>` - ST_Covers inside that OSM polygon\n  (boundary included).\n\n**Direct ID lookup**\n- `osm_ids=id1,id2,...` - fetch specific features by numeric OSM ID.\n- Cannot be combined with spatial anchors or tag filters.\n\n**Tag filters**\n- require a spatial anchor\n- Join clauses with `,` (AND; repeating `tags` also ANDs). Join alternatives with\n  `|` (OR), group with parentheses (`(a,b)|c`), and prefix `!` to negate one clause.\n  Example: `tags=shop,amenity=cafe|amenity=bakery`.\n- URL-encode `>` as `%3E`: `tags=ele%3E500`.\n- Also `key!=value`, `key>n`, `key~\"regex\"`. Quote values containing `,`, `|` or `&`:\n  `tags=name=\"Ben, Jerry's\"`. Regex values are always quoted.\n- Regex cannot use an index, so AND it with an indexed tag.\n\nLong OR groups (five or more) are slow; split them into separate queries and merge.\n\n\n**Optional Parameters**:\n\n**Output Format**\n- Set the ``Accept`` header to the media type you want. Default GeoJSON.\n- `application/geo+json` (default)\n- `text/csv` / `text/tab-separated-values` fixed columns (id, geometry WKT, centroid, length_m, area_m2, node_ids JSON, tags JSON, members JSON)\n- `application/flatgeobuf` / `application/vnd.apache.parquet` binary from EWKB\n\n**Type**\n- `type=node|way|relation`\n    - One or more comma-separated OSM element types (for example, `type=node,way`).\n- Omit to query all three: node, way, and relation.\n- In OSM, a way can be open (line) or closed (polygon); use `way_shape` to narrow.\n\n**Way shape**\n- Geometry class for ways/relations (`line` / `polygon` / `all`). Nodes are always\n  points and are unioned when `type` includes `node`.\n- `way_shape=line` - open ways (roads, paths, rivers) or line-shaped relations.\n- `way_shape=polygon` - closed ways (buildings, parks) or multipolygon relations.\n- `way_shape=all` (or omit) - both line and polygon geometries.\n- Examples: `type=way&way_shape=polygon&tags=building` (polygon table only);\n  `type=node,way&way_shape=polygon` returns points plus area POIs;\n  `type=node,way&way_shape=line` returns points plus lines.\n- `shape` is a deprecated alias for `way_shape`.\n\n**Size**:\n- `min_length_m` / `max_length_m` - inclusive line length bounds in metres.\n- `min_area_m2` / `max_area_m2` - inclusive polygon area bounds in square metres.\n- `length_m` filters require line-capable routes (`way_shape=line` or `way_shape=all` with way/relation).\n- `area_m2` filters require polygon-capable routes (`way_shape=polygon` or `way_shape=all` with way/relation).\n\n**Credits:**\n- Charged after the query. Larger, slower, or heavier responses cost more.\n- `result_too_large` and a statement timeout are billed, with no feature\n  body. The 400 includes `units` and `X-Usage-Units-Charged`.\n\n**Response:**\n- For GeoJSON, FeatureCollection matching the filters.\n- For CSV, a table with rows and fixed columns.\n- For FlatGeobuf, binary features from EWKB.\n- Timeout is 120s (HTTP 400 `query_timeout` with a JSON body; split the window).\n\nHeaders:\n- `X-Returned` - number of features in this response.\n- `X-Has-More` - `true` when this response used limit and was truncated below `max_limit`.\n- `X-Query-Hint` - when present, how to make the query cheaper (missing\n  `type`/`way_shape`, tag-free scan, long OR groups, time/size billing,\n  or over the per-request allowance).\n\n**What's rejected (400):**\n- `limit` above this tier's `max_limit` (`limit_exceeds_tier`)\n- match set larger than `max_limit` (`result_too_large`; no partial body)\n- tag filter without a spatial anchor\n- `osm_ids` combined with a spatial anchor or tag filter\n- bbox area or radius exceeding your tier's tagged/tag-free limits\n\n**Examples** (Stockholm):\n\nBuildings:\n`GET /v3/osm_features?bbox=18.05,59.33,18.10,59.36&type=way&way_shape=polygon&tags=building`\n\nCafes within 500 m:\n`GET /v3/osm_features?location=59.334,18.063&radius=500&tags=amenity=cafe`\n\nCycleways or roads with a bicycle tag:\n`GET /v3/osm_features?bbox=18.05,59.33,18.10,59.36&type=way&way_shape=line&tags=highway=cycleway|bicycle`\n\nAll roads:\n`GET /v3/osm_features?bbox=18.05,59.33,18.10,59.36&type=way&way_shape=line&tags=highway`\n\nFetch by ID:\n`GET /v3/osm_features?type=way&osm_ids=111,222,333`\n\nPeaks over 500 m (repeated `tags` AND, `>` as `%3E`):\n`GET /v3/osm_features?bbox=18.05,59.33,18.10,59.36&type=node&tags=natural=peak&tags=ele%3E500`\n\nAddresses inside an OSM polygon:\n`GET /v3/osm_features?within=relation/155790&type=node&tags=addr:housenumber`","operationId":"get_features_v3_v3_osm_features_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bbox","in":"query","required":false,"schema":{"type":"string","description":"Rectangle as `min_lon,min_lat,max_lon,max_lat`. Overlap this box. Example: `18.05,59.33,18.10,59.36`","title":"Bbox"},"description":"Rectangle as `min_lon,min_lat,max_lon,max_lat`. Overlap this box. Example: `18.05,59.33,18.10,59.36`"},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Radius centre as `lat,lng`. Requires `radius`. Example: `location=59.334,18.063&radius=500`","title":"Location"},"description":"Radius centre as `lat,lng`. Requires `radius`. Example: `location=59.334,18.063&radius=500`"},{"name":"radius","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"description":"Metres from `location`. A filter, not a ranking.","title":"Radius"},"description":"Metres from `location`. A filter, not a ranking."},{"name":"within","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Polygon spatial anchor as `way/<id>` or `relation/<id>`. Features must be ST_Covers inside that OSM polygon, such as an admin boundary. Example: `within=relation/155790&type=node&tags=addr:housenumber`","title":"Within"},"description":"Polygon spatial anchor as `way/<id>` or `relation/<id>`. Features must be ST_Covers inside that OSM polygon, such as an admin boundary. Example: `within=relation/155790&type=node&tags=addr:housenumber`"},{"name":"osm_ids","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated OSM IDs for direct lookup. Mutually exclusive with `bbox`, `location`/`radius`, `within`, and all tag filters. Example: `osm_ids=111,222,333`","title":"Osm Ids"},"description":"Comma-separated OSM IDs for direct lookup. Mutually exclusive with `bbox`, `location`/`radius`, `within`, and all tag filters. Example: `osm_ids=111,222,333`"},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":85,"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`","default":[],"title":"Tags"},"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`"},{"name":"or_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Or Tags"},"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"not_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Not Tags"},"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"OSM element type to query. One of: ['node', 'relation', 'way']. Accepts a comma-separated list to query multiple element types. Default when omitted: node, way, and relation. A way can be open (line) or closed (polygon); use the `way_shape` parameter to narrow to one or the other.","title":"Type"},"description":"OSM element type to query. One of: ['node', 'relation', 'way']. Accepts a comma-separated list to query multiple element types. Default when omitted: node, way, and relation. A way can be open (line) or closed (polygon); use the `way_shape` parameter to narrow to one or the other."},{"name":"way_shape","in":"query","required":false,"schema":{"type":"string","description":"Geometry class for ways/relations. One of: ['all', 'line', 'polygon']. Nodes are always points and are unioned when `type` includes `node`; `type=node` alone stays on the point table (way_shape is ignored). `line` - open ways or line-shaped relations (routes, boundaries). `polygon` - closed ways or multipolygon relations. `all` - both shapes (default). Example: `type=way&way_shape=polygon&tags=building` returns building polygons. Example: `type=node,way&way_shape=polygon` returns points plus area POIs.","title":"Way Shape"},"description":"Geometry class for ways/relations. One of: ['all', 'line', 'polygon']. Nodes are always points and are unioned when `type` includes `node`; `type=node` alone stays on the point table (way_shape is ignored). `line` - open ways or line-shaped relations (routes, boundaries). `polygon` - closed ways or multipolygon relations. `all` - both shapes (default). Example: `type=way&way_shape=polygon&tags=building` returns building polygons. Example: `type=node,way&way_shape=polygon` returns points plus area POIs."},{"name":"shape","in":"query","required":false,"schema":{"type":"string","description":"Deprecated alias for `way_shape`. Prefer `way_shape`.","deprecated":true,"title":"Shape"},"description":"Deprecated alias for `way_shape`. Prefer `way_shape`.","deprecated":true},{"name":"min_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum line length in metres (inclusive). Applies to line geometry routes.","title":"Min Length M"},"description":"Minimum line length in metres (inclusive). Applies to line geometry routes."},{"name":"max_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum line length in metres (inclusive). Applies to line geometry routes.","title":"Max Length M"},"description":"Maximum line length in metres (inclusive). Applies to line geometry routes."},{"name":"min_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum polygon area in square metres (inclusive). Applies to polygon geometry routes.","title":"Min Area M2"},"description":"Minimum polygon area in square metres (inclusive). Applies to polygon geometry routes."},{"name":"max_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum polygon area in square metres (inclusive). Applies to polygon geometry routes.","title":"Max Area M2"},"description":"Maximum polygon area in square metres (inclusive). Applies to polygon geometry routes."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":1},{"type":"null"}],"description":"Maximum features to return. Omitted means the caller's `max_limit`. A lower limit truncates and sets `X-Has-More`. A match set larger than `max_limit` is HTTP 400 result_too_large. There is no cursor.","title":"Limit"},"description":"Maximum features to return. Omitted means the caller's `max_limit`. A lower limit truncates and sets `X-Has-More`. A match set larger than `max_limit` is HTTP 400 result_too_large. There is no cursor."},{"name":"zoom","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Map zoom level used to simplify geometry at lower zooms. Default is highest zoom (full detail).","title":"Zoom"},"description":"Map zoom level used to simplify geometry at lower zooms. Default is highest zoom (full detail)."},{"name":"centroid","in":"query","required":false,"schema":{"type":"boolean","description":"When true, non-point features include `properties.centroid` (GeoJSON Point). Default false. Skip centroid computation for faster large polygon responses.","default":false,"title":"Centroid"},"description":"When true, non-point features include `properties.centroid` (GeoJSON Point). Default false. Skip centroid computation for faster large polygon responses."},{"name":"node_ids","in":"query","required":false,"schema":{"type":"boolean","description":"Way features include `properties.node_ids`, the ordered OSM node IDs of the way (a closed way repeats its first ID). Default true. Pass false for smaller responses.\n\n**Known limitation:** for polygon ways, `node_ids` follow the original way order, but the stored ring is normalized (counter-clockwise, starting at a different vertex), so `node_ids[n]` does not line up with the nth coordinate of the geometry. The outline itself is correct. Line ways are unaffected.","default":true,"title":"Node Ids"},"description":"Way features include `properties.node_ids`, the ordered OSM node IDs of the way (a closed way repeats its first ID). Default true. Pass false for smaller responses.\n\n**Known limitation:** for polygon ways, `node_ids` follow the original way order, but the stored ring is normalized (counter-clockwise, starting at a different vertex), so `node_ids[n]` does not line up with the nth coordinate of the geometry. The outline itself is correct. Line ways are unaffected."},{"name":"members","in":"query","required":false,"schema":{"type":"boolean","description":"Relation features include `properties.members`, the ordered OSM members as `{type, ref, role}`. Default true. Pass false for smaller responses.","default":true,"title":"Members"},"description":"Relation features include `properties.members`, the ordered OSM members as `{type, ref, role}`. Default true. Pass false for smaller responses."},{"name":"clipGeometry","in":"query","required":false,"schema":{"type":"boolean","description":"When true, trim returned geometry to the requested bbox or radius circle. Cuts long features that only clip the window. Default false: return full geometry.","default":false,"title":"Clipgeometry"},"description":"When true, trim returned geometry to the requested bbox or radius circle. Cuts long features that only clip the window. Default false: return full geometry."}],"responses":{"200":{"description":"At most `limit` features. `X-Has-More` is true when the match set was larger and `limit` is below the caller's `max_limit`. A match set larger than `max_limit` is HTTP 400 result_too_large. Choose encoding with Accept. Default application/geo+json.","content":{"application/geo+json":{"schema":{"$ref":"#/components/schemas/GeoJSONFeatureCollectionResponse"},"example":{"type":"FeatureCollection","features":[{"type":"Feature","id":"way/123456789","geometry":{"type":"Polygon","coordinates":[[[18.0701,59.334],[18.0703,59.334],[18.0703,59.3342],[18.0701,59.3342],[18.0701,59.334]]]},"properties":{"tags":{"building":"yes","addr:street":"Kungsgatan"},"centroid":{"type":"Point","coordinates":[18.0702,59.3341]},"area_m2":412.5}}]}},"text/csv":{"schema":{"type":"string"},"example":"id,geometry,centroid,length_m,area_m2,node_ids,tags,members\nway/123456789,\"POLYGON((18.0701 59.334,18.0703 59.334,18.0703 59.3342,18.0701 59.3342,18.0701 59.334))\",POINT(18.0702 59.3341),,412.5,,\"{\"\"addr:street\"\":\"\"Kungsgatan\"\",\"\"building\"\":\"\"yes\"\"}\",\n"},"text/tab-separated-values":{"schema":{"type":"string"},"example":"id\tgeometry\tcentroid\tlength_m\tarea_m2\tnode_ids\ttags\tmembers\nway/123456789\tPOLYGON((18.0701 59.334,18.0703 59.334,18.0703 59.3342,18.0701 59.3342,18.0701 59.334))\tPOINT(18.0702 59.3341)\t\t412.5\t\t\"{\"\"addr:street\"\":\"\"Kungsgatan\"\",\"\"building\"\":\"\"yes\"\"}\"\t\n"},"application/flatgeobuf":{"schema":{"type":"string","format":"binary","description":"FlatGeobuf binary FeatureCollection."}},"application/vnd.apache.parquet":{"schema":{"type":"string","format":"binary","description":"GeoParquet (Apache Parquet) binary FeatureCollection."}}},"headers":{"X-Returned":{"description":"Number of features in this response.","schema":{"type":"integer"}},"X-Has-More":{"description":"true when this response was truncated below the caller's max_limit. There is no next page; raise `limit` or narrow filters.","schema":{"type":"string"}},"X-Query-Hint":{"description":"Free-text advice when the query can be improved.","schema":{"type":"string"}}}},"400":{"description":"Bad request."},"401":{"description":"Unauthorized: missing or invalid API key."},"403":{"description":"Forbidden: unrecognized tier."},"429":{"description":"Too many requests: per-second rate limit."},"422":{"description":"Validation error in one or more request parameters."}}}},"/v2/osm_features/cost":{"get":{"tags":["OSM Features API"],"summary":"Deprecated. Preflight cost for paginated /v2/osm_features. Same row peek as v3.","description":"Deprecated. Estimate API credits for a `/v2/osm_features` page.\n\nSame spatial caps as that query, including `within` envelope area\n(one PostGIS load of the container). Does not return features.\nCredits are a peek for this `limit`. Time and body size can raise the\ncharge after the page runs.\n`/v3/osm_features` bills the same way. `/v2/osm_features/count` returns\nthe match count. That `total` is not a credit quote.\n\nResponse includes:\n- `estimated_credits` - total API credits expected to be charged\n- `tier_limits` - your current tier quotas and spatial limits\n- `hints` - actionable suggestions to reduce cost if needed","operationId":"get_features_cost_v2_osm_features_cost_get","deprecated":true,"security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","title":"Type"}},{"name":"way_shape","in":"query","required":false,"schema":{"type":"string","title":"Way Shape"}},{"name":"shape","in":"query","required":false,"schema":{"type":"string","deprecated":true,"title":"Shape"},"deprecated":true},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"}},{"name":"radius","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"title":"Radius"}},{"name":"bbox","in":"query","required":false,"schema":{"type":"string","title":"Bbox"}},{"name":"osm_ids","in":"query","required":false,"schema":{"type":"string","title":"Osm Ids"}},{"name":"within","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Within"}},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":85,"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`","default":[],"title":"Tags"},"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`"},{"name":"or_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Or Tags"},"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"not_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Not Tags"},"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1000,"title":"Limit"}},{"name":"disable_budget_warning","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Disable Budget Warning"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"zoom","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Zoom"}},{"name":"min_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Length M"}},{"name":"max_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Max Length M"}},{"name":"min_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Area M2"}},{"name":"max_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Max Area M2"}},{"name":"centroid","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Centroid"}},{"name":"clipGeometry","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Clipgeometry"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimateResponse"}}}},"400":{"description":"Bad request: invalid filters, spatial limits, or query parameters."},"401":{"description":"Unauthorized: missing or invalid API key."},"403":{"description":"Forbidden: unrecognized tier."},"429":{"description":"Too many requests: per-second rate limit."},"422":{"description":"Validation error in one or more request parameters."}}}},"/v2/osm_features/stats":{"get":{"tags":["OSM Features API"],"summary":"Deprecated. Forwards to GET /v2/osm_features/count.","description":"Forwards to `/v2/osm_features/count`. Same query string.","operationId":"forward_feature_stats_v2_osm_features_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"307":{"description":"Forwards to /v2/osm_features/count with the same query string."},"401":{"description":"Unauthorized: missing or invalid API key."}},"deprecated":true,"security":[{"HTTPBearer":[]}]}},"/v2/osm_features/count":{"get":{"tags":["OSM Features API"],"summary":"Count OSM features (scalar total, or histogram with group_by)","description":"Count matching features, or histogram them with `group_by`.\n\nOmit `group_by` for `{groups: [], total, truncated: false}` of the\nfilter set. Places search is that total with `way_shape=polygon`\n(point ∪ polygon). `asOf` / `openNow` auto_split ANDs `opening_hours`.\n\nCity and country counts: no GeoJSON, so tagged windows are larger than\n`/v3/osm_features`. Tag-free (no tags and no `group_by`) stays on the\nsearch/GeoJSON caps. Same per-request unit cap as GeoJSON; a Sweden-sized\ntagged count fits every tier.\n\nCredits reflect the work of the count. `total` is the match count, not a\ncredit quote. Peek and the per-request cap use the area estimate. A slow\nor heavy response can raise the charge after the fetch. Timeout is 600s\n(HTTP 400 `query_timeout`; do not retry the same window).\n\nA `/v3/osm_features` tile with the same filters returns `min(total, limit)`\nrows. Its credit charge is separate.\n\nExample (amenity counts in a neighborhood):\n`GET /v2/osm_features/count?bbox=18.05,59.32,18.10,59.34&type=node&tags=amenity&group_by=amenity`","operationId":"get_feature_counts_v2_osm_features_count_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"OSM element types to count. One of: ['node', 'relation', 'way']. Comma-separated for multiple (for example `type=node,way`). Default when omitted: node, way, and relation. A way can be open (line) or closed (polygon); use `way_shape` to narrow.","examples":["node"],"title":"Type"},"description":"OSM element types to count. One of: ['node', 'relation', 'way']. Comma-separated for multiple (for example `type=node,way`). Default when omitted: node, way, and relation. A way can be open (line) or closed (polygon); use `way_shape` to narrow."},{"name":"way_shape","in":"query","required":false,"schema":{"type":"string","description":"Geometry class for ways/relations being counted. One of: ['all', 'line', 'polygon']. Nodes are always points and are unioned when `type` includes `node`; `type=node` alone stays on the point table (`way_shape` is ignored). `line` - open ways or line-shaped relations. `polygon` - closed ways or multipolygon relations. `all` - both (default). Example: `type=way&way_shape=polygon&tags=building&group_by=building`.","title":"Way Shape"},"description":"Geometry class for ways/relations being counted. One of: ['all', 'line', 'polygon']. Nodes are always points and are unioned when `type` includes `node`; `type=node` alone stays on the point table (`way_shape` is ignored). `line` - open ways or line-shaped relations. `polygon` - closed ways or multipolygon relations. `all` - both (default). Example: `type=way&way_shape=polygon&tags=building&group_by=building`."},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Point for a radius search as `lat,lng`. Requires `radius`. Example: `location=59.334,18.063&radius=500&tags=amenity&group_by=amenity`","title":"Location"},"description":"Point for a radius search as `lat,lng`. Requires `radius`. Example: `location=59.334,18.063&radius=500&tags=amenity&group_by=amenity`"},{"name":"radius","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"description":"Search radius in metres. Requires `location`. Maximum allowed radius depends on your tier and whether the request has positive tag filters (`tags`, including `tags=a|b`).","title":"Radius"},"description":"Search radius in metres. Requires `location`. Maximum allowed radius depends on your tier and whether the request has positive tag filters (`tags`, including `tags=a|b`)."},{"name":"bbox","in":"query","required":false,"schema":{"type":"string","description":"Bounding box as `min_lon,min_lat,max_lon,max_lat`. Example: `18.05,59.32,18.10,59.34`","examples":["18.05,59.32,18.10,59.34"],"title":"Bbox"},"description":"Bounding box as `min_lon,min_lat,max_lon,max_lat`. Example: `18.05,59.32,18.10,59.34`"},{"name":"within","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Polygon spatial anchor as `way/<id>` or `relation/<id>`. Typically a polygon containing the features to be counted such as admin boundary. Mutually exclusive with `bbox` and `location`/`radius`. Example: `within=relation/155790&type=node&tags=amenity&group_by=amenity`","title":"Within"},"description":"Polygon spatial anchor as `way/<id>` or `relation/<id>`. Typically a polygon containing the features to be counted such as admin boundary. Mutually exclusive with `bbox` and `location`/`radius`. Example: `within=relation/155790&type=node&tags=amenity&group_by=amenity`"},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":85,"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`","examples":[["amenity"]],"default":[],"title":"Tags"},"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery`"},{"name":"or_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Or Tags"},"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"not_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Not Tags"},"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tag key to group on. Omit for a scalar `total` of the filter set (`groups` is empty). When set, only features that have this key are counted. Must be a key, not `key=value` or a numeric compare. Example: `group_by=amenity` or `group_by=highway`.","examples":["amenity"],"title":"Group By"},"description":"Tag key to group on. Omit for a scalar `total` of the filter set (`groups` is empty). When set, only features that have this key are counted. Must be a key, not `key=value` or a numeric compare. Example: `group_by=amenity` or `group_by=highway`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"description":"Max groups returned (default 100). Does not cap how many features are scanned. `truncated` is true when more groups exist.","default":100,"title":"Limit"},"description":"Max groups returned (default 100). Does not cap how many features are scanned. `truncated` is true when more groups exist."},{"name":"disable_budget_warning","in":"query","required":false,"schema":{"type":"boolean","description":"Allow requests that exceed the per-request unit cap to run anyway. Per-second rate limits still apply. Free usage past the monthly ceiling is throttled to 1 req/s and 20000 rows; paid usage past the included amount is recorded as overage.","default":false,"title":"Disable Budget Warning"},"description":"Allow requests that exceed the per-request unit cap to run anyway. Per-second rate limits still apply. Free usage past the monthly ceiling is throttled to 1 req/s and 20000 rows; paid usage past the included amount is recorded as overage."},{"name":"min_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum line length in metres (inclusive). Only rows meeting the bound are counted. Requires a line-capable route (`way_shape=line` or `way_shape=all` with way/relation).","title":"Min Length M"},"description":"Minimum line length in metres (inclusive). Only rows meeting the bound are counted. Requires a line-capable route (`way_shape=line` or `way_shape=all` with way/relation)."},{"name":"max_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum line length in metres (inclusive). Only rows meeting the bound are counted. Requires a line-capable route (`way_shape=line` or `way_shape=all` with way/relation).","title":"Max Length M"},"description":"Maximum line length in metres (inclusive). Only rows meeting the bound are counted. Requires a line-capable route (`way_shape=line` or `way_shape=all` with way/relation)."},{"name":"min_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum polygon area in square metres (inclusive). Only rows meeting the bound are counted. Requires a polygon-capable route (`way_shape=polygon` or `way_shape=all` with way/relation).","title":"Min Area M2"},"description":"Minimum polygon area in square metres (inclusive). Only rows meeting the bound are counted. Requires a polygon-capable route (`way_shape=polygon` or `way_shape=all` with way/relation)."},{"name":"max_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum polygon area in square metres (inclusive). Only rows meeting the bound are counted. Requires a polygon-capable route (`way_shape=polygon` or `way_shape=all` with way/relation).","title":"Max Area M2"},"description":"Maximum polygon area in square metres (inclusive). Only rows meeting the bound are counted. Requires a polygon-capable route (`way_shape=polygon` or `way_shape=all` with way/relation)."}],"responses":{"200":{"description":"Histogram of tag values. Example: amenity counts in a neighborhood (`bbox=18.05,59.32,18.10,59.34&type=node&tags=amenity&group_by=amenity`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"},"example":{"groups":[{"value":"restaurant","count":184},{"value":"cafe","count":91},{"value":"bar","count":47}],"total":412,"truncated":false}}}},"400":{"description":"Bad request: invalid filters, spatial limits, or query parameters."},"401":{"description":"Unauthorized: missing or invalid API key."},"403":{"description":"Forbidden: unrecognized tier."},"404":{"description":"within polygon was not found."},"429":{"description":"Too many requests: per-second rate limit."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/osm_features/density":{"get":{"tags":["OSM Features API"],"summary":"Density of OSM features as GeoJSON grid bins for a heatmap","description":"Draw a heatmap where matching features are dense.\n\nEach feature is a Point at the snapped cell with `properties.count`.\n`total` is the sum of bin counts in the window (before `limit`).\n`truncated` is true when more occupied cells exist than `limit`.\nEmpty space is omitted. Omit `type` for nodes. Nodes snap in place;\nways and relations bin at one surface point of the full geometry,\nwhich can fall outside the window. `cell_deg` defaults to 0.1.\nTimeout is 600s (HTTP 400 `query_timeout`; do not retry the same window).\n\nExample: `GET /v2/osm_features/density?bbox=-26,33,52,72&type=node&tags=place&cell_deg=0.1`","operationId":"get_feature_density_v2_osm_features_density_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OSM element types. Default when omitted: node. Comma-separated for several.","title":"Type"},"description":"OSM element types. Default when omitted: node. Comma-separated for several."},{"name":"way_shape","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Geometry class for ways/relations. Omit for nodes.","title":"Way Shape"},"description":"Geometry class for ways/relations. Omit for nodes."},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Radius origin as lat,lng. Requires radius.","title":"Location"},"description":"Radius origin as lat,lng. Requires radius."},{"name":"radius","in":"query","required":false,"schema":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}],"description":"Search radius in metres. Requires location.","title":"Radius"},"description":"Search radius in metres. Requires location."},{"name":"bbox","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Bounding box as min_lon,min_lat,max_lon,max_lat.","examples":["-26,33,52,72"],"title":"Bbox"},"description":"Bounding box as min_lon,min_lat,max_lon,max_lat."},{"name":"within","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Polygon anchor as way/<id> or relation/<id>. Envelope must stay within 80°.","title":"Within"},"description":"Polygon anchor as way/<id> or relation/<id>. Envelope must stay within 80°."},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":85,"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery` A positive filter is required.","default":[],"title":"Tags"},"description":"Tag filter. Join clauses with `,` (AND); repeating `tags` also ANDs. Join alternatives with `|` (OR). Group with parentheses: `(amenity=cafe,wheelchair=yes)|shop=bakery`. `!` negates one clause. Clauses: `key`, `key=value`, `key!=value`, `key>n` / `>=` / `<` / `<=`, `key~regex` / `key!~regex`. Percent-encode `>` as `%3E`. Quote a value that contains `,`, `|` or `&`: `name=\"Ben, Jerry's\"`. Regex is case-sensitive, max 200 chars, max 2 per request, no backreferences or `(?`, and its value must always be double-quoted (`name~\"^(Cafe|Bar)$\"`). It cannot use an index, so AND it with an indexed tag. Example: `tags=shop,amenity=cafe|amenity=bakery` A positive filter is required."},{"name":"or_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Or Tags"},"description":"Deprecated. Repeat for an OR group. Prefer `tags=a|b` in one value. Same item forms as `tags` (`key`, `key=value`, `key>n`). No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"not_tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":85,"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true,"default":[],"title":"Not Tags"},"description":"Deprecated. Repeat to exclude. Prefer `tags=!key` or `tags=!key=value`. Same item forms as `tags`. No `|` or leading `!`. Cannot be combined with `tags`.","deprecated":true},{"name":"cell_deg","in":"query","required":false,"schema":{"type":"number","minimum":0.0005,"description":"Grid cell size in degrees. Default 0.1. ST_SnapToGrid size.","default":0.1,"title":"Cell Deg"},"description":"Grid cell size in degrees. Default 0.1. ST_SnapToGrid size."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Max occupied cells returned. Omitted is this tier's max_limit (same ladder as /v3/osm_features). Denser cells are kept; truncated is true when more occupied cells exist.","title":"Limit"},"description":"Max occupied cells returned. Omitted is this tier's max_limit (same ladder as /v3/osm_features). Denser cells are kept; truncated is true when more occupied cells exist."},{"name":"disable_budget_warning","in":"query","required":false,"schema":{"type":"boolean","description":"Run anyway when the area estimate exceeds max_units_per_request.","default":false,"title":"Disable Budget Warning"},"description":"Run anyway when the area estimate exceeds max_units_per_request."},{"name":"min_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum line length in metres.","title":"Min Length M"},"description":"Minimum line length in metres."},{"name":"max_length_m","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum line length in metres.","title":"Max Length M"},"description":"Maximum line length in metres."},{"name":"min_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Minimum polygon area in square metres.","title":"Min Area M2"},"description":"Minimum polygon area in square metres."},{"name":"max_area_m2","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"description":"Maximum polygon area in square metres.","title":"Max Area M2"},"description":"Maximum polygon area in square metres."}],"responses":{"200":{"description":"Successful Response"},"400":{"description":"Bad request: invalid filters, spatial limits, or grid too fine."},"401":{"description":"Unauthorized: missing or invalid API key."},"403":{"description":"Forbidden: unrecognized tier."},"429":{"description":"Too many requests: per-second rate limit."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/places/search":{"post":{"tags":["Places API"],"summary":"Find places in bbox or radius (tags, optional opening hours)","description":"Point and polygon POIs in a `bbox` or `location`+`radius`.\n\nPolygon places are a Point at the centroid. Known opening hours set\n`properties.openNow` true or false; unknown hours omit the field.\n\n`asOf` evaluates hours at that time (default: now). A naive `asOf` is\nlocal time at the search location. `openNow=true` keeps only places known\nopen. Either one requires an OSM `opening_hours` tag.\n\nResponse: GeoJSON FeatureCollection with `metadata.evaluated_at` and\n`metadata.units` (credits charged).","operationId":"places_search_v1_places_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacesSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/places/nearby":{"post":{"tags":["Places API"],"summary":"Nearest places from a location (straight-line ranked)","description":"One set of places ranked by sphere `ST_DistanceSphere` from `location`.\n\nRequires `tags`. Same point-or-polygon-POI surface as search.\nKnown hours set `properties.openNow` true/false; unknown hours omit the field.\n\n`openNow=true` pages nearest hours-tagged rows until it has `limit`\nknown-open places (max 1000), the radius is empty, a barren closed prefix,\nor 10k hours-tagged rows have been scanned. Missing or unparseable hours are dropped. `asOf`\nevaluates hours at that instant (default: now) and requires an OSM\n`opening_hours` tag. Naive `asOf` (no offset) is that local clock at\n`location`. Closed places with hours still return unless `openNow` is set.\nHours use each place's IANA zone from its coordinates.\n\nResponse: `{status, items: [{feature, distance_m}], units,\nevaluated_at}`. Ranked `limit` max is 10_000 (hours parse budget;\nno `hours_parse_limit`). `openNow` also returns\n`input_count` and `kept_count`.","operationId":"places_nearby_v1_places_nearby_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NearbyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/places/{osm_type}/{osm_id}":{"get":{"tags":["Places API"],"summary":"One place by OSM id (same feature shape as search)","description":"Lookup one place by the `node/123` id that search or nearby returned.\n\nSame point-or-polygon-POI surface as search: a line-only way is not a\nplace. Hours are annotated at request time in the place's IANA timezone\nfrom its coordinates.\n\nResponse: `{status, feature, units, evaluated_at, timezone}`.\n`evaluated_at` is the UTC instant. `timezone` is the place's IANA zone.\nMissing or non-place id → 404 (request fee plus the larger of one row or request time).\nBad type or non-positive id → 400.","operationId":"places_details_v1_places__osm_type___osm_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"osm_type","in":"path","required":true,"schema":{"type":"string","description":"OSM type from a search or nearby id: node, way, or relation.","title":"Osm Type"},"description":"OSM type from a search or nearby id: node, way, or relation."},{"name":"osm_id","in":"path","required":true,"schema":{"type":"string","description":"Positive OSM id from a search or nearby feature id (e.g. 123 from node/123).","title":"Osm Id"},"description":"Positive OSM id from a search or nearby feature id (e.g. 123 from node/123)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/routes/isochrone":{"post":{"tags":["Routing API"],"summary":"Network reach polygon (buffered union of reachable edges)","description":"Walk or bike reach polygon on the OSM network from `origin`.\n\nProvide exactly one of `max_distance_m` or `duration_s`. Duration converts\nwith WALK 5 km/h or BICYCLE 15 km/h. `travelMode`\ndefaults to WALK. Geometry is a buffered union of reachable edge stubs\n(city blocks remain holes).\n\nStatus is in the 200 body: `ok`, `area_too_large_for_tier`,\n`tile_too_dense`, `start_unreachable`, `no_path_within_area`.","operationId":"routes_isochrone_v1_routes_isochrone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsochroneRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/routes/path":{"post":{"tags":["Routing API"],"summary":"Given-order walk or bicycle path along listed stops (no TSP)","description":"Dijkstra each consecutive pair of `stops` in listed order.\n\n2–250 points. Does not reorder stops or close a loop. Two stops is one\nDijkstra. Unordered search hits belong on `optimized_path`. To walk a\nknown sequence home, repeat home as the last stop.\n\nStatus is in the 200 body (`ok`, `area_too_large_for_tier`,\n`tile_too_dense`, `start_unreachable`, `end_unreachable`,\n`no_path_within_area`).","operationId":"routes_path_v1_routes_path_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutePathRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/routes/optimized_path":{"post":{"tags":["Routing API"],"summary":"TSP walk or bicycle tour from start; loop=true returns to start","description":"TSP from `start` through unordered `stops` (nearest-neighbour + 2-opt).\n\nDo not put start in `stops`. `loop=true` (default) scores a cycle and\nDijkstra includes the return; `loop=false` is an open path. Response\nincludes `ordered_stops` (start first). Do not invent an order and call\n`path`.\n\nStatus is in the 200 body (`ok`, `area_too_large_for_tier`,\n`tile_too_dense`, `start_unreachable`, `end_unreachable`,\n`no_path_within_area`).","operationId":"routes_optimized_path_v1_routes_optimized_path_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteOptimizedPathRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/tiers":{"get":{"tags":["Account"],"summary":"List plan tiers and limits","description":"Public catalog of TIER_LIMITS. Order is free → starter → pro → business → enterprise.","operationId":"list_tiers_v1_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TiersResponse"}}}}}}},"/v1/account/tier":{"get":{"tags":["Account"],"summary":"Get this API key's tier","description":"Tier object for the Bearer API key. MCP and the SDK need only the key.\n\n`Authorization: Bearer <api_key>` is enough. Limits from TIER_LIMITS, no\nStripe. A Firebase ID token with an active key also works.","operationId":"get_account_tier_v1_account_tier_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierLimits"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/usage":{"get":{"tags":["Usage"],"summary":"Get current credit budget usage","description":"Returns this month's credit consumption for the user (all of their keys, so rotating a key does not reset it).\n\nAccepts an API key or a Firebase ID token. Counters come from the same\nPostgres buckets used for enforcement, so they match what billed\nendpoints will check.","operationId":"get_usage_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/usage/history":{"get":{"tags":["Usage"],"summary":"Get historical usage series","description":"Returns a zero-filled historical usage series for dashboard charts.\n\nUnlike `/v1/usage`, which reads the current enforcement bucket,\nthis endpoint aggregates the append-only `app.usage_ledger` so clients can\nrender usage-over-time graphs, optionally stacked by `api_surface`.","operationId":"get_usage_history_v1_usage_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(second|minute|hour|day)$","description":"Time bucket for the returned series: second, minute, hour, or day.","default":"hour","title":"Bucket"},"description":"Time bucket for the returned series: second, minute, hour, or day."},{"name":"points","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"description":"Number of time buckets to return, oldest to newest.","default":24,"title":"Points"},"description":"Number of time buckets to return, oldest to newest."},{"name":"api_surface","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(geojson|tile|routing|geocode)$"},{"type":"null"}],"description":"Optional product filter. Omit for all surfaces (one point per bucket x surface). Values: geojson, tile, routing, geocode.","title":"Api Surface"},"description":"Optional product filter. Omit for all surfaces (one point per bucket x surface). Values: geojson, tile, routing, geocode."},{"name":"tz","in":"query","required":false,"schema":{"type":"string","description":"IANA time zone that day buckets follow.","default":"UTC","title":"Tz"},"description":"IANA time zone that day buckets follow."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage/ledger":{"get":{"tags":["Usage"],"summary":"Get recent usage ledger rows","description":"Newest query-related usage_ledger rows for the dashboard request table.\n\nCapped at 250 rows. Sorted by timestamp descending.","operationId":"get_usage_ledger_table_v1_usage_ledger_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageLedgerListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/usage/countries":{"get":{"tags":["Usage"],"summary":"Get query-country request counts","description":"Request and credit counts by query-centroid country for dashboard choropleth.\n\nSame time window as `/v1/usage/history`. Default surfaces are geojson,\nrouting, and geocode. Tiles have no query country. Ocean and osm_ids\nlookups are counted in `unknown_count` / `unknown_charged_units`.","operationId":"get_usage_countries_v1_usage_countries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bucket","in":"query","required":false,"schema":{"type":"string","pattern":"^(second|minute|hour|day)$","description":"Time bucket for the returned window: second, minute, hour, or day.","default":"hour","title":"Bucket"},"description":"Time bucket for the returned window: second, minute, hour, or day."},{"name":"points","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"description":"Number of time buckets in the window, matching /v1/usage/history.","default":24,"title":"Points"},"description":"Number of time buckets in the window, matching /v1/usage/history."},{"name":"api_surface","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(geojson|tile|routing|geocode)$"},{"type":"null"}],"description":"Optional product filter. Omit for spatial surfaces (geojson, routing, geocode). Values: geojson, tile, routing, geocode.","title":"Api Surface"},"description":"Optional product filter. Omit for spatial surfaces (geojson, routing, geocode). Values: geojson, tile, routing, geocode."},{"name":"tz","in":"query","required":false,"schema":{"type":"string","description":"IANA time zone that day buckets follow.","default":"UTC","title":"Tz"},"description":"IANA time zone that day buckets follow."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageCountriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CostEstimateResponse":{"properties":{"estimated_credits":{"type":"integer","title":"Estimated Credits"},"tier_limits":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}]},"type":"object","title":"Tier Limits"},"hints":{"items":{"type":"string"},"type":"array","title":"Hints"}},"type":"object","required":["estimated_credits","tier_limits","hints"],"title":"CostEstimateResponse","description":"Preflight credit estimate for a /v2 osm_features page (row peek)."},"CountGroup":{"properties":{"value":{"type":"string","title":"Value"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","count"],"title":"CountGroup"},"CountResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/CountGroup"},"type":"array","title":"Groups"},"total":{"type":"integer","title":"Total"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["groups","total","truncated"],"title":"CountResponse","description":"Histogram from GET /v2/osm_features/count.","example":{"groups":[{"count":184,"value":"restaurant"},{"count":91,"value":"cafe"},{"count":47,"value":"bar"}],"total":412,"truncated":false}},"GeoJSONFeature":{"properties":{"type":{"type":"string","const":"Feature","title":"Type"},"id":{"type":"string","title":"Id"},"geometry":{"additionalProperties":true,"type":"object","title":"Geometry"},"properties":{"additionalProperties":true,"type":"object","title":"Properties"}},"type":"object","required":["type","id","geometry","properties"],"title":"GeoJSONFeature","description":"Minimal GeoJSON feature shape returned by /v3/osm_features."},"GeoJSONFeatureCollectionResponse":{"properties":{"type":{"type":"string","const":"FeatureCollection","title":"Type"},"features":{"items":{"$ref":"#/components/schemas/GeoJSONFeature"},"type":"array","title":"Features"}},"type":"object","required":["type","features"],"title":"GeoJSONFeatureCollectionResponse","description":"FeatureCollection returned by /v3/osm_features (Accept: application/geo+json).\n\nHeaders: X-Returned and X-Has-More (true when truncated below the caller's max_limit; no next page). A match set larger than max_limit is HTTP 400 result_too_large. No cursor.\nDeprecated /v2/osm_features also sends X-Next-Cursor."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IsochroneRequest":{"properties":{"origin":{"$ref":"#/components/schemas/LonLat","description":"Network start point."},"max_distance_m":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Distance M","description":"Reach budget in metres. Provide this or duration_s, not both."},"duration_s":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Duration S","description":"Reach budget in seconds. Converted with WALK 1.4 m/s or BICYCLE 4.2 m/s."},"search_buffer_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Search Buffer M","description":"Optional extra metres on the highway fetch corridor."},"travelMode":{"type":"string","enum":["WALK","BICYCLE"],"title":"Travelmode","description":"WALK (undirected) or BICYCLE (honors OSM oneway).","default":"WALK"}},"type":"object","required":["origin"],"title":"IsochroneRequest","description":"Request body for POST /v1/routes/isochrone.\n\nThe response geometry is a buffered union of network edges reachable\nwithin the budget (city blocks remain holes)."},"LatLng":{"properties":{"lat":{"type":"number","title":"Lat","description":"Latitude in WGS84 degrees."},"lng":{"type":"number","title":"Lng","description":"Longitude in WGS84 degrees."}},"type":"object","required":["lat","lng"],"title":"LatLng","description":"Point coordinate (Google-style lat/lng)."},"LonLat":{"properties":{"lon":{"type":"number","title":"Lon","description":"Longitude in WGS84 degrees."},"lat":{"type":"number","title":"Lat","description":"Latitude in WGS84 degrees."}},"type":"object","required":["lon","lat"],"title":"LonLat","description":"Point coordinate (lon, lat)."},"NearbyRequest":{"properties":{"location":{"$ref":"#/components/schemas/LatLng","description":"Center point to rank from."},"radius":{"type":"number","exclusiveMinimum":0.0,"title":"Radius","description":"Search radius in metres.","default":1000.0},"tags":{"items":{"type":"string","maxLength":2048},"type":"array","maxItems":85,"title":"Tags","description":"Tag filter expressions, ANDed. Each string joins clauses with `,` (AND) and alternatives with `|` (OR), and prefixes `!` to negate one clause. Regex values are always quoted. Required, unless the deprecated orTags is sent."},"orTags":{"items":{"type":"string","maxLength":512},"type":"array","maxItems":85,"title":"Ortags","description":"Deprecated. OR tag filters, one plain item per string. Prefer `tags` with `|`. Cannot be combined with `tags`.","deprecated":true},"limit":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Limit","description":"Max ranked items to return. Default 100. Ranked nearby is capped at 10000 (ordered SQL page, not /v3 max_limit). With openNow, max is 1000.","default":100},"openNow":{"type":"boolean","title":"Opennow","description":"If true, return only the nearest places known open at evaluation time (Google Places openNow semantics). Places with missing or unparseable opening_hours are excluded.","default":false},"asOf":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Asof","description":"Evaluate opening hours as of this instant (default: request time). Naive values (no offset) are that local clock at location. Also requires an OSM opening_hours tag."}},"type":"object","required":["location"],"title":"NearbyRequest","description":"Request body for POST /v1/places/nearby (ranked by straight-line distance)."},"PlacesSearchRequest":{"properties":{"bbox":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bbox","description":"min_lon,min_lat,max_lon,max_lat. Mutually exclusive with location+radius.","examples":["18.05,59.31,18.10,59.33"]},"location":{"anyOf":[{"$ref":"#/components/schemas/LatLng"},{"type":"null"}],"description":"Center point. Requires radius. Mutually exclusive with bbox."},"radius":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Radius","description":"Search radius in metres. Required when location is set."},"tags":{"items":{"type":"string","maxLength":2048},"type":"array","maxItems":85,"title":"Tags","description":"Tag filter expressions, ANDed. Each string joins clauses with `,` (AND) and alternatives with `|` (OR), and prefixes `!` to negate one clause (`amenity,wheelchair=yes|!cuisine`). Group with parentheses: `(a,b)|c`. Also `key!=value`, `key>n`, `key~\"regex\"` (regex always quoted). Quote values containing `, | &`. Cannot be combined with the deprecated orTags.","examples":[["amenity=cafe|amenity=bar"]]},"orTags":{"items":{"type":"string","maxLength":512},"type":"array","maxItems":85,"title":"Ortags","description":"Deprecated. OR tag filters, one plain item per string. Prefer `tags` with `|`. Cannot be combined with `tags`.","deprecated":true},"limit":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Limit","description":"Max features to return. Default 100. Ceiling is the caller's /v3/osm_features max_limit. With openNow, max is 1000. asOf rejects a page with more than 10k hours-tagged places.","default":100},"openNow":{"type":"boolean","title":"Opennow","description":"If true, return only places known open at evaluation time (Google Places openNow semantics). Places with missing or unparseable opening_hours are excluded.","default":false},"asOf":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Asof","description":"Evaluate opening hours as of this instant (default: request time). Naive values (no offset) are that local clock at the search location or bbox center. Also requires an OSM opening_hours tag."}},"type":"object","title":"PlacesSearchRequest","description":"Request body for POST /v1/places/search (spatial + tag discovery)."},"RouteOptimizedPathRequest":{"properties":{"start":{"$ref":"#/components/schemas/LonLat","description":"Tour start. Do not repeat this point in stops."},"stops":{"items":{"$ref":"#/components/schemas/LonLat"},"type":"array","maxItems":249,"minItems":1,"title":"Stops","description":"Unordered visit points, not including start. 1–249."},"search_buffer_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Search Buffer M","description":"Optional extra metres on the highway fetch corridor."},"loop":{"type":"boolean","title":"Loop","description":"If true, score a cycle and Dijkstra includes the return to start.","default":true},"travelMode":{"type":"string","enum":["WALK","BICYCLE"],"title":"Travelmode","description":"WALK (undirected) or BICYCLE (honors OSM oneway).","default":"WALK"}},"type":"object","required":["start","stops"],"title":"RouteOptimizedPathRequest","description":"Request body for POST /v1/routes/optimized_path (TSP from start)."},"RoutePathRequest":{"properties":{"stops":{"items":{"$ref":"#/components/schemas/LonLat"},"type":"array","maxItems":250,"minItems":2,"title":"Stops","description":"Visit points in order. 2–250. Two stops is one Dijkstra."},"search_buffer_m":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Search Buffer M","description":"Optional extra metres on the highway fetch corridor."},"travelMode":{"type":"string","enum":["WALK","BICYCLE"],"title":"Travelmode","description":"WALK (undirected) or BICYCLE (honors OSM oneway).","default":"WALK"}},"type":"object","required":["stops"],"title":"RoutePathRequest","description":"Request body for POST /v1/routes/path (given-order, no TSP)."},"SurfaceRates":{"properties":{"geojson":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Geojson"},"tile":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tile"},"routing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Routing"},"geocode":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Geocode"}},"type":"object","required":["geojson","tile","routing","geocode"],"title":"SurfaceRates"},"TierLimits":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"price_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Usd"},"req_per_second":{"$ref":"#/components/schemas/SurfaceRates"},"req_per_second_burst":{"$ref":"#/components/schemas/SurfaceRates"},"units_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Units Per Month"},"overage_usd_per_thousand":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overage Usd Per Thousand"},"max_units_per_request":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Units Per Request"},"max_concurrent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Concurrent"},"max_limit":{"type":"integer","title":"Max Limit"},"max_bbox_area_tagged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Bbox Area Tagged"},"max_bbox_area_tag_free":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Bbox Area Tag Free"},"max_around_radius_m_tagged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Around Radius M Tagged"},"max_around_radius_m_tag_free":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Around Radius M Tag Free"},"max_count_bbox_area_tagged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Count Bbox Area Tagged"},"max_count_around_radius_m_tagged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Count Around Radius M Tagged"},"max_density_bbox_area_tagged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Density Bbox Area Tagged"},"max_density_around_radius_m_tagged":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Density Around Radius M Tagged"}},"type":"object","required":["id","label","price_usd","req_per_second","req_per_second_burst","units_per_month","overage_usd_per_thousand","max_units_per_request","max_concurrent","max_limit","max_bbox_area_tagged","max_bbox_area_tag_free","max_around_radius_m_tagged","max_around_radius_m_tag_free","max_count_bbox_area_tagged","max_count_around_radius_m_tagged","max_density_bbox_area_tagged","max_density_around_radius_m_tagged"],"title":"TierLimits"},"TiersResponse":{"properties":{"tiers":{"items":{"$ref":"#/components/schemas/TierLimits"},"type":"array","title":"Tiers"}},"type":"object","required":["tiers"],"title":"TiersResponse"},"UsageCountriesResponse":{"properties":{"countries":{"items":{"$ref":"#/components/schemas/UsageCountryCount"},"type":"array","title":"Countries"},"unknown_count":{"type":"integer","title":"Unknown Count"},"unknown_charged_units":{"type":"integer","title":"Unknown Charged Units"},"api_surface":{"anyOf":[{"type":"string","enum":["geojson","tile","routing","geocode"]},{"type":"null"}],"title":"Api Surface"}},"type":"object","required":["countries","unknown_count","unknown_charged_units"],"title":"UsageCountriesResponse","description":"Per-country request and credit counts for a history-style time window."},"UsageCountryCount":{"properties":{"country_code":{"type":"string","title":"Country Code"},"request_count":{"type":"integer","title":"Request Count"},"charged_units":{"type":"integer","title":"Charged Units"}},"type":"object","required":["country_code","request_count","charged_units"],"title":"UsageCountryCount"},"UsageHistoryPoint":{"properties":{"bucket_start":{"type":"string","format":"date-time","title":"Bucket Start"},"api_surface":{"type":"string","enum":["geojson","tile","routing","geocode"],"title":"Api Surface"},"request_count":{"type":"integer","title":"Request Count"},"units":{"type":"integer","title":"Units"},"charged_units":{"type":"integer","title":"Charged Units"},"success_count":{"type":"integer","title":"Success Count"},"cache_hit_count":{"type":"integer","title":"Cache Hit Count"},"avg_latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Latency Ms"}},"type":"object","required":["bucket_start","api_surface","request_count","units","charged_units","success_count","cache_hit_count","avg_latency_ms"],"title":"UsageHistoryPoint","description":"One bucket × api_surface in the authenticated user's historical usage series."},"UsageHistoryResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"},"bucket":{"type":"string","enum":["second","minute","hour","day"],"title":"Bucket"},"api_surface":{"anyOf":[{"type":"string","enum":["geojson","tile","routing","geocode"]},{"type":"null"}],"title":"Api Surface"},"points":{"items":{"$ref":"#/components/schemas/UsageHistoryPoint"},"type":"array","title":"Points"}},"type":"object","required":["tier","api_key_id","bucket","points"],"title":"UsageHistoryResponse","description":"Historical usage series for dashboard charts (one point per bucket × surface)."},"UsageLedgerListResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/UsageLedgerRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"UsageLedgerListResponse","description":"Newest usage ledger rows for the authenticated user (capped for the dashboard table)."},"UsageLedgerRow":{"properties":{"ts":{"type":"string","format":"date-time","title":"Ts"},"status_code":{"type":"integer","title":"Status Code"},"units":{"type":"integer","title":"Units"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"latency_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latency Ms"},"response_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Bytes"},"bbox_area":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bbox Area"},"around_radius_m":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Around Radius M"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"api_surface":{"type":"string","enum":["geojson","tile","routing","geocode"],"title":"Api Surface"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"query_lon":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Query Lon"},"query_lat":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Query Lat"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"}},"type":"object","required":["ts","status_code","units","cache_hit","latency_ms","response_bytes","bbox_area","around_radius_m","limit","api_surface","country_code","query_lon","query_lat","endpoint","params"],"title":"UsageLedgerRow","description":"Query-related usage_ledger columns for the dashboard request table."},"UsageSummaryResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Id"},"units_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Units Per Month"},"usage_this_month":{"type":"integer","title":"Usage This Month"},"remaining_this_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining This Month"}},"type":"object","required":["tier","api_key_id","units_per_month","usage_this_month","remaining_this_month"],"title":"UsageSummaryResponse","description":"This month's unit-budget usage for the user (all keys). `api_key_id` is null without an active key."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}