bdl_search_units
Search Polish territorial units like voivodeships and counties by name fragment, with optional filters for administrative level and year. Use results to retrieve statistical data.
Instructions
Search BDL territorial units (voivodeships, counties, powiat, gmina, etc.) by name fragment. Optional level and year filters. Use returned unit id with bdl_get_data_by_unit. API: GET /units/search. Pagination is 0-based.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Fragment of unit name (e.g. city or voivodeship name) | |
| levels | No | TERYT-level filters (e.g. 2 for voivodeship — confirm with BDL /levels metadata if needed) | |
| years | No | Years for which the unit definition should exist | |
| page | No | Page index — 0-based | |
| page_size | No | Results per page (max 100) | |
| sort | No | Sort order (optional) | |
| lang | No | Response language | pl |