The API request type (typically URL or FetchInput)
The API response type
OptionalextendedPostalCodesFor?: SearchIndexType[]Indexes for which to include extended postal codes in results.
Extended postal codes provide more detailed postal code information including sub-divisions and hierarchical structures.
Default Behavior:
Extended postal codes are included for all indexes except Geo by default.
Geographic entities can have very long postal code lists, so they must
be explicitly requested when needed.
Extended vs Regular Postal Codes:
Performance Note: Including extended postal codes for geographies can significantly increase response size.
OptionalgeographyTypes?: GeographyType[]Filter results to specific geography types.
Restricts results to only geographic entities of the specified types, filtering out other result types like POIs or addresses.
Geography Hierarchy (largest to smallest):
Country: Sovereign nationsCountrySubdivision: States, provinces, regionsCountrySecondarySubdivision: Counties, districtsCountryTertiarySubdivision: Sub-districtsMunicipality: Cities, townsMunicipalitySubdivision: City districtsNeighbourhood: Neighborhoods, quartersPostalCodeArea: Areas defined by postal codesFiltering Behavior: When specified, only Geography results with matching entity types are returned. POIs, addresses, and other result types are excluded.
Use Cases:
// Search only for cities
geographyTypes: ['Municipality']
// Search for countries and cities
geographyTypes: ['Country', 'Municipality']
// Search for all administrative levels
geographyTypes: [
'Country',
'CountrySubdivision',
'CountrySecondarySubdivision',
'Municipality'
]
// Search for postal code areas only
geographyTypes: ['PostalCodeArea']
Optionallimit?: numberMaximum number of results to return.
Controls pagination by limiting the number of results in a single response.
Use with offset (in specific service params) for pagination.
Optionalmapcodes?: MapcodeType[]Request mapcode representations for locations.
Mapcodes are short, human-friendly location codes that can represent any location on Earth to within a few meters. They're easier to remember and communicate than coordinates.
Mapcode Types:
Local: Short codes valid within a specific territory (e.g., "49.4V" in Netherlands)International: Codes that work globally (e.g., "NLD 49.4V")Alternative: Alternative representations for the same locationUse Cases:
Optionalposition?: HasLngLatGeographic position to bias search results.
When provided, results closer to this position are ranked higher. Does not filter results, only influences ranking.
Coordinates:
Without Radius: Supplying position without a radius parameter biases results toward this area but doesn't create a hard boundary.
Use Cases:
Search query string.
The text to search for - can be an address, place name, POI, or general location query. Must be properly URL encoded when sent to the API.
Query Examples:
The query is processed with fuzzy matching to handle typos and variations.
Optionalview?: ViewGeopolitical view for disputed territories.
Determines how borders and place names are displayed for disputed territories, according to different countries' perspectives.
Available Views:
Unified: International/neutral view (default)AR: Argentina's perspectiveIN: India's perspectivePK: Pakistan's perspectiveIL: Israel's perspectiveMA: Morocco's perspectiveRU: Russia's perspectiveTR: Turkey's perspectiveCN: China's perspectiveAffected Elements:
Legal Compliance: Use appropriate views based on your target audience and legal requirements in different regions.
Applied to Services:
Key Features:
// Basic search with position bias
const searchParams: CommonPlacesParams<URL, Response> = {
query: 'pizza restaurant',
position: [4.9041, 52.3676], // Near Amsterdam
limit: 20
};
// Search with geography type filter
const citySearch: CommonPlacesParams<URL, Response> = {
query: 'Paris',
geographyTypes: ['Municipality'], // Only cities
limit: 10
};
// Search with mapcodes and specific geopolitical view
const detailedSearch: CommonPlacesParams<URL, Response> = {
query: 'disputed location',
view: 'IN', // India's perspective
mapcodes: ['Local', 'International'],
extendedPostalCodesFor: ['PAD', 'POI'],
limit: 5
};
// Address search with extended postal codes
const addressSearch: CommonPlacesParams<URL, Response> = {
query: '123 Main Street',
geographyTypes: ['Country', 'Municipality'],
extendedPostalCodesFor: ['Geo', 'PAD', 'Addr'],
limit: 15
};
Common parameters shared across places-related services.
These parameters are used by search, geocoding, and reverse geocoding services to customize query behavior, filter results, and control response formatting.