Reddit Scraper V2
Pricing
from $1.10 / 1,000 results
Reddit Scraper V2
Reddit Scraper V2 — cached data source (results may lag up to ~1.5h). Structured JSON, no login, no API key. For real-time data use the V1 actor.
Reddit Scraper V2
Pricing
from $1.10 / 1,000 results
Reddit Scraper V2 — cached data source (results may lag up to ~1.5h). Structured JSON, no login, no API key. For real-time data use the V1 actor.
You can access the Reddit Scraper V2 programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1from apify_client import ApifyClient2
3# Initialize the ApifyClient with your Apify API token4# Replace '<YOUR_API_TOKEN>' with your token.5client = ApifyClient("<YOUR_API_TOKEN>")6
7# Prepare the Actor input8run_input = {9 "subreddits": ["forhire"],10 "startUrls": [{ "url": "https://www.reddit.com/r/webdev/" }],11 "users": ["spez"],12 "communities": ["technology"],13 "searchQueries": ["remote developer"],14 "searchFor": ["posts"],15 "sort": "hot",16 "time": "week",17 "includeNSFW": False,18 "includeSelftext": True,19 "includeComments": False,20 "maxComments": 20,21 "maxCommentDepth": 4,22 "includeMedia": False,23 "maxItems": 50,24 "maxPostsPerSource": 25,25 "maxPages": 1,26 "ignoreStartUrls": False,27 "maxRetries": 3,28 "requestDelayMs": 300,29 "debug": False,30}31
32# Run the Actor and wait for it to finish33run = client.actor("myagizm/reddit-scraper-v2").call(run_input=run_input)34
35# Fetch and print Actor results from the run's dataset (if there are any)36print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])37for item in client.dataset(run["defaultDatasetId"]).iterate_items():38 print(item)39
40# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-startThe Apify API client for Python is the official library that allows you to use Reddit Scraper V2 API in Python, providing convenience functions and automatic retries on errors.
Install the apify-client
$pip install apify-clientOther API clients include: