记忆

Scavio Reddit API

试用

Search Reddit, read posts and threaded comments, and pull subreddit, user, popular, and trending data as structured JSON. 12 endpoints for discussion research, brand monitoring, sentiment analysis, and RAG.

它能做什么

Search Reddit, read posts and threaded comments, and pull subreddit, user, popular, and trending data as structured JSON. 12 endpoints for discussion research, brand monitoring, sentiment analysis, and RAG.

技能文档

Reddit via Scavio

Search Reddit, read a post with its threaded comment tree, expand comment replies, and pull subreddit metadata and feeds, redditor profiles with their posts and comments, the site-wide popular feed, and trending search queries. All endpoints return structured JSON.

When to trigger

Use this skill when the user asks to:

  • Search Reddit for opinions, discussions, or public sentiment on a topic
  • Fetch the full text and comments of a Reddit post by id or URL
  • Expand the reply tree under a specific comment
  • Look up a subreddit's metadata or browse its post feed
  • Look up a redditor and read their submitted posts or comments
  • Browse the site-wide popular feed or current trending searches
  • Research how developers or communities talk about a product, library, or issue
  • Build RAG pipelines that need discussion-sourced context
  • Monitor brand or competitor mentions across Reddit

Note: Reddit requests take 5-15 seconds. Set a client timeout of at least 30 seconds.

Setup

Get a free API key at https://scavio.dev (50 free credits to get started, no card required):

export SCAVIO_API_KEY=sk_live_your_key

Every request is a POST with a JSON body and:

Authorization: Bearer $SCAVIO_API_KEY

Endpoints

Base URL: https://api.scavio.dev. All paths are under /api/v1/reddit. Every endpoint costs 1 credit.

EndpointCreditsDescription
POST /api/v1/reddit/search1Search Reddit posts by query
POST /api/v1/reddit/search/suggestions1Autocomplete suggestions for a query
POST /api/v1/reddit/post1Full details for a single post
POST /api/v1/reddit/post/comments1Top-level comments for a post
POST /api/v1/reddit/post/comments/replies1Replies to a specific comment
POST /api/v1/reddit/subreddit1Metadata for a subreddit
POST /api/v1/reddit/subreddit/posts1A subreddit's post feed
POST /api/v1/reddit/user1A redditor's profile
POST /api/v1/reddit/user/posts1A redditor's submitted posts
POST /api/v1/reddit/user/comments1A redditor's comments
POST /api/v1/reddit/popular1The site-wide popular feed
POST /api/v1/reddit/trending1Current trending search queries

Workflow

  1. Find discussions: call /reddit/search with query. Read results[].post_id.
  2. Autocomplete: call /reddit/search/suggestions with query for typeahead strings.
  3. Read a post: call /reddit/post with post_id (a t3_... fullname or bare id) or a full Reddit url.
  4. Comments: call /reddit/post/comments with post_id. Each comment carries a reply_cursor; pass it to /reddit/post/comments/replies as cursor (with the same post_id) to expand that thread.
  5. Subreddits: call /reddit/subreddit for metadata, /reddit/subreddit/posts for the feed.
  6. Redditors: call /reddit/user for the profile, /reddit/user/posts and /reddit/user/comments for their activity.
  7. Discovery: call /reddit/popular for the front-page feed and /reddit/trending for trending search queries.

Paginated endpoints return next_cursor; pass it back as cursor for the next page. Stop when next_cursor is null.

Parameters

ParameterTypeDefaultDescription
querystringrequiredSearch query (1-500 chars)
cursorstring--Pagination cursor from a prior next_cursor

Search suggestions (/search/suggestions)

query* (1-500 chars).

Post (/post)

ParameterTypeDefaultDescription
post_idstringone ofPost fullname (t3_...) or bare id
urlstringone ofFull Reddit post URL

Provide post_id or url (at least one is required).

Post comments (/post/comments)

ParameterTypeDefaultDescription
post_idstringrequiredPost fullname (t3_...)
sortstringTOPHOT, NEW, TOP, BEST, CONTROVERSIAL
cursorstring--Pagination cursor from a prior next_cursor

Comment replies (/post/comments/replies)

ParameterTypeDefaultDescription
post_idstringrequiredPost fullname (t3_...)
cursorstringrequiredA comment's reply_cursor from the comments endpoint
sortstringTOPHOT, NEW, TOP, BEST, CONTROVERSIAL

Subreddit (/subreddit)

subreddit* — a subreddit name (1-100 chars), e.g. AskReddit.

Subreddit posts (/subreddit/posts)

ParameterTypeDefaultDescription
subredditstringrequiredSubreddit name
sortstringHOTBEST, HOT, NEW, TOP, CONTROVERSIAL, RISING
cursorstring--Pagination cursor

User (/user)

username* — a redditor username (1-100 chars), without u/.

User posts / comments (/user/posts, /user/comments)

ParameterTypeDefaultDescription
usernamestringrequiredRedditor username
sortstringNEWHOT, NEW, TOP, BEST, CONTROVERSIAL
cursorstring--Pagination cursor

cursor (optional) — pagination cursor.

No parameters.

Examples

import os, requests

BASE = "https://api.scavio.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}"}

# 1. Search Reddit
results = requests.post(f"{BASE}/api/v1/reddit/search", headers=HEADERS,
    json={"query": "serpapi alternative"}).json()

post_id = results["data"]["results"][0]["post_id"]

# 2. Full post detail
post = requests.post(f"{BASE}/api/v1/reddit/post", headers=HEADERS,
    json={"post_id": post_id}).json()

# 3. Top comments, then expand one thread
comments = requests.post(f"{BASE}/api/v1/reddit/post/comments", headers=HEADERS,
    json={"post_id": post_id, "sort": "TOP"}).json()

reply_cursor = comments["data"]["comments"][0]["reply_cursor"]
replies = requests.post(f"{BASE}/api/v1/reddit/post/comments/replies", headers=HEADERS,
    json={"post_id": post_id, "cursor": reply_cursor}).json()

# 4. Subreddit feed
feed = requests.post(f"{BASE}/api/v1/reddit/subreddit/posts", headers=HEADERS,
    json={"subreddit": "Python", "sort": "TOP"}).json()

Response shapes

Every response uses the envelope { data, response_time, credits_used, credits_remaining }. Key data fields per endpoint:

  • searchresults[] (post_id, title, url, text, subreddit, author, score, num_comments, created_at, is_nsfw), next_cursor.
  • search/suggestionssuggestions[] (strings).
  • postpost_id, title, text, url, subreddit, author, score, upvote_ratio, num_comments, created_at, is_nsfw, is_video, thumbnail, media.
  • post/commentscomments[] (comment_id, text, author, score, created_at, reply_cursor), next_cursor.
  • post/comments/repliesreplies[] (same item shape as a comment), next_cursor.
  • subredditid, name, title, description, subscribers, type, is_nsfw, icon, banner, created_at, primary_color.
  • subreddit/postsposts[] (post_id, title, url, subreddit, author, score, num_comments, created_at, is_nsfw), next_cursor.
  • userid, name, is_employee, is_verified, account_type, is_accepting_pms.
  • user/postsposts[] (same item shape as a feed post), next_cursor.
  • user/commentscomments[] (comment_id, text, author, post{id,title}, score, created_at), next_cursor.
  • popularposts[] (post_id, title, subreddit, author, score, num_comments, url, created_at), next_cursor.
  • trendingtrending[] (query, raw_query).
{
  "data": {
    "results": [
      {
        "post_id": "t3_1v6ngaf",
        "title": "Best SerpAPI alternative for an agent pipeline in 2026?",
        "url": "https://www.reddit.com/r/webscraping/comments/1v6ngaf/best_serpapi_alternative/",
        "text": "We outgrew our current provider and need something cheaper...",
        "subreddit": "webscraping",
        "author": "data_plumber",
        "score": 128,
        "num_comments": 43,
        "created_at": "2026-05-11T14:22:07+0000",
        "is_nsfw": false
      }
    ],
    "next_cursor": "eyJjYW5kaWRhdGVzX3JldH..."
  },
  "credits_used": 1,
  "credits_remaining": 999
}

Guardrails

  • Every Reddit endpoint costs 1 credit (this changed from 2 in an earlier version — all Reddit calls are now 1 credit each).
  • Never fabricate post titles, authors, scores, or comment content. Only return API data.
  • Requests take 5-15 seconds. If the user's UX is time-sensitive, recommend async or streaming patterns.
  • Do not filter out NSFW posts silently — surface the is_nsfw flag so the user can decide.
  • When summarizing comment threads, preserve the author attribution.
  • To expand a comment thread, the replies endpoint needs both the post_id and that comment's reply_cursor (passed as cursor).

Failure handling

  • 400 means an invalid or missing parameter (e.g. no post_id/url) — fix and retry.
  • 401 means the API key is invalid or missing. Check SCAVIO_API_KEY.
  • 429 means rate or usage limit exceeded. Wait before retrying. See https://scavio.dev/docs/rate-limits.
  • 502 / 503 mean upstream is temporarily unavailable. Wait a few seconds before retrying.
  • If search returns no results, suggest different keywords.
  • If SCAVIO_API_KEY is not set, prompt the user to export it before continuing.

LangChain

pip install langchain-scavio
from langchain_scavio import ScavioSearchTool
tool = ScavioSearchTool(engine="reddit")

相关技能

Extracts Reddit posts from keyword search, subreddit browsing, or direct Reddit URLs. Input: search query, subreddit name, or direct reddit.com URL with sort (relevance/hot/top/new/comments), timeframe (hour/day/week/month/year/all), limit, pagination cursor, optional date range, NSFW flag, and stri

将 Reddit 讨论转化为有来源的洞察 · Reddit insight

1 次安装

Discover B2B leads from Reddit using AI-powered lead scoring via reddapi.dev Leads API.

Reddit (reddit.com). Use this skill for ANY Reddit request — reading, creating, updating, and deleting data. Whenever a task involves Reddit, use this skill instead of calling the API directly.