Hi,
Quick question about the wbgetentities API: are there any general rules that clients should obey when making requests?
* Maximal hit rate? * How many entities can you actually get in one request? Is this documented anywhere? Is it possible for a tool to find this number or is it just hardcoded?
Cheers,
Markus
https://www.mediawiki.org/wiki/API:Etiquette is probably the best/reference document here...
Nemo
On 07.03.2015 16:39, Federico Leva (Nemo) wrote:
https://www.mediawiki.org/wiki/API:Etiquette is probably the best/reference document here...
Thanks, this answers my first question (no worries about request rate as long as requests are serialized).
Markus
Markus Krötzsch schreef op 7-3-2015 om 18:41:
On 07.03.2015 16:39, Federico Leva (Nemo) wrote:
https://www.mediawiki.org/wiki/API:Etiquette is probably the best/reference document here...
Thanks, this answers my first question (no worries about request rate as long as requests are serialized).
And to answer your second question: "Maximum number of values is 50 (500 for bots)" (from https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities)
Maarten
Hey,
And to answer your second question: "Maximum number of values is 50 (500
for bots)" (from https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities)
That seems a bit much to me. Considering an entity can easily be over 1MB in size. Won't something die by the time you get to half a GB?
Cheers
-- Jeroen De Dauw - http://www.bn2vs.com Software craftsmanship advocate Evil software architect at Wikimedia Germany ~=[,,_,,]:3
Hi,
Jeroen De Dauw schreef op 8-3-2015 om 2:03:
Hey,
And to answer your second question: "Maximum number of values is 50
(500 for bots)" (from https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities)
That seems a bit much to me. Considering an entity can easily be over 1MB in size. Won't something die by the time you get to half a GB?
Just looked at the Pywikibot code (see [1] and [2]) and it looks like 50 is the default. From experience I know that works just fine. I would just stick to that and not go bigger.
Maarten
[1] https://git.wikimedia.org/blob/pywikibot%2Fcore.git/HEAD/pywikibot%2Fpagegen... [2] https://git.wikimedia.org/blob/pywikibot%2Fcore.git/HEAD/pywikibot%2Fsite.py...
Thanks Maartens for the info.
On 08.03.2015 02:03, Jeroen De Dauw wrote:
Hey,
And to answer your second question: "Maximum number of values is 50
(500 for bots)" (from https://www.wikidata.org/w/api.php?action=help&modules=wbgetentities)
That seems a bit much to me. Considering an entity can easily be over 1MB in size. Won't something die by the time you get to half a GB?
I would expect that most cases are less than 1MB, esp. if you use the filtering options of the API (e.g., fetch the datatype of 500 properties). An alternative would be to have a size-dependent limit that cuts of the results when a certain data size has been reached, and includes a continuation link (like in paging) with the results.
Cheers,
Markus