API:Geosearch/ja

付近の場所のウィキページを地理座標またはページ名によって検索するGET リクエストです.



APIの説明文書
View the complete documentation and list of supported parameters here.



例1: 座標を取得


GET リクエスト
Obtain coordinates of Wikimedia Foundation headquarters by providing the article title:

レスポンス


サンプル コード


例2: ページに対して付近を検索


GET リクエスト
Search for pages near Wikimedia Foundation headquarters by specifying the geographic coordinates of its location:

レスポンス


サンプル コード


例3: 画像ありでページに対して付近を検索


GET リクエスト
As an enhancement to Example 2, here we use the Generator module to get search results for pages near Wikimedia Foundation headquarters with images. Parameters passed along with a generator must be prefixed with a. Note that in the query below, we've changed  coord to   coord.

レスポンス


サンプル コード


デモ アプリ

 * Special:Nearby on English Wikipedia shows articles of places around you Screenshot of Wikipedia IOS app.jpg
 * Wikipedia Mobile Apps use this API to show nearby locations. API usage can be seen in the source code of Android and iOS app
 * Nearby is an app for the Pebble smart watch that fetches Wikipedia articles near you.



起こりうるエラー


追加的な注記

 * This module is supported through the, currently installed on Wikimedia Commons, all Wikipedias, all Wikivoyage sites, and some other wikis. You can use Special:Version of a wiki to check if the extension is listed there.
 * In addition to using the API as to ask for a page coordinates (as explained in Example 1), here are a few more ways to obtaining them:
 * If you want your user's current location, it's available through many OS-specific APIs. Recent browsers have an opt-in  object. See MDN docs.
 * If you want the user to provide coordinates, there are various services that let the user pick from a map. See w:Wikipedia:Obtaining geographic coordinates.

