Kakao Map Rest API example for Address Search

지도/로컬 API에 대한 문의게시판입니다.

Can you provide with the Kakao Map REST API example in C# for Address Search?

We want to use this API to Get Coordinates based on Address.

Thanks.

We don’t provide C# examples.

“주소 검색” REST API can get the coordinates based on the address.

The link below is the REST API documentation with curl sample.

Please refer to the link.

https://developers.kakao.com/docs/latest/ko/local/dev-guide#address-coord

Thanks, lea for the update.

I have taken below steps to get started if you could validate those that would be great

I have created a test app for development
Added localhost domain name along with the localhost IP address 127.0.0.1

Got the API key that we can use to access the URL

var request = (HttpWebRequest)WebRequest.Create(“https://dapi.kakao.com/v2/local/search/address.json?query=” + address);
request.Headers.Add(“KakaoAK”, “”);

Are these steps accurate?

Thanks,
Mahek

Hi Mahek,

You must send the REST API key in the header.

How to get the REST API key is as follows.

  1. Go to https://developers.kakao.com/ and login.
  2. Please add my application.
  3. When you enter the added application, you can check the app key.

And the code below is how I used axios in javascript.

Please refer to the following code.

Regards,

var REST_API_KEY = 'rest api key';
axios({
    method: 'get',
    url: 'https://dapi.kakao.com//v2/local/search/address.json?query=전북 삼성동 100',
    headers: {'Authorization': 'KakaoAK ' + REST_API_KEY }
  })
  .then(function (response) {
    console.log(JSON.stringify(response.data));
});

Thanks, lea for the quick update, I’ll start implementing REST API referring above code
In-case if I need more help or have questions. I’ll post here.
Again, Thanks for your guidance.

Best,
Mahek

1개의 좋아요

Hi Lea,

Questions :
What should be address format?

I tried using below formats

https://dapi.kakao.com//v2/local/search/address.json?query=101+E+WT+Harris+Blvd+-+Bldg+1000+Charlotte+NC+28262+United+States

https://dapi.kakao.com//v2/local/search/address.json?query=101 E WT Harris Blvd Bldg 1000 Charlotte NC 28262 United States

but am getting below response

{
“documents”: [],
“meta”: {
“is_end”: true,
“pageable_count”: 0,
“total_count”: 0
}
}

but if I try any of the test address in Korean language, I get the response back

{
“documents”: [
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “영평동”,
“road_name”: “첨단로”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.57141015618”,
“y”: “33.4554365786162”,
“zone_no”: “”
},
“x”: “126.57141015618”,
“y”: “33.4554365786162”
},
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로동길”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로동길”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “월평동”,
“road_name”: “첨단로동길”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.57705894871”,
“y”: “33.4515045276368”,
“zone_no”: “”
},
“x”: “126.57705894871”,
“y”: “33.4515045276368”
},
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로2길”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로2길”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “영평동”,
“road_name”: “첨단로2길”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.568561179476”,
“y”: “33.4588520584887”,
“zone_no”: “”
},
“x”: “126.568561179476”,
“y”: “33.4588520584887”
},
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로3길”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로3길”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “영평동”,
“road_name”: “첨단로3길”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.573617371368”,
“y”: “33.4551347592912”,
“zone_no”: “”
},
“x”: “126.573617371368”,
“y”: “33.4551347592912”
},
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로5길”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로5길”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “영평동”,
“road_name”: “첨단로5길”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.574197846678”,
“y”: “33.4516407948811”,
“zone_no”: “”
},
“x”: “126.574197846678”,
“y”: “33.4516407948811”
},
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로7길”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로7길”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “영평동”,
“road_name”: “첨단로7길”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.574675139257”,
“y”: “33.4489827076339”,
“zone_no”: “”
},
“x”: “126.574675139257”,
“y”: “33.4489827076339”
},
{
“address”: null,
“address_name”: “제주특별자치도 제주시 첨단로8길”,
“address_type”: “ROAD”,
“road_address”: {
“address_name”: “제주특별자치도 제주시 첨단로8길”,
“building_name”: “”,
“main_building_no”: “”,
“region_1depth_name”: “제주특별자치도”,
“region_2depth_name”: “제주시”,
“region_3depth_name”: “영평동”,
“road_name”: “첨단로8길”,
“sub_building_no”: “”,
“underground_yn”: “N”,
“x”: “126.568188040085”,
“y”: “33.4460478418587”,
“zone_no”: “”
},
“x”: “126.568188040085”,
“y”: “33.4460478418587”
}
],
“meta”: {
“is_end”: true,
“pageable_count”: 7,
“total_count”: 7
}
}

My question was does it only supports Korean language and not English?

Thanks,
Mahek

Hi Mahek,

kakao map service is optimized for korean version.
Therefore, you can only search by Korean address.

Regards,

Hi lea,

Thanks for the update. I will update the client about this.

Best,
Mahek

Hi lea,

Can we search for a Korean address in English Version?

Does it support only Korean language version Addresses?

We have following address which are from Korea but are in English version.

Address 1 :

300, Olympic-ro, Songpa-gu
Seoul, 05551
Korea, Republic of

Address 2 :

Seocho-daero 74 gil 14, Seocho-gu
Seoul, 06620
Korea, Republic of

Below are the attached results from the postman

Korean Version:

image

English Version:

image

Best,
Mahek

Hi Mahek,

Since it is optimized for the Korean version, English is not provided.
Please note that only Korean and Korean addresses are provided.

Regards,

Hi Lea,

Thanks for the update. We are passing Korean versions of addresses to Kakao

Question on this :

I have 2 korean address of same location

  1. https://dapi.kakao.com//v2/local/search/address.json?query=송파구 올림픽로 300 서울, 05551 대한민국
  2. https://dapi.kakao.com//v2/local/search/address.json?query=서울 송파구 올림픽로 300, 05551 대한민국

The first address works and the second address doesn’t show any results

Working Address :

image

Non-working Address :

image

Do we need to pass the address in specific format or way ?

Best,
Mahek

Hi Mahek,

Please search that address without zip code and country code.
You should be search by road address or jibun address.
e.g) 송파구 올림픽로 300 서울 or 서울 송파구 올림픽로 300

Regards,

Hi Lea,

Thanks for the update.
I tried to search without the Postal code and Country and it did fetch me results.

300 Olympic-ro, Songpa-gu Seoul or 300 Olympic-ro, Songpa-gu, Seoul
"x": “127.104446890835”,
“y”: “37.5137519612953”

So, if we don’t pass the postal code and country we would still get accurate latitude and longitude?

Also, when we create an app, we need to provide allowed IP addresses to access the Map. Is there a way, where we can access the Map API without providing the IP address?

Thanks,
Mahek

Hi Mahek,

The api you are using returns the result value as information about the road address or the jibun address, so you don’t have to typing the zip code and country code.

If you typed the address correctly, the coordinate value will be correct.

If there is an allowed IP, you should be register in Advanced Settings> Allowed IP Address. If not use allowed IP, do not need to register.

And It is hard to give an answer in English every time.

Sorry,

Hi lea,

Thanks for all the help till now, really appreciate your quick communication.
For us as well English is not our first language, so I can understand.

Best,
Mahek