Sample API queries: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Fhocutt
(Created page with "===Sample API queries to the Wikipedia API=== ; Help page for the query module for the Wikipedia API: <code>http://en.wikipedia.org/w/api.php?action=help&modules=query</code...")
 
imported>Fhocutt
 
Line 12: Line 12:


<code>http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment</code>
<code>http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp|user|comment</code>



; Most rencent 50 contributors to the Organic chemistry page:
; Most rencent 50 contributors to the Organic chemistry page:

Latest revision as of 03:58, 17 November 2014

Sample API queries to the Wikipedia API

Help page for the query module for the Wikipedia API

http://en.wikipedia.org/w/api.php?action=help&modules=query

General site information, and username + edit summary for most recent Main Page revision

http://en.wikipedia.org/w/api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user%7Ccomment&continue=

Timestamp, username, edit summary for the last 5 revisions on the Main Page

http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Main%20Page&rvlimit=5&rvprop=timestamp%7Cuser%7Ccomment

Most rencent 50 contributors to the Organic chemistry page

http://en.wikipedia.org/w/api.php?action=query&prop=contributors&format=json&pclimit=50&titles=Organic chemistry