A
A
A_Lincoln2018-05-14 20:27:09
PHP
A_Lincoln, 2018-05-14 20:27:09

Vkontakte API: how to organize the request queue in the most efficient way?

Hello.
There was a task to collect data from Vkontakte publics. There will be a lot of publics, 300+. That is, it is at least 300 requests in a pack. It is necessary to collect the freshest for the day - at night.
I looked in the API dock for limits, I seem to be able to fit in, with this ok. Although I don’t know how it can behave with such a number.

wall.get - 5000 calls per day.

Now I'm looking for a good solution and the right strategies in PHP, how to most effectively implement the task.
What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivankomolin, 2018-05-17
@ivankomolin

1. Respect limits. No more than 3 requests per second. Limits are issued per account. If not enough, add several accounts (several sims for different persons) + a proxy for each so that the whole pack of accounts is not banned.
There are also quantitative limits, but nothing is known about them, so you should not abuse calling one method per account.
2. View the execute method in the documentation, it allows you to access a bunch of methods in one request.
3. Look towards the Callback API or Bots Long Poll to reduce the number of requests (Push data when events occur in the community to your server)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question