Reddit Scraper Lite avatar
Reddit Scraper Lite

Pricing

Pay per event

Go to Store
Reddit Scraper Lite

Reddit Scraper Lite

trudax/reddit-scraper-lite

Developed by

Gustavo Rudiger

Maintained by Community

Pay Per Result, unlimited Reddit web scraper to crawl posts, comments, communities, and users without login. Limit web scraping by number of posts or items and extract all data in a dataset in multiple formats.

5.0 (2)

Pricing

Pay per event

112

Monthly users

678

Runs succeeded

83%

Response time

3.8 days

Last modified

19 days ago

DK

CORS Error When Using API in React Application

Closed
dakster opened this issue
3 months ago

I am encountering a CORS error when trying to use the API in my React.js application.

The error message states: Access to XMLHttpRequest at 'https://api.apify.com/v2/actor-tasks/trudax/reddit-scraper-lite/runs?token=apify_api_token' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

This issue occurs when making an API call from the React frontend hosted locally on http://localhost:3000. It seems the API server does not allow requests from this origin due to CORS restrictions.

I have added the API call to my React application, but I am unable to proceed due to this error. Could you please guide me on how to resolve this or update the API to support CORS for local development?

trudax avatar

This is not an issue with the actor, so I cannot provide much guidance, but you probably need something like the /local-cors-proxy node package.

Pricing

Pricing model

Pay per event 

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for each dataset of 1,000 items in the Actor outputs.

Actor start per 1 GB

$0.020

Flat fee for starting an Actor run for each 1 GB of memory.

Result stored

$0.004

Cost per result stored.