Sample API queries

From OpenHatch wiki
Jump to navigation Jump to search

Sample API queries to the Wikipedia API[edit]

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