CA
multiple-amethyst
How to call apify actors from a separate server?
Context:
- I'm currently using playwright on my nextjs api routes
- these playwright scripts scrape a website & persist the data in my database (postgres)
- since I need IP roration with session management though, I'd love to offload the scraping to crawlee
- I'm considering apify as the deployment platform as this seems to be the recommended setup and apify apparently also supports webhooks -- e.g. can I get notified about the status of my actor run, such as
job.started
or job.finished
events?
- I'd love for the crawlee scraper on apify to persist data to my database so that my nextjs api refers to the database as the source of truth
I imagine I'd call something like this within my nextjs api route:
The actor should ideally update my postgres database directly. All I need to do is set up a webhook receiver for incoming webhooks to get updated about what's happening.1 Reply
answered in different thread https://discord.com/channels/801163717915574323/1118507308088053820/1118831246320078928