0

I'm looking to retrieve song years using their titles. I'd like to use wikipedia results and I've found MediaWiki API is the way to go.

The problem is I can't find any query for the "year" or "recorded:" inside the MediaWiki API doc (for instance check this wiki page found using title: https://en.wikipedia.org/wiki/Coffee_%26_TV), anyone that knows of a workaround or is a MediaWiki API guru?

I found this for parsing the info frame inside a page (but doesn't include "year:" or "recorded:"): https://www.mediawiki.org/wiki/API:Info

I'm using javascript, jquery and a php file to get the youtube api going, so I used the $get.('') for others api requests already.

m4tt
  • 825
  • 1
  • 11
  • 28
  • 2
    You rather need Wikidata: Wikidata API or SPARQL. – Stanislav Kralin Aug 24 '18 at 19:33
  • I searched for it on google and it redirects me to MediaWiki (which i spelled wrong WikiMedia, now i corrected it) – m4tt Aug 24 '18 at 20:09
  • 1
    In Wikidata API, which is an extension of MediaWiki API: https://www.wikidata.org/w/api.php?action=wbgetclaims&entity=Q2484305&property=P577&format=json. Now your question should be: how to find that Q2484305. Please try to find the answer yourself. – Stanislav Kralin Aug 25 '18 at 07:36
  • Or try this recipe: https://stackoverflow.com/q/51949112/7879193 – Stanislav Kralin Aug 25 '18 at 08:00
  • The MediaWiki API has an Article model, but not a Song model, so you won't find titles and years in it. One way to do this is export the articles you're using with my [mediawiki-export](https://github.com/nikolas/mediawiki-export) script, then parse out the info you need yourself. As others have mentioned though, Wikidata API is more what you're looking for. – nnyby Aug 30 '18 at 16:40

0 Answers0