Reddit Search
Search Reddit link posts through Reddit's public search.json endpoint using the local Frevana Chrome Extension session.
Purpose
This skill is for finding Reddit link posts by search query.
Inputs:
q(required) - search querysort(optional) -newortop, defaults tonewlimit(optional) - result count, defaults to25, max100after(optional) - pagination token from the previous response
Output:
- validated response JSON from Reddit Search
This skill validates that the response is JSON and returns it unchanged. Do not rewrite or reshape the returned data unless the user explicitly asks for a transformation.
What This Skill Needs
- user-provided
qor equivalent Reddit search query - optional
sort - optional
limit - optional
after - bundled
scripts/setup.shwrapper, which downloads and runs the latest official Frevana setup script - Frevana local daemon running after setup, default port
12306 - Chrome connected through the Frevana Chrome Extension
curlbashpython3
This is a Chrome Extension skill. It uses the local daemon and Chrome Extension session, which lets Reddit set and reuse browser cookies without asking the user to pass cookies manually.
Execution Order
Use this flow so the request stays simple and reliable:
- Confirm the user has provided
qor an equivalent Reddit search query. - Default
sorttonewwhen the user does not provide it. - Default
limitto25when the user does not provide it. - Validate
sortis eithernewortop. - Validate
limitis an integer from1to100. - Prefer the script over ad hoc
curlor raw HTTP requests. - Let the script run bundled
scripts/setup.shbefore every Frevana tool call. - If setup reports Chrome disconnected, stop and tell the user to open Chrome, connect the Frevana extension, and retry.
- The script first calls
frevana_scrapeonhttps://www.reddit.com/to warm up the browser/extension session, then callsfrevana_scrapeon thesearch.jsonURL. - The script extracts and validates JSON from the scrape result.
- Return the validated response JSON, or summarize the most relevant posts if the user does not need the full payload.
- When useful, also save the JSON to a file.
Commands
Basic Reddit search
bash <skill-path>/scripts/search_reddit.sh \
--q "openai"
--query is accepted as an alias for --q.
Sort by top posts
bash <skill-path>/scripts/search_reddit.sh \
--q "openai" \
--sort top
Change result count
bash <skill-path>/scripts/search_reddit.sh \
--q "openai" \
--limit 100
Continue with an after pagination token
bash <skill-path>/scripts/search_reddit.sh \
--q "openai" \
--sort new \
--limit 25 \
--after "t3_example"
Use --after with the data.after value from the previous Reddit Search response.
Save response JSON to a file
bash <skill-path>/scripts/search_reddit.sh \
--q "openai" \
--sort new \
--output ./out/reddit-search-result.json
Fixed Scrape Shape
The script first warms the browser session with:
{
"url": "https://www.reddit.com/",
"provider": "url"
}
Then it scrapes the Reddit Search JSON URL:
https://www.reddit.com/search.json?q=openai&type=link&sort=new&limit=25
using:
{
"url": "https://www.reddit.com/search.json?q=openai&type=link&sort=new&limit=25",
"provider": "url"
}
The type parameter is always fixed to link. The script omits after unless the user provides it.
Do not invent unsupported Reddit Search fields. This skill supports only q, fixed type=link, sort, limit, and after.
Response Shape
The API returns JSON. Pagination uses the top-level data.after field:
{
"kind": "Listing",
"data": {
"after": "t3_example",
"children": [
{
"kind": "t3",
"data": {
"title": "Example post",
"permalink": "/r/example/comments/...",
"url": "https://example.com"
}
}
]
}
}
This skill validates the response as JSON and returns it unchanged.
Output
- Success: the script validates that the response body is JSON and prints it to stdout
- With
--output: the same JSON is also written to the specified file path - Failure: the script prints the response body or parsing error and exits non-zero
Notes
- Require
--qor--query typeis fixed tolinksortsupports onlynewandtop; default isnewlimitdefaults to25and must be between1and100- Use
--afteronly when continuing from a previous response'sdata.after - The script runs bundled
scripts/setup.shbefore every search, matching the original Frevana skill flow. - The script uses
frevana_scraperather than directcurlto Reddit. - The user must have Chrome open and the Frevana Chrome Extension connected.
- If the scrape returns a Reddit block page or empty content, open
https://www.reddit.com/in Chrome through the connected profile and retry. - If
curlis missing, stop and tell the user to installcurl - If
python3is missing, stop and tell the user to installpython3 - Summarize the posts the user actually cares about instead of dumping raw JSON unless they ask for the full payload
Example Prompts
中文
- "搜索 Reddit 上 openai 的最新 link 帖子"
- "查 Reddit q=openai,sort=top,limit=100"
- "用上一次返回的 after 继续翻页查 Reddit"
English
- "Search Reddit link posts for openai"
- "Get top Reddit results for openai with limit 100"
- "Continue the Reddit search with this after token"