Reddit API

Our Reddit API gives you programmatic access to Reddit data that isn't available through any official API. Get data on posts and comments data, user details, subreddit information, vote counts, timestamps, and more. And the best part? You can try the Reddit API entirely for free, no credit card required.

Trusted by industry leaders all over the world

Integrate our Reddit API

Access the Reddit API using Python, JavaScript, CLI, cURL, OpenAPI, or MCP. Choose your preferred option and start extracting Reddit data in minutes.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "startUrls": [{ "url": "https://www.reddit.com/r/pasta/comments/vwi6jx/pasta_peperoni_and_ricotta_cheese_how_to_make/" }],
10 "sort": "new",
11 "maxItems": 10,
12 "maxPostCount": 10,
13 "maxComments": 10,
14 "maxCommunitiesCount": 2,
15 "maxUserCount": 2,
16 "scrollTimeout": 40,
17 "proxy": {
18 "useApifyProxy": True,
19 "apifyProxyGroups": ["RESIDENTIAL"],
20 },
21}
22
23# Run the Actor and wait for it to finish
24run = client.actor("trudax/reddit-scraper").call(run_input=run_input)
25
26# Fetch and print Actor results from the run's dataset (if there are any)
27print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
28for item in client.dataset(run["defaultDatasetId"]).iterate_items():
29 print(item)
30
31# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with Reddit API

Extract Reddit data by providing subreddit URLs, user profiles, or search terms. The Reddit Scraper returns structured JSON data with posts, comments, user details, vote counts, timestamps, media elements, and community information.

Input

{
"sort": "new",
"time": "all",
"type": "community",
"proxy": {
"useApifyProxy": true
},
"maxItems": 10,
"searches": [
"parrots"
],
"maxComments": 10,
"maxPostCount": 10,
"maxUserCount": 10,
"scrollTimeout": 40,
"maxCommunitiesCount": 10,
"maxLeaderBoardItems": 10
}

Output

{
"url": "https://www.reddit.com/r/HonkaiStarRail/comments/144w7sn/my_luckiest_10x_pull_yet/",
"body": "URL: https://i.redd.it/yod3okjkgx4b1.jpg\nThumbnail: https://b.thumbs.redditmedia.com/lm9KxS4laQWgx4uOoioM3N7-tBK3GLPrxb9da2hGtjs.jpg\nImages:\nhttps://preview.redd.it/yod3okjkgx4b1.jpg?auto=webp&v=enabled&s=be5faf0250e19138b82c7bbe5e7406fa46da4e73",
"icon": "https://b.thumbs.redditmedia.com/lm9KxS4laQWgx4uOoioM3N7-tBK3GLPrxb9da2hGtjs.jpg",
"tags": [
"Honkai Star Rail",
"gaming",
"gacha",
"luck"
],
"title": "My luckiest 10x pull yet",
"images": [
"https://preview.redd.it/yod3okjkgx4b1.jpg?auto=webp&v=enabled&s=be5faf0250e19138b82c7bbe5e7406fa46da4e73"
],
"authors": [
"YourKingLives"
],
"summary": "A Reddit post showing a lucky 10x pull in Honkai Star Rail.",
"category": "gaming",
"modified": "2023-06-09T05:23:28.409Z",
"published": "2023-06-09T05:23:15.000Z",
"publisher": "Reddit",
"article_type": "post",
"engagement_score": 1
}

How to use Reddit API

Sign up for Apify account01

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free
Get your Apify API token02

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.

Integrate Reddit API03

Navigate to the Reddit API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more.

Open Reddit API
Get your Reddit data via API04

Now, you can use the API and get the data you need from Reddit.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

Reddit does have an official API, but it requires authentication, has usage limitations, and Reddit announced it will become a paid service. Our unofficial Reddit Scraper offers advantages like no authentication required, no registration for tokens, and unrestricted access to publicly available Reddit data without the limitations of the official API.

Yes! You can try our Reddit Scraper for free with Apify's Free plan, which includes $5 in monthly credits. This will give you approximately 1,000 results, perfect for testing the scraper's capabilities before upgrading to a paid plan.

You can extract comprehensive Reddit data including posts with titles and text, comments with timestamps and points, user details with karma scores, subreddit information with member counts, vote counts, media elements, post and comment URLs, usernames, and community categories. The scraper supports sorting by Relevance, Hot, Top, and New.

Getting started is simple: 1) Create a free Apify account, 2) Open the Reddit Scraper, 3) Add subreddit URLs, user profiles, or search terms, 4) Click "Start" to begin scraping, 5) Download your data in JSON, CSV, XML, or Excel format. No coding skills required, and you can follow our step-by-step guide for additional help.

Get started with Reddit API today

Get your first Reddit data in less than 5 minutes. No credit card required. No commitment. Cancel anytime.