6

I want to get the coordinates of a Wikipedia page through their API. I want to put the page title as 'titles' parameter. I have searched SO for a solution but seems they are scrapping the page then extracting. Is it possible through their API?

Kinkaku-ji

Termininja
  • 6,620
  • 12
  • 48
  • 49
Nasir Ahmed
  • 501
  • 2
  • 14

1 Answers1

12

You need to use Wikipedia API. For your example with Kinkaku-ji the query will be:

https://en.wikipedia.org/w/api.php?action=query&prop=coordinates&titles=Kinkaku-ji

For more than one title use pipe to separate them: titles=Kinkaku-ji|Paris|...

Termininja
  • 6,620
  • 12
  • 48
  • 49