Dukan icon

Dukan

Interact with the Dukan API

City Or Municipality → Get One City

AI-generated

Summary

Retrieve detailed information about a single city or municipality using its MongoDB ObjectId.

Inputs

  • City ID (required) — The MongoDB ObjectId of the city to retrieve.
  • Force Custom Auth Header — Toggle to use a custom API key for authentication instead of the node's configured credentials.
  • Custom API Key — The API key to use when Force Custom Auth Header is enabled.
  • Force Custom Base URL — Toggle to use a custom Base URL for API requests instead of the one in the credentials.
  • Custom Base URL — The Base URL to use for API requests when Force Custom Base URL is enabled (without the /v1/external suffix).
  • Request Options — Optional HTTP request settings like batching, SSL certificate validation, proxy, and timeout.

Output shape

a single city's data object with detailed information as returned by the Dukan API

The output consists of the city's full data record identified by the provided City ID. The operation does not return a list, but a single record. If the city does not exist or the ID is invalid, an error may be returned. Request options apply to the HTTP request but do not affect the data structure returned.

Examples

Example 1: Retrieve a city by its MongoDB ObjectId

Set 'City ID' to the desired city's ObjectId, optionally override authentication or base URL, then execute to get the city data.

Links

Discussion