Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limits of the Wikipedia API

I read that wikipedia's API is called MediaWiki. My question is regarding this API. Does this API have a maximum of calls per day/ hours / minutes ? I can't seem to find it.

like image 247
Olivier_s_j Avatar asked Nov 28 '12 15:11

Olivier_s_j


People also ask

What are the limits of API?

General quota limits10 queries per second (QPS) per IP address. In the API Console, there is a similar quota referred to as Requests per 100 seconds per user. By default, it is set to 100 requests per 100 seconds per user and can be adjusted to a maximum value of 1,000.

What can you do with Wikipedia API?

Introduction. The MediaWiki Action API is a web service that allows access to some wiki features like authentication, page operations, and search. It can provide meta information about the wiki and the logged-in user.

Does Wikipedia have APIs?

What is the Wikipedia API? The Wikipedia API (official documentation) is supported by the MediaWiki's API and provide access to Wikipedia and other MediaWiki data without interacting with the user interface.

What are the two types of API limits?

Rate limits can be "hard" (enforced) or "soft". If the rate limit is hard and a call exceeds the limit, then the call is aborted and an error is returned. A soft rate limit allows the call to complete but logs a warning message.


2 Answers

They state some API:Etiquette and API:FAQ.

There is no hard and fast limit on read requests, but we ask that you be considerate and try not to take a site down. Most sysadmins reserve the right to unceremoniously block you if you do endanger the stability of their site.

If you make your requests in series rather than in parallel (i.e. wait for the one request to finish before sending a new request, such that you're never making more than one request at the same time), then you should definitely be fine. Also try to combine things into one request where you can (e.g. use multiple titles in a titles parameter instead of making a new request for each title

API FAQ states you can retrieve 50 pages per API request.

You can use Data Dumps as well if you need content offline (likely a little outdated).

For a graceful termination of your script in case you hit any of the limits, you can handle errors & warnings in API calls using these status messages.

like image 136
Abdullah Leghari Avatar answered Dec 28 '22 03:12

Abdullah Leghari


See the wikimedia REST API "Terms and Conditions" for the latest rate limits (200 requests per second in 2022). What do you plan to do with the Wikipedia API?

like image 35
hd1 Avatar answered Dec 28 '22 04:12

hd1