Tutorial

How to Scrape Reddit Without the Official API

Reddit's API is expensive and rate-limited. Use Scavio's Reddit endpoint to access posts, comments, and threads without OAuth.

Reddit's 2023 API pricing change made bulk Reddit access prohibitively expensive for most startups. Scavio's Reddit endpoint proxies the public Reddit data layer with no OAuth and no per-app rate caps. This tutorial walks through the common patterns: post search, comment threads, and subreddit monitoring.

Prerequisites

  • Python 3.10+
  • A Scavio API key
  • A subreddit or query target

Walkthrough

Step 1: Search posts by query

Scavio returns Reddit posts ranked by relevance or recency.

Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']

def search(query, time='month'):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'reddit', 'query': query, 'time': time})
    return r.json().get('posts', [])

Step 2: Pull comments for a thread

Pass the post URL or id.

Python
def comments(post_url):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'reddit_comments', 'query': post_url})
    return r.json().get('comments', [])

Step 3: Monitor a subreddit

New posts in r/MachineLearning every hour.

Python
def watch(subreddit):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'reddit', 'query': f'subreddit:{subreddit}', 'sort': 'new'})
    return r.json().get('posts', [])[:25]

Step 4: Filter for buyer intent

Regex for 'looking for', 'recommend', 'alternative'.

Python
import re
BUYER = re.compile(r'\b(looking for|recommend|alternative to|help me)\b', re.I)

def intent(posts):
    return [p for p in posts if BUYER.search(p.get('title', '') + p.get('selftext', ''))]

Step 5: Write to a CSV for SDRs

One row per intent signal.

Python
import csv
def export(posts):
    with open('reddit_intent.csv', 'w') as f:
        w = csv.DictWriter(f, fieldnames=['title', 'url', 'subreddit'])
        w.writeheader(); w.writerows(posts)

Python Example

Python
import os, requests

API_KEY = os.environ['SCAVIO_API_KEY']

def reddit(query):
    r = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY},
        json={'platform': 'reddit', 'query': query, 'time': 'week'})
    return r.json().get('posts', [])

for p in reddit('looking for serp api')[:10]:
    print(p['title'], p['url'])

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function reddit(query) {
  const r = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ platform: 'reddit', query, time: 'week' })
  });
  return (await r.json()).posts;
}
const posts = await reddit('looking for serp api');
console.log(posts.slice(0, 10));

Expected Output

JSON
25 posts per subreddit watch, filtered to ~3-5 buyer-intent signals. Typical SDR workflow: 10 minutes/day, 5-15 qualified leads per week.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.10+. A Scavio API key. A subreddit or query target. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Reddit's API is expensive and rate-limited. Use Scavio's Reddit endpoint to access posts, comments, and threads without OAuth.