Skip to content

Geocode

Geocode

geocode

Geocode API is a powerful tool for developers to integrate location search functionality into their applications with optimized performance. Additionally, this latest version utilizes intelligent search algorithms and methods to provide accurate and speedy search results for users.

URL

https://tw.map.zone/api/search?apikey={YOUR-APIKEY}&text={text}

Method

GET

Parameter

Parameter Type Required Description Example
apikey string yes API provided by MAPZONE for customer's account.
text string yes User desired input 台中市
focus string no GPS cordinates 24.237931730941632, 120.8948358290382
layers string no Represent for certain type of data such as POI, ADDRESS, NETWORK, DISTRICT, CITY POI
circle_center number no The central coordinate(lat/lng) position of the area to be searched 24.237931730941632, 120.8948358290382
circle_radius number no The radius of the search area (in meters) 200
categories string no Provide full list of POI categories fuel, atm,...
cityId string no Every city has a unique ID, which is used to filter search results B
distId string no Every district has a unique ID, which is used to filter search results

Example

Input

https://tw.map.zone/api/search?apikey={your-apikey}&text=台灣中油&layers=POI&cityId=V&districtId=V08

Respone

{
    {
    "ref_id": "vmt:POI:FFB85B5C3FA84E28B2CB499E9527659A",
    "distance": 0,
    "address": "台東縣長濱鄉",
    "name": "台灣中油",
    "display": "台東縣長濱鄉台灣中油",
    "boundaries": [
      {
        "type": 1,
        "id": "V08",
        "prefix": "",
        "name": "長濱",
        "suffix": "鄉",
        "full_name": "長濱鄉"
      },
      {
        "type": 0,
        "id": "V",
        "prefix": "",
        "name": "台東",
        "suffix": "縣",
        "full_name": "台東縣"
      }
    ],
    "categories": [
      "fuel"
    ]
  }
}

Place

The Place API service endpoint provides detailed information about the Place found by its identifier (refid).

URL

https://tw.map.zone/api/place?apikey={your-apikey}&refid={refid}

Method

GET

Parameter

Parameter Type Required Description Example
apikey string yes API provided by MAPZONE for customer's account.
refid string yes A unique refid identifier generated from search response vmt:POI:FFB85B5C3FA84E28B2CB499E9527659A

Example

Input:

https://tw.map.zone/api/place?apikey={your-apikey}&refid=vmt:POI:FFB85B5C3FA84E28B2CB499E9527659A

Respone body:

{
    "display": "台東縣長濱鄉台灣中油",
    "name": "台灣中油",
    "hs_num": "",
    "street": "",
    "address": "",
    "city_id": "V",
    "city": "台東縣",
    "district_id": "V08",
    "district": "長濱鄉",
    "lat": 23.3237697,
    "lng": 121.4592057
}