← 返回
未分类 Key 中文

Scavio Reddit

Search Reddit posts or fetch a full post with threaded comments by URL. Use for discussion research, brand monitoring, sentiment analysis, or RAG pipelines n...
通过 URL 搜索 Reddit 帖子或获取完整帖子及嵌套评论。适用于讨论研究、品牌监测、情感分析或 RAG管道等。
scavio-ai scavio-ai 来源
未分类 clawhub v1.0.3 3 版本 100000 Key: 需要
★ 0
Stars
📥 406
下载
💾 0
安装
3
版本
#latest

概述

Reddit Search and Post Retrieval via Scavio

Search Reddit posts or retrieve a full post with its threaded comment tree. Returns structured JSON with subreddit, author, score, flair, awards, and media fields.

When to trigger

Use this skill when the user asks to:

  • Search Reddit for opinions, discussions, or community sentiment on a topic
  • Fetch the full text and comments of a Reddit post by URL
  • Research how developers or communities talk about a product, library, or issue
  • Build RAG pipelines that need community-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 (250 free credits/month, no card required):

export SCAVIO_API_KEY=sk_live_your_key

Workflow

  1. Finding discussions: call /reddit/search with a keyword query. Use sort: top for the most upvoted posts or sort: new for freshest results.
  2. Reading a post: if the user provides a Reddit URL, call /reddit/post to get the full body and comment tree.
  3. Pagination: pass nextCursor from the search response back as cursor to get the next page. Stop when nextCursor is null.
  4. Comment tree: comments are returned flat in traversal order. Use depth for indentation or parentId to reconstruct the tree. Top-level replies have parentId equal to the post id (t3_…); nested replies have parentId equal to a comment id (t1_…).

Endpoints

EndpointCreditsDescription
---------
POST https://api.scavio.dev/api/v1/reddit/search2Search Reddit posts by query, sort, and cursor
POST https://api.scavio.dev/api/v1/reddit/post2Get a full post with threaded comments by URL
Authorization: Bearer $SCAVIO_API_KEY

Search Parameters

ParameterTypeDefaultDescription
------------
querystringrequiredSearch query (1-500 chars)
sortstringrelevancerelevance, hot, top, new, comments
cursorstring--Pagination token from previous response's nextCursor

Post Detail Parameters

ParameterTypeDefaultDescription
------------
urlstringrequiredFull Reddit post URL

Examples

import os, requests

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

# Search Reddit
results = requests.post(f"{BASE}/api/v1/reddit/search", headers=HEADERS,
    json={"query": "FastAPI vs Django 2026", "sort": "top"}).json()

posts = results["data"]["posts"]
next_cursor = results["data"]["nextCursor"]  # pass as "cursor" for next page

# Fetch full post and comments
post_data = requests.post(f"{BASE}/api/v1/reddit/post", headers=HEADERS,
    json={"url": "https://www.reddit.com/r/Python/comments/1smb9du/fastapi_vs_django/"}).json()

post = post_data["data"]["post"]
comments = post_data["data"]["comments"]  # flat list, use depth/parentId for tree

Search Response

{
  "data": {
    "searchQuery": "FastAPI vs Django 2026",
    "totalResults": 14,
    "nextCursor": "eyJjYW5kaWRhdGVzX3JldH...",
    "posts": [
      {
        "position": 0,
        "id": "t3_1smb9du",
        "title": "FastAPI vs Django in 2026 -- what the teams are actually using",
        "url": "https://www.reddit.com/r/Python/comments/1smb9du/fastapi_vs_django/",
        "subreddit": "Python",
        "author": "python_dev",
        "timestamp": "2026-04-15T16:34:40.389000+0000",
        "nsfw": false
      }
    ]
  },
  "credits_used": 2,
  "credits_remaining": 498
}

Post Detail Response

{
  "data": {
    "post": {
      "id": "t3_1smb9du",
      "title": "FastAPI vs Django in 2026 -- what the teams are actually using",
      "body": "After a year of running both in production...",
      "url": "https://www.reddit.com/r/Python/comments/1smb9du/fastapi_vs_django/",
      "contentUrl": "https://www.reddit.com/r/Python/comments/1smb9du/fastapi_vs_django/",
      "subreddit": "Python",
      "author": "python_dev",
      "score": 842,
      "upvoteRatio": 0.97,
      "numComments": 214,
      "timestamp": "2026-04-15T16:34:40.389000+0000",
      "flair": "Discussion",
      "nsfw": false,
      "awards": []
    },
    "comments": [
      {
        "id": "t1_lxs9a0k",
        "author": "senior_py",
        "body": "We moved to FastAPI for the API surface and kept Django for admin...",
        "score": 312,
        "depth": 0,
        "timestamp": "2026-04-15T17:02:11.000000+0000",
        "parentId": "t3_1smb9du"
      }
    ]
  },
  "credits_used": 2,
  "credits_remaining": 496
}

url is the canonical Reddit permalink. contentUrl is the rendered URL — for link posts it will be the external article; for text/self posts it is the same as url; for image/video posts it is the media URL.

Guardrails

  • Each Reddit call costs 2 credits (not 1). Inform the user if they are paginating many results.
  • 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 nsfw flag so the user can decide.
  • When summarizing comment threads, preserve the author attribution.

Failure handling

  • 504 means Reddit timed out. Retry once with the same request.
  • 502 / 503 mean upstream is temporarily unavailable. Wait a few seconds before retrying.
  • If search returns no results, suggest different keywords or a different sort value.
  • 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")

版本历史

共 3 个版本

  • v1.0.3 当前
    2026-06-09 18:05
  • v1.0.2
    2026-05-21 13:42 安全 安全
  • v1.0.0
    2026-05-08 01:11 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

Scavio Google

scavio-ai
搜索 Google,返回结构化的 JSON(网页、新闻、图片、地图),适用于需要当前网页信息或最新新闻的查询。
★ 1 📥 544

Scavio Amazon

scavio-ai
搜索亚马逊商品并通过ASIN查询商品详情,返回结构化JSON,包含价格、评分、Prime状态和库存。支持12个亚马逊市场。
★ 2 📥 644

Scavio Youtube

scavio-ai
搜索YouTube并获取视频元数据。用于查找视频、查看播放量、频道信息或AI训练适用性。
★ 0 📥 542