- Print
- PDF
gc
- Print
- PDF
Overview
Reverse Geocoding is a service that converts geographic coordinates on a NAVER map into an address (coordsToAddr). The Reverse Geocoding API returns information including dong designated by law, dong assigned for administrative purposes, Land-Lot Based Address and Road Name Address, for specific coordinates.
The Reverse Geocoding service supports some coordinate systems specified by European Petroleum Survey Group (EPSG) and those commonly used in Korea.
Request
curl "https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?coords={input_coordinates}&sourcecrs={coordinate system}&orders={conversion_name}&output={output_format}" \
-H "X-NCP-APIGW-API-KEY-ID: {Client ID issued when registering an application}" \
-H "X-NCP-APIGW-API-KEY: {Client Secret issued when registering an application}" -v
Request Parameters
- For
sourcecrs
,targetcrs
,orders
, andoutput
, a default value is used when the parameter is omitted. Default values for each parameter are described in the table below. - You can explicitly call those parameters if you need to specify a value other than the default.
- If you do not specify the
orders
parameter: legal and administrative results are returned. - If you need to get a detailed address: specify
orders=legalcode,admcode,addr,roadaddr
. - (The reason why you need to add
legalcode
oradmcode
to theorders
parameter to request a detailed address: For areas that have no detailed addresses, such as areas near a coastline and new housing sites, at least you can get a legal code or administrative code rather than “no results.”)
Parameter | Type | Required | Description |
---|---|---|---|
request | string | N | Request service name. Use “coordsToaddr” for Reverse Geocoding. The default is coordToaddr .Example) request=coordsToaddr |
coords | string | Y | Source coordinates. Example) coords=128.12345,37.98776 |
sourcecrs | string | N | Source coordinate system code. The default is the latitude-longitude coordinate system (epsg:4326). Refer to Coordinate systems for available coordinate system codes. Example) sourcecrs=epsg:4326 (lat-lng coordinate system) sourcecrs=nhn:2048 (utm-k coordinate system) sourcecrs=nhn:128 (katech coordinate system) sourcecrs=epsg:3857 (Google coordinate system) |
targetcrs | string | N | Target coordinate system code. The default is the lat-lng coordinate system (epsg:4326). Refer to Coordinate systems for available coordinate system codes. Example) targetcrs=epsg:4326 (lat-lng coordinate system) targetcrs=nhn:2048 (utm-k coordinate system) targetcrs=nhn:128 (katech coordinate system) targetcrs=epsg:3857 (Google coordinate system) |
orders | string | N | Conversion name. The default is legalcode,admcode . Available values are as follows: - legalcode: Coordinates to legal codes - admcode: Coordinates to administrative codes - addr: Coordinates to land-lot addresses - roadaddr: Coordinates to road name addresses (new addresses) Multiple values can be added, and the results are shown in the order of values added. Example) orders=legalcode orders=addr,admcode orders=addr,admcode,roadaddr orders=legalcode,addr,admcode,roadaddr |
output | string | N | Output format. Available values are json and xml . The default is xml . Example) output=json output=xml |
callback | string | N | Callback name to pass when callback is required for jsonp communications. It is available only for output=json . The json data is wrapped by the specified callback name and returned. Example) callback=abc |
Coordinate systems
Name | Code | Connected service | Type | GCS info | PCS info | Note | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Google Maps | EPSG:3857 | PCS | WGS_1984 | WGS_1984 | 6378137 (Semi_Minor) | 298.2572236 | Greenwich | Degree | M | 0 | 0 | 0 | 0 | Meter | 1 | ||
WGS84 longitude and latitude | EPSG:4326 | GCS | WGS_1984 | WGS_1984 | 6378137 | 298.2572236 | Greenwich | Degree | Not applicable | Not applicable | Not applicable | Not applicable | Not applicable | Not applicable | Not applicable | ||
UTM-K | NHN:2048 | PCS | D_ITRF_2000 | GRS_1980 | 6378137 | 298.2572221 | Greenwich | Degree | TM | 127.5 | 38 | 2,000,000 | 1,000,000 | Meter | 0.9996 | ||
KATECH(TM128) | NHN:128 | Mashup Map, Encyclopedia, Web OpenAPI | PCS | D_Korean_Datum_1985 | Bessel 1841 | 6377397.155 | 299.1528128 | Greenwich | Degree | TM | 128 | 38 | 600,000 | 400,000 | Meter | 0.9999 | 10 ellipsoidal conversion factors: TRANSFORM"BADEKAS","-145.907,505.034,685.756,-1.162,2.347,1.592,6.342,-3159521.31,4068151.32,3748113.85" |
Request Header
Header | Description |
---|---|
X-NCP-APIGW-API-KEY-ID | Client ID issued when registering an appX-NCP-APIGW-API-KEY-ID:{Client ID} |
X-NCP-APIGW-API-KEY | Client Secret issued when registering an appX-NCP-APIGW-API-KEY:{Client Secret} |
Request Body
- No request body required.
Response
Response Body
Property | Type | Description |
---|---|---|
name | string | Conversion name |
code | number | Code information |
code.id | string | Code value |
code.type | string | Code type Example) L: Legal dong, A: Administrative dong, S: Administrative dong where the legal dong with the same name exists. |
code.mappingId | string | ID related mapping code. Example) NAVER dong code mapped with the legal code or NAVER dong code mapped with the administrative code |
region | Region name information. | |
region.area0 | ||
region.area0.name | string | Two letters of the country code top level domain. Refer to Country code top-level domain for more information. |
region.area0.coords.center | Center coordinates of the administrative district. | |
region.area0.coords.center.crs | string | Coordinate system code. Refer to Coordinate systems for available coordinate system codes. |
region.area0.coords.center.x | float | x-coordinate. Example) Longitude for the lat-lng coordinate system (epsg:4326). |
region.area0.coords.center.y | float | y-coordinate. Example) Latitude for the lat-lng coordinate system (epsg:4326). |
region.area1 | ||
region.area1.name | string | Administrative district unit name 1. Example) City (Si) and Province (Do) names officially announced by the Ministry of Public Administration and Security in Korea |
region.area1.coords | Coordinates related to the administrative district | |
region.area1.coords.center | Center coordinates of the administrative district. | |
region.area1.coords.center.crs | string | Coordinate system code. Refer to Coordinate systems for available coordinate system codes. |
region.area0.coords.center.x | float | x-coordinate. Example) Longitude for the lat-lng coordinate system (epsg:4326). |
region.area1.coords.center.y | float | y-coordinate. Example) Latitude for the lat-lng coordinate system (epsg:4326). |
region.area2 | ||
region.area2.name | string | Administrative district unit name 2. Example) Si, Gun, and Gu names officially announced by the Ministry of Public Administration and Security in Korea |
region.area2.coords | Coordinates related to the administrative district | |
region.area2.coords.center | Center coordinates of the administrative district. | |
region.area2.coords.center.crs | string | Coordinate system code. Refer to Coordinate systems for available coordinate system codes. |
region.area2.coords.center.x | float | x-coordinate. Example) Longitude for the lat-lng coordinate system (epsg:4326). |
region.area2.coords.center.y | float | y-coordinate. Example) Latitude for the lat-lng coordinate system (epsg:4326). |
region.area3 | ||
region.area3.name | string | Administrative district unit name 3. Example) Eup, Myeon, and Dong names officially announced by the Ministry of Public Administration and Security in Korea |
region.area3.coords | Coordinates related to the administrative district | |
region.area3.coords.center | Center coordinates of the administrative district. | |
region.area3.coords.center.crs | string | Coordinate system code. Refer to Coordinate systems for available coordinate system codes. |
region.area3.coords.center.x | float | x-coordinate. Example) Longitude for the lat-lng coordinate system (epsg:4326). |
region.area3.coords.center.y | float | y-coordinate. Example) Latitude for the lat-lng coordinate system (epsg:4326). |
region.area4 | ||
region.area4.name | string | Administrative district unit name 4. Example) Li names officially announced by the Ministry of Public Administration and Security in Korea |
region.area4.coords | Coordinates related to the administrative district | |
region.area4.coords.center | Center coordinates of the administrative district. | |
region.area4.coords.center.crs | string | Coordinate system code. Refer to Coordinate systems for available coordinate system codes. |
region.area4.coords.center.x | float | x-coordinate. Example) Longitude for the lat-lng coordinate system (epsg:4326). |
region.area4.coords.center.y | float | y-coordinate. Example) Latitude for the lat-lng coordinate system (epsg:4326). |
land | Detailed address information | |
land.type | string | Land type for land-lot based addresses Example) For land-lot based addresses in Korea, 1: General land, 2: Mountain For road name addresses, it is reserved. |
land.name | string | Detailed name. Example) For land-lot based addresses in Korea, it is reserved. For road name addresses in Korea, it is a road name. |
land.number1 | string | Detailed number 1. Example) For land-lot based addresses in Korea, it is a main number. For road name addresses in Korea, it is a detailed address. |
land.number2 | string | Detailed number 2. Example) For land-lot based addresses in Korea, it is a sub number. For road name addresses in Korea, it is reserved. |
land.coords | Coordinates related to cadastral areas (reserved) | |
addition0 | Additional information. For land-lot based addresses, it is reserved. For road name addresses, it is building information. | |
addition0.type | string | For road name addresses with building information, it is building . |
addition0.value | string | For road name addresses with building information, it is a building name. |
addition1 | Additional information. For land-lot based addresses, it is reserved. For road name addresses, it is a zip code. | |
addition1.type | string | For road name addresses with zip code information, it is zipcode . |
addition1.value | string | For road name addresses with zip code information, it is a zip code. |
addition2 | Additional information. For land-lot based addresses, it is reserved. For road name addresses, it is a road code. | |
addition2.type | string | For road name addresses, it is 'roadGroupCode'. |
addition2.value | string | For road name addresses, it is a road code (12-digit road group code). |
addutuib3~4 | reserved |
The API request returns different response data depending on the source coordinates. See the following cases.
Eup/Myeon/Dong
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=126.9913201,37.5666936&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=129.1133567,35.2982640&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
Li: As “Li” is a unit under “Eup/Myeon” designated by law, the code type for admcode is also set to “L.”
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=128.2439084,36.4938906&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
Bundang-gu Jeongja-dong: There are administrative dongs with the same name as the legal dong (in different areas).
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=127.1114893,37.3614463&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
Coordinates of Sejong-si: No si/gun/gu area2 data exists, and all administrative dongs under Sejong-si have the same legal dong (in different areas).
Dodam-dong (the same name in legal/administrative dong):
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=127.2654387,36.5008113&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
Jochiwon-eup (legal):
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=127.2923750,36.5929071&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
On the sea (no data):
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=125.9913201,37.5666936&sourcecrs=epsg:4326&orders=admcode,legalcode,addr,roadaddr&output=xml
Examples
Request Example
curl "https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=129.1133567,35.2982640&sourcecrs=epsg:4326&output=json&orders=legalcode,admcode" \
-H "X-NCP-APIGW-API-KEY-ID: {Client ID issued when registering an application}" \
-H "X-NCP-APIGW-API-KEY: {Client Secret issued when registering an application}" -v
- Convert coordinates into a legal code
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=129.1133567,35.2982640&sourcecrs=epsg:4326&output=json&orders=legalcode
- Convert coordinates into a land-lot based address and administrative code
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=129.1133567,35.2982640&sourcecrs=epsg:4326&output=json&orders=addr,admcode
- Convert coordinates into a land-lot based address, administrative code and road name address
https://naveropenapi.apigw.ntruss.com/map-reversegeocode/v2/gc?request=coordsToaddr&coords=129.1133567,35.2982640&sourcecrs=epsg:4326&output=json&orders=addr,admcode,roadaddr
Request Example
{
"status":{
"code":0,
"name":"ok",
"message":"done"
},
"results":[
{
"name":"legalcode",
"code":{
"id":"2641010100",
"type":"L",
"mappingId":"08410101"
},
"region":{
"area0":{
"name":"kr",
"coords":{
"center":{
"crs":"",
"x":0.0,
"y":0.0
}
}
},
"area1":{
"name":"Busan Metropolitan City",
"coords":{
"center":{
"crs":"EPSG:4326",
"x":129.0750222,
"y":35.1798159
}
}
},
"area2":{
"name":"Guemjeong-gu",
"coords":{
"center":{
"crs":"EPSG:4326",
"x":129.0921,
"y":35.243068
}
}
},
"area3":{
"name":"Dugu-dong",
"coords":{
"center":{
"crs":"EPSG:4326",
"x":129.1133567,
"y":35.2982641
}
}
},
"area4":{
"name":"",
"coords":{
"center":{
"crs":"",
"x":0.0,
"y":0.0
}
}
}
}
}
]
}
Error Codes
The API returns HTTP status 200 if the request was successful, with the following codes.
code | name | Description |
---|---|---|
0 | ok | The API request is successfully made and returns a result. |
3 | no results | The API request is successfully made but returns no result. |
If the API request was not successful, it returns the following.
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | 100 | invalid request | Invalid request parameters |
500 | 900 | unknown error / io error | Unknown error |