### Sample Request URL for Place Information API
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/placeinfo.html
This is an example of a GET request URL for the Place Information API. Replace '<あなたのClient ID(アプリケーションID)>' with your actual Client ID. The 'output' parameter can be set to 'json' or 'xml'.
```http
https://map.yahooapis.jp/placeinfo/V1/get?lat=35.66521320007564&lon=139.7300114513391&appid=<あなたのClient ID(アプリケーションID)>&output=json
```
--------------------------------
### Coupon Data Output Example (XML)
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of coupon data output in XML format. Includes fields like name, comment, setting, dates, and URLS.
```xml
結婚式二次会☆新郎・新婦無料他券併用不可22012-01-012012-03-31TrueFalsehttp://locoplace.jp/http://m.locoplace.jp/
```
--------------------------------
### Example Local Search Request URL
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/localsearch.html
This example demonstrates how to construct a URL to search for ramen shops within 2km of Roppongi using the 'Directory' cassette. Ensure you replace '' with your actual Client ID.
```url
https://map.yahooapis.jp/search/local/V1/localSearch?cid=d8a23e9e64a4c817227ab09858bc1330&lat=35.662654694078626&lon=139.73135330250383&dist=2&query=%E3%83%A9%E3%83%BC%E3%83%A1%E3%83%B3&appid=<あなたのClient ID(アプリケーションID)>
```
--------------------------------
### Point Geometry Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Example of a element defining a point with its Type and Coordinates. Note that coordinates are in 'longitude,latitude' format.
```xml
point139.7308,35.6656
```
--------------------------------
### Property Detail Data Output Example (JSONP)
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of property detail data output in JSONP format. Includes address, phone, and detail objects with fax and karaoke flags.
```json
"Property":{
"Address":"\u6771\u4eac\u90fd \u6e2f\u533a \u516d\u672c\u672810-14-7",
"Tel1":"03-1234-5678",
"Detail":[
{"DisplayAddress":"\u6771\u4eac\u90fd\u6e2f\u533a\u516d\u672c\u672810-14-7",
"Fax1":"03-1234-5679",
"KaraokeFlag":"True"}]
}
```
--------------------------------
### Push Data Output Example (XML)
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of push notification data output in XML format. Includes fields for ID, title, description, image, and update date.
```xml
7c30a04e9e574bfefc5d1cf2f2f7d2ds忘・新年会・各種宴会・結婚式二次会ご予約承り中♪忘年会のご予約はお早めに!!(12月・団体様最大70名様迄の個室平日空きあり)2011-11-16
```
--------------------------------
### Property Detail Data Output Example (XML)
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of property detail data output in XML format. Includes address, phone, and detail elements with fax and karaoke flags.
```xml
東京都 港区 六本木10-14-7
03-1234-5678東京都港区六本木10-14-703-1234-5679True
```
--------------------------------
### Linestring Geometry Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Example of a element defining a linestring. Multiple coordinate pairs are separated by spaces.
```xml
linestring139.5308,35.4656 139.4008,35.4656 139.4008,35.5056
```
--------------------------------
### ResultInfo XML Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of the ResultInfo element in XML format, detailing the response metadata including count, total records, start index, processing time, and status code.
```xml
107810.021200Yahoo!グルメが提供する全国の飲食店情報
```
--------------------------------
### Polygon Geometry Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Example of a element defining a polygon. Coordinates define the vertices of the polygon.
```xml
polygon139.6308,35.5656 139.5008,35.5656 139.5008,35.6056 139.6308,35.6056
```
--------------------------------
### Geometry JSON Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of a Geometry element in JSON format, specifying a linestring type with its coordinates.
```json
"Geometry":{"Type":"linestring","Coordinates":"139.69902,35.53503 139.69899,35.53531 139.69903,35.5356"}
```
--------------------------------
### Feature XML Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of a Feature element in XML format, representing a point of interest including its ID, name, category, geometry, and property information.
```xml
c9663446e499890051040b9c7cfbaf29東京ミッドタウン商業施設point139.7308854869,35.665615661963
東京都港区赤坂9-7-1他
03-0000-0000
```
--------------------------------
### Geometry XML Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of a Geometry element in XML format, defining a linestring with its type and coordinates, including format and order attributes.
```xml
linestring139.69902,35.53503 139.69899,35.53531 139.69903,35.5356
```
--------------------------------
### Feature JSON Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of a Feature element in JSON format, representing a point of interest with its ID, name, category, geometry, and property details.
```json
"Feature":[{"Id":"c9663446e499890051040b9c7cfbaf29",
"Name":"\u6771\u4eac\u30df\u30c3\u30c9\u30bf\u30a6\u30f3",
"Category":"\u5546\u696d\u65bd\u8a2d",
"Geometry":{"Type":"point","Coordinates":"139.7308854869,35.665615661963"},
"Property":{"Address":"\u6771\u4eac\u90fd\u6e2f\u533a\u8d64\u57429-7-1\u4ed6",
"Tel1":"03-0000-0000"}}]
```
--------------------------------
### Circle Geometry Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Example of a element defining a circle. It includes the Type, Coordinates of the center, and the Radius in meters.
```xml
circle139.7308,35.465610000
```
--------------------------------
### YDF Overview and Usage
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Explains what YDF is, how to call it using GeoXmlLayer, and provides a basic JavaScript code example.
```APIDOC
## YDF Overview
### What is YDF?
YDF (YOLP Data Format) is the standard data format for Yahoo! Open Local Platform (YOLP). It mediates input and output between APIs that display maps and Web APIs that output location data. It is used as the format for search results from APIs like the Geocoder API, and it can also describe and display geographical information such as points, lines, and areas on a map API. This section specifically explains the specifications required to pass figures as data to the JavaScript Map API. For other details, please refer to the reference.
### How to Call YDF
YDF is called using GeoXmlLayer. Generate Y.GeoXmlLayer by specifying the YDF path and execute Y.GeoXmlLayer.execute().
```javascript
var ymap = new Y.Map("map"),
layer = new Y.GeoXmlLayer('https://s.yimg.jp/images/map/yolp/developer_network/ydf/fukushima_js_sample.xml');
ymap.addLayer(layer );
layer.execute();
ymap.drawMap(new Y.LatLng(35.5656, 139.6308), 11, Y.LayerSetId.NORMAL);
```
### Overall Structure of YDF
This is the overall structure of YDF. For details of each element, please refer to each section of this page and the reference.
```
--------------------------------
### Example Property Data in XML
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
This XML snippet demonstrates the structure of a Property element, including common fields like Uid, Address, and Tel1.
```xml
8b8b8989f11b1990c66a7a042ddde5d2d8a23e9e64a4c817227ab09858bc1330ツクバエクスプレスミナミセンジュエキ
東京都荒川区南千住4丁目4−1
1311803-3806-5222
```
--------------------------------
### Example Country Data in XML
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
This XML snippet shows the structure for representing country data, including a country code and name.
```xml
JP日本
```
--------------------------------
### Error Response Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/zipcodesearch.html
This XML snippet illustrates an error response, specifically a 403 Forbidden status.
```xml
403
```
--------------------------------
### Sample Geocoding API Request
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/geocoder.html
Example of a request to the Geocoding API for searching an address. Ensure you replace '<あなたのClient ID(アプリケーションID)>' with your actual Client ID.
```http
https://map.yahooapis.jp/geocode/V1/geoCoder?appid=<あなたのClient ID(アプリケーションID)>&query=%e6%9d%b1%e4%ba%ac%e9%83%bd%e6%b8%af%e5%8c%ba%e5%85%ad%e6%9c%a8
```
--------------------------------
### Define Line Style with Arrows
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Configure a line style with specified size, opacity, color, and arrow markers at both the start and end points.
```xml
```
--------------------------------
### ResultInfo JSON Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of the ResultInfo element in JSON format, providing metadata about the API response such as data count, total records, start position, latency, and status.
```json
"ResultInfo":{"Count":10,"Total":78,"Start":1,"Latency":0.024,"Status":200,
"Description":"Yahoo!\u30b0\u30eb\u30e1\u304c\u63d0\u4f9b\u3059\u308b\u5168\u56fd\u306e\u98f2\u98df\u5e97\u60c5\u5831"
```
--------------------------------
### Sample Request: Search within a building by latitude and longitude
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/buildingSearch.html
This example demonstrates how to construct a request URL to search for facilities within a building using latitude and longitude coordinates. Ensure you replace '' with your actual Client ID.
```http
https://map.yahooapis.jp/inner/V1/building?lat=35.66619&lon=139.73008&appid=<あなたのClient ID(アプリケーションID)>
```
--------------------------------
### Feature Element with Point Geometry and Style
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
This example shows a element for a point, including its Name, Geometry (Type: point, Coordinates), and Style (Target: icon_pin_1).
```xml
東京ミッドタウンpoint139.7308,35.6656
```
--------------------------------
### Ellipse Geometry Example
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Example of a element defining an ellipse. It includes the Type, Coordinates of the center, and the Radius specified as 'horizontal_radius,vertical_radius'.
```xml
ellipse139.5308,35.665610000,5000
```
--------------------------------
### Sample Request URL for 2点間距離API
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/distance.html
This is an example of a request URL for the 2点間距離API when specifying coordinates for three points. Ensure your Client ID is replaced with your actual application ID.
```url
https://map.yahooapis.jp/dist/V1/distance?coordinates=139.73091159286,35.665662327613 135.49513388889,34.701974166667 130.42052944444,33.589735&appid=<あなたのClient ID(アプリケーションID)>
```
--------------------------------
### Sample Local Search API Request
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/localsearch.html
Example URL for searching local businesses using the Yahoo! Local Search API. Replace '' with your actual application ID.
```http
https://map.yahooapis.jp/search/local/V1/localSearch?cid=d8a23e9e64a4c817227ab09858bc1330&query=%E3%82%B5%E3%83%B3%E3%83%88%E3%83%AA%E3%83%BC%E7%BE%8E%E8%A1%93%E9%A4%A8&appid=<あなたのClient ID(アプリケーションID)>
```
--------------------------------
### Dictionary for Reusable Styles
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf
Organize common Style elements within a Dictionary for reuse across multiple features. This example includes two fill styles.
```xml
```
--------------------------------
### Yahoo! Geocoding API - GET /geoCoder
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/geocoder.html
The Yahoo! Geocoding API allows you to search for addresses and retrieve their location data. It supports GET requests and offers various parameters to refine your search.
```APIDOC
## GET /geoCoder
### Description
This endpoint provides keyword search functionality to retrieve location information (latitude, longitude) based on a specified address.
### Method
GET
### Endpoint
https://map.yahooapis.jp/geocode/V1/geoCoder
### Parameters
#### Query Parameters
- **appid** (string) - Required - Client ID (Application ID).
- **query** (string) - Required - The address (UTF-8 encoded) search query.
- **ei** (string) - Optional - Encoding format of the input search string. Options: UTF-8 (default), EUC-JP, SJIS.
- **lat** (float) - Optional - Latitude of the center point for searching.
- **lon** (float) - Optional - Longitude of the center point for searching.
- **bbox** (float) - Optional - Specifies the lower-left longitude, lower-left latitude, upper-right longitude, and upper-right latitude of a rectangular range in world geodetic system decimal format (comma-separated).
- **datum** (string) - Optional - Geodetic system for the specified latitude and longitude. Options: wgs (world geodetic system, default), tky (Japanese geodetic system).
- **ac** (string) - Optional - Address code (JIS X 0401). Can specify prefecture (2 digits) and city/town (5 digits). Example: Hokkaido: 01, Chuo-ku, Sapporo: 01101.
- **al** (integer) - Optional - Address search level. Used in combination with the `ar` option. Options: 1 (Prefecture level, e.g., Tokyo), 2 (City/Town level, e.g., Minato-ku, Tokyo), 3 (Town/Oaza level, e.g., Roppongi, Minato-ku, Tokyo, default), 4 (Chome/Aza level, e.g., Roppongi 1-chome, Minato-ku, Tokyo).
- **ar** (string) - Optional - Range for the address level. Used in combination with the `al` option. Options: ge (greater than or equal to), le (less than or equal to, default), eq (equal to).
- **recursive** (boolean) - Optional - If set to true, the search will be performed at a higher level if no match is found at the specified address level.
- **sort** (string) - Optional - Sort order. Options: score (relevance, default), dist (distance), kana (kana ascending), -kana (kana descending), address (address hierarchy), address2 (frequently searched addresses and address hierarchy).
- **exclude_prefecture** (boolean) - Optional - If set to false, prefecture records are included in the search (default: true).
- **exclude_seireishi** (boolean) - Optional - If set to false, designated city records are included in the search (default: true).
- **start** (integer) - Optional - Starting position for results (default: 1). The final position (start + results - 1) cannot exceed 100.
- **page** (integer) - Optional - Specifies the page number. Cannot be used with `start`.
- **results** (integer) - Optional - Number of results to display (default: 10, maximum: 100).
- **output** (string) - Optional - Output format. Options: xml (default), json.
- **callback** (string) - Optional - Callback function name for JSONP output. Must be UTF-8 encoded.
- **detail** (string) - Optional - Increases or decreases the number of output items (default: standard).
### Request Example
```
https://map.yahooapis.jp/geocode/V1/geoCoder?appid=&query=%e6%9d%b1%e4%ba%ac%e9%83%bd%e6%b8%af%e5%8c%ba%e5%85%ad%e6%9c%ac%e6%9c%a8
```
### Response
#### Success Response (200)
- **YDF** (object) - Contains all query response data.
- **ResultInfo** (object) - Summary information of the response.
- **Count** (integer) - Number of address data entries in the response.
- **Total** (integer) - Total number of data entries, including those not output.
- **Start** (integer) - Starting position of the address data entries in the response relative to the total data.
- **Status** (integer) - Code indicating the processing result. 200 for success.
- **Description** (string) - API description.
- **Latency** (float) - Time taken to generate the response.
- **Feature** (array) - Data for each search result.
- **Id** (string) - Address ID.
- **Gid** (string) - Group ID.
- **Name** (string) - Name of the region or facility.
- **Geometry** (object) - Geometric information of the location.
- **Type** (string) - Geometry type (e.g., point).
- **Coordinates** (string) - Coordinate information (longitude,latitude).
- **BoundingBox** (string) - Bounding box coordinates.
- **Category** (object) - Category information.
- **Description** (string) - Description of the feature.
- **Style** (object) - Style information.
- **Property** (object) - Contains various data fields.
- **Uid** (string) - Unique identifier within Yahoo! Open Local Platform (YOLP).
- **CassetteId** (string) - Cassette ID (fixed value).
- **Yomi** (string) - Reading of the region/facility name (Katakana).
- **Country** (object) - Country information.
- **Code** (string) - Country code (ISO 3166-1).
- **Name** (string) - Country name.
- **Address** (string) - Address in a single line.
- **GovernmentCode** (string) - Address code (JIS X 0402).
- **AddressMatchingLevel** (integer) - Level of address matching.
- **Detail** (object) - Detailed data.
- **NameHiragana** (string) - Reading of the region/facility name (Hiragana).
- **Approximation** (string) - Degree of match between the address and the query.
#### Response Example (XML)
```xml
1112000.05413103.29東京都港区六本木point139.73359259,35.66288632139.70869736,35.62303352 139.78198741,35.68270364f9a30565b66313c33f4540a1424fa89e57ee7209b22fee69b0dcaf2c2fe2d6a27906dafcトウキョウトミナトクロッポンギJP日本
東京都港区六本木
131033
```
### Error Handling
- **400**: Returned when the provided parameters do not match what the Web API expects.
- **204**: Returned when address information for the specified location cannot be found.
#### Error Response Example
```xml
0 Match From To parameter.204
```
**API Usage Notes**
The maximum URL length is 2048 bytes. Ensure that the URL, including encoded parameters, does not exceed this limit.
```
--------------------------------
### Local Search API - Sample Request and Response
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/localsearch.html
This snippet shows a sample GET request to the Local Search API to find 'Suntory Museum of Art' and its corresponding XML response.
```APIDOC
## GET /search/local/V1/localSearch
### Description
Searches for local businesses and points of interest based on a query.
### Method
GET
### Endpoint
https://map.yahooapis.jp/search/local/V1/localSearch
### Query Parameters
- **cid** (string) - Required - The cassette ID for the search.
- **query** (string) - Required - The search term (e.g., business name, category).
- **appid** (string) - Required - Your Client ID (Application ID).
### Request Example
```
https://map.yahooapis.jp/search/local/V1/localSearch?cid=d8a23e9e64a4c817227ab09858bc1330&query=%E3%82%B5%E3%83%B3%E3%83%88%E3%83%AA%E3%83%BC%E7%BE%8E%E8%A1%93%E9%A4%A8&appid=<あなたのClient ID(アプリケーションID)>
```
### Response
#### Success Response (200)
- **YDF** (object) - Contains all query response data.
- **ResultInfo** (object) - Summary information of the response.
- **Count** (integer) - Number of data items included in the response.
- **Total** (integer) - Total number of data items, including those not output.
- **Start** (integer) - Starting position of the data included in the response from the total data.
- **Status** (integer) - Code indicating the processing result to the requestor. Returns 200 for successful completion. For errors, refer to the error items below.
- **Description** (string) - Description of the status.
- **Latency** (float) - Time taken to generate the response information.
- **Feature** (array) - Data group for each search result.
- **Id** (string) - ID within the cassette.
- **Gid** (string) - Management ID of the point assigned to each point.
- **Name** (string) - Name of the area or point of interest.
- **Geometry** (object) - Geometry element representing the location of the point (World Geodetic System).
- **Type** (string) - Type of geometry.
- **Coordinates** (string) - Coordinate information.
- **Category** (object) - Category information.
- **Description** (string) - Description of the feature.
- **Style** (string) - Style information.
- **Property** (object) - Detailed elements of area/point information.
- **Uid** (string) - Identification ID within Yahoo! Open Local Platform (YOLP).
- **CassetteId** (string) - Cassette ID.
- **Yomi** (string) - Reading of the area/point name.
- **Country** (object) - Country information.
- **Code** (string) - Country code (ISO 3166-1).
- **Name** (string) - Country name.
- **Address** (string) - Address represented in one line.
- **GovernmentCode** (string) - Address code (JIS X 0401 5 digits).
- **AddressMatchingLevel** (string) - Address matching level.
- **Tel1** (string) - Phone number.
- **Genre** (object) - Store genre (multiple possible).
- **Code** (string) - Industry code.
- **Name** (string) - Genre name.
- **Area** (object) - Area information.
- **Code** (string) - Area code.
- **Name** (string) - Area name.
- **Station** (array) - Nearest station information (up to 3).
- **Id** (string) - Station ID.
- **SubId** (string) - Station Sub ID.
- **Name** (string) - Station name.
- **Railway** (string) - Representative railway line name.
- **Exit** (string) - Nearest station exit name.
- **ExitId** (string) - Nearest station exit ID.
- **Distance** (integer) - Distance from the nearest station exit (m).
- **Time** (integer) - Walking time from the nearest station exit.
- **KeepCount** (integer) - Keep count.
#### Response Example
```xml
1112000.03721331365961SbydF0FVLUgサントリー美術館point139.729511666667,35.6658186111115e807ebf7e656b712ba621c1a0b9ea68c5451919d8a23e9e64a4c817227ab09858bc1330サントリービジュツカンJP日本
東京都港区赤坂9丁目7−4
13103603-3479-86000305002美術館000025赤坂・六本木228932289301乃木坂東京メトロ千代田線34913349230492304901六本木都営大江戸線/東京メトロ日比谷線75423378228932289301乃木坂東京メトロ千代田線4491440869
```
```
--------------------------------
### Error Structure in XML
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/ydf/reference.html
Example of the Error structure in XML format, detailing API errors with messages and codes.
```xml
Web APIが見つかりません。404
```
--------------------------------
### Sample Request URL for Weather Information API
Source: https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/weather.html
Use this URL format to request weather data for a specific location. Replace '<あなたのClient ID(アプリケーションID)>' with your actual Client ID.
```http
https://map.yahooapis.jp/weather/V1/place?coordinates=139.732293,35.663613&appid=<あなたのClient ID(アプリケーションID)>
```