Stream EstateStream Estate
GéoDivisions administratives

List the descendants of an administrative division, at any depth

Returns every division below the given one, across intermediate levels, optionally filtered by type and bounded by maxDepth. maxDepth of 1 returns only the direct children. Use this to list, for example, every neighborhood of a city — including Paris, Lyon and Marseille, whose neighborhoods sit under an arrondissement. Set includeSelf=true to also return the division itself (its full scope: the division and everything below).

GET
/geo/administrative-divisions/{id}/descendants
X-API-KEY<token>

Value for the X-API-KEY header parameter.

In: header

Path Parameters

id*string

Ancestor administrative division id.

Query Parameters

locationType?|array<>

Filter the descendants by type. Supports a single value (?locationType=NEIGHBORHOOD) or array syntax (?locationType[]=MUNICIPAL_DISTRICT&locationType[]=NEIGHBORHOOD).

maxDepth?integer

Limit how many levels below the division to include. 1 returns only the direct children; omit for any depth.

Range1 <= value
includeSelf?boolean

Include the division itself alongside its descendants. The division is always included when set, regardless of type or maxDepth. Defaults to false.

size?integer

Number of items per page, from 1 to 100. A value outside that range is brought back to the nearest bound.

Range1 <= value <= 100
Default30
page?integer

The collection page number

Default1

Response Body

curl -X GET "https://example.com/geo/administrative-divisions/3fa85f64-5717-4562-b3fc-2c963f66afa6/descendants?locationType=NEIGHBORHOOD&maxDepth=1&includeSelf=false&size=30"
[  {    "name": "Paris",    "uniqueCode": "75056",    "locationType": "MUNICIPALITY",    "countryCode": "FR",    "postalCodes": [      "75001",      "75002",      "75003"    ],    "centroid": {      "type": "Point",      "coordinates": [        2.3522,        48.8566      ]    },    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"  }]
Version 0.14.289Dernière mise à jour