跳到主要内容

Geo Search

Search geographic location data from OpenStreetMap. Query streets, places, and POIs by name, type, city, country, and coordinates with pagination support.

Endpoint: POST /biz/bigdata/data/geo/search

Parameters​

ParameterTypeRequiredDescription
nameStringNoPlace/street name (fuzzy match)
alternative_namesStringNoAlternative name (fuzzy match)
streetStringNoStreet name (fuzzy match)
class_nameStringNoOSM class (fuzzy match, e.g., "highway", "place")
typeStringNoOSM type (fuzzy match)
cityStringNoCity name (fuzzy match)
stateStringNoState/province (fuzzy match)
countryStringNoCountry name (fuzzy match)
country_codeStringNoISO 3166-1 alpha-2 country code (fuzzy match)
osm_typeStringNoOSM element type (fuzzy match: N=Node, W=Way, R=Relation)
latDoubleNoLatitude (exact match)
lonDoubleNoLongitude (exact match)
osm_idLongNoOpenStreetMap element ID
housenumbersStringNoHouse numbers (exact match)
pageNumberIntegerNoPage number (default: 1)
pageSizeIntegerNoPage size (default: 1000)

All search parameters are optional. Multiple parameters are combined with AND logic. Name-based fields use fuzzy matching (LIKE %value%).

Request​

curl -X POST "https://api.alaikis.com/std/biz/bigdata/data/geo/search" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-d 'bizContent={"country_code": "DE", "city": "Berlin", "class_name": "place", "pageNumber": 1, "pageSize": 20}'

Response​

{
"code": 200,
"msg": "success",
"data": {
"content": [
{
"id": 240109189,
"osmId": 240109189,
"osmType": "N",
"name": "Berlin",
"alternativeNames": "Берлин, Berlín, Berlim",
"street": null,
"className": "place",
"type": "city",
"city": "Berlin",
"state": "Berlin",
"country": "Germany",
"countryCode": "DE",
"lat": 52.5170365,
"lon": 13.3888599,
"housenumbers": null
}
],
"totalElements": 150,
"pageNumber": 0,
"pageSize": 20
}
}

Data Model​

FieldTypeDescription
idIntegerInternal record ID
osmIdLongOpenStreetMap element ID
osmTypeStringOSM element type (N=Node, W=Way, R=Relation)
nameStringPlace/street name
alternativeNamesStringAlternative names in various languages
streetStringStreet name
classNameStringOSM classification class
typeStringOSM type within class
cityStringCity name
stateStringState/province
countryStringCountry name
countryCodeStringISO 3166-1 alpha-2 country code
latDoubleLatitude in decimal degrees
lonDoubleLongitude in decimal degrees
housenumbersStringHouse number range

OSM Class Reference​

ClassDescriptionCommon Types
highwayRoads and pathsresidential, motorway, footway
placeNamed placescity, town, village, suburb
buildingBuildingsyes, residential, commercial
amenityFacilitiesschool, hospital, restaurant
shopShopssupermarket, convenience
tourismTourismhotel, attraction, museum

Pagination​

The response uses a paginated structure:

FieldTypeDescription
contentArrayResult records for current page
totalElementsLongTotal number of matching records
pageNumberIntegerCurrent page number (0-based)
pageSizeIntegerNumber of records per page

Error Codes​

CodeDescription
400Invalid JSON format