outscraper/outscraper-python

Add option to enable and disable async and sync API flow

Closed this issue · 2 comments

Currently this SDK is calling API in async way, but adding loop till it receive update or max ttl expire.
While integrating this SDK with Obsei, I faced python thread getting chocked. So I used direct API call -
https://github.com/obsei/obsei/blob/master/obsei/source/google_maps_reviews.py

Ideally requests itself support timeout, so better to call API in sync fashion. And if user interested in async call then better to call second api via requests even hook. Which use can pass the custom function to handle the output. This way main thread will not be blocked for the call.

This is just enhancement request. I just suggested to improve it :)

Thank you for the request! We're moving toward fast API responses. With the new version of google_maps_reviews you can call the API with async=flase if the response time is expected to be fast and async=true if it's expected that the amount of reviews is going to be big (more than 1000 reviews).

Could you please try it and let me know if it helps?

Alternatively, we've added support for webhooks: https://app.outscraper.com/integrations
So probably we'll add the ability to force async=true so you can call the API and the results will be returned to your webhook. Please let me know if this is what you are looking for.

Thank you @vlad-stack
I have already moved to v3 API.
In fact, started using in production our SaaS solution https://oraika.com
Hopefully, we will get enough traffic and increase our collaboration.

For now closing this.