For each person in a list, I need to get а person's name, date of birth, date of death, and image URL.
I plan on using this thru Category:Born_on_day_month
for each day in the year, through Wikipedia (Each day has around 1000 people).
When I tried to get with php-script
the list here, it works as intended.
However, when I tried to get Wiki id for each person thru this and then by this, it threw an error after 5-10 requests (One request takes about 0.5s).
I know this isn't the best way of doing this, and hope to find a better method. What would be the best way to do this? (maybe one big request for some subpurpose)?
The first two requests can be combined to https://ru.wikipedia.org/w/api.php?action=query&format=xml&generator=categorymembers&gcmlimit=max&gcmtitle=Category:родившиеся_1_января&prop=pageprops.
The Wikidata requests can be reduced by using "action=wbgetentities". Then you can add up to 50 item ids separated by pipe, e.g. https://www.wikidata.org/w/api.php?format=xml&action=wbgetentities&ids=Q4054186|Q2669358|Q4054194
However, as you basically want to extract data of all people with a Wikipedia article, you will still have to do thousands of requests. Instead of copying all data, think about which data you really need for your application and then query only those.