-1

If I search any keyword on Google like "Sesame oil" it shows content from wiki at right side. Those details are informative for users.

I wanted to know, is there any API provided by WikiPedia which I can use as well? So that if any user search for any keyword, details from Wiki can be shown as well.

Vijay G
  • 63
  • 9
  • Well no .. But, you can crawl content using php easily.. Its generally the first paragraph of the page. – Atul Sharma Sep 10 '16 at 16:19
  • Is that legal to crawl content and show on personal website? – Vijay G Sep 10 '16 at 16:31
  • 1
    its available publicly.. So, i don't think there would be any issue. At most you can give credit .. like a small tag to show that this content was originally published at wikipedia. – Atul Sharma Sep 10 '16 at 17:59

1 Answers1

1

You can use wikipedia Search API to find articles that are the closest to the keyword. Then once you've got the title, there's a publicly available summary endpoint, which gives you title, short text extract, wikidata definition and an image for an article what you can present to the user.

As for your question about whether it's legal - yep, it totally is.

Petr
  • 5,999
  • 2
  • 19
  • 25