Wiki API

January 28, 2016 0 Comments

http://en.wikipedia.org/w/api.php

— This is the place on the web where the API lives. Here, we’re using Wikipedia as an example, but you can replace this first part with the URL of any MediaWiki installation.
action=query — fetch the data requested in the rest of the URL.
list=backlinks — list pages that link to a specific page.
bltitle=Star%20Wars — the specific page with the title “Star Wars” (note that %20 represents a space).
bllimit=10 — limit to 10 results.
I simply took one of the default examples listed in the API documentation and made only minor changes to gather the information that I was interested in seeing.

Here Only Needed Item Declare So More Info : https://www.mediawiki.org/wiki/Category:MediaWiki_action_API

Search Data :

title is encoded mode.
https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=175&explaintext=&titles=Star%20Wars

search On data Pageid:

pageids=3747

https://en.wikipedia.org/w/api.php?action=query&prop=info&pageids=3747&inprop=url

Sortdata:

https://en.wikipedia.org/w/api.php?action=opensearch&search=zyz&limit=1&namespace=0&format=jsonfm

With xml & JSON data with image: format=xml

https://en.wikipedia.org/w/api.php?action=opensearch&limit=5&format=xml&search=italy&namespace=0

Data with url :

https://en.wikipedia.org/w/api.php?action=query&prop=info&pageids=3747&inprop=url

ALL DATA :

https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts|info|revisions|pageimages|images&exintro=175&explaintext=&titles=Star%20Wars&meta=userinfo

 

Contributer

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

0 comments:

Hot-product

Best Watch Store

Popular Posts

Contact Form

Name

Email *

Message *