Gurunavi Web Service

Gurunavi is one the largest and popular restaurant listing service in Japan. They provide great web service to let you search and list all restaurants in multiple languages.

The link is

You have to first register from this page, and get access ID.

Let’s say;
I want to be able to search restaurants in Japan by prefectures or metropolitan areas.  I will call API to get list of prefectures or areas, then be able to click them then show the list of restaurants in the specific prefectures or areas.

Create API URL below;

Then you ll get response like;

The list of area is probably not going to be updated for long, and up to little less than 50 prefectures, so instead of making call to Gurunavi server every time, I fetch the list and store them locally or just hard code them. But if you are to make call to API and build links from server side when the page is load. I ll make new model called gAreaMasterModels as a container for Area data Gurunavi passes like below;

Expected API response is like below;

and Model is below;

Then I create controllers, which load xml response from gurunavi and put them into variable g.