Reddit API Scraper avatar
Reddit API Scraper
Try for free

Pay $5.00 for 1,000 results

View all Actors
Reddit API Scraper

Reddit API Scraper

comchat/reddit-api-scraper
Try for free

Pay $5.00 for 1,000 results

Reddit Scraper is a powerful tool that allows you to extract data from Reddit such as posts by keyword. With Reddit Scraper, you can easily gather valuable information from Reddit without the need to log in. You can easily use this Reddit scraper as an alternative API.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "searchList": [
11        "webscraping"
12    ],
13    "resultsLimit": 5,
14    "sortBy": "new",
15    "proxy": {
16        "useApifyProxy": true,
17        "apifyProxyGroups": [
18            "RESIDENTIAL"
19        ]
20    }
21};
22
23(async () => {
24    // Run the Actor and wait for it to finish
25    const run = await client.actor("comchat/reddit-api-scraper").call(input);
26
27    // Fetch and print Actor results from the run's dataset (if any)
28    console.log('Results from dataset');
29    console.log(`šŸ’¾ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
30    const { items } = await client.dataset(run.defaultDatasetId).listItems();
31    items.forEach((item) => {
32        console.dir(item);
33    });
34})();
35
36// šŸ“š Want to learn more šŸ“–? Go to ā†’ https://docs.apify.com/api/client/js/docs
Developer
Maintained by Apify
Actor metrics
  • 62 monthly users
  • 100.0% runs succeeded
  • 7.9 days response time
  • Created in Dec 2022
  • Modified 3 months ago