Posts of a subreddit
crawl4ai.reddit.subreddit.postsThe posts of one subreddit: title, the post's page, what it links to, score, comment count, author, time, flair and the first 300 characters of the text. `sort` is hot, new, top or rising; `t` the window for top; `limit` up to 250 (100 posts per page). `session` (your `reddit_session` cookie, from the Crawl4AI Session extension, used for this run only, never stored) is optional. Without `session` it reads Reddit's public JSON as a visitor (a few seconds; Reddit refuses some of our addresses); when Reddit refuses, a slower second source answers (about 2 to 3 minutes, no outside link). Columns: title, url, link, score, comments, author, created, flair, subreddit, id, text.
- Price
- $0.0009/successAu prix du fournisseur
- Success rate
- 56,2 %Last 30 days · 689 calls
- Latency p50
- 1.1 sp95 158 s
- Last verified
- 11 oct. 2026Verified working
POSThttps://toolswitch.dev/v1/tools/crawl4ai.reddit.subreddit.postsPreview- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
Cet outil n’a pas de paramètres. Voir la doc du fournisseur ↗ Provider docs
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
curl -X POST 'https://toolswitch.dev/v1/tools/crawl4ai.reddit.subreddit.posts' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"subreddit":"rust"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/crawl4ai.reddit.subreddit.posts",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"subreddit\":\"rust\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/crawl4ai.reddit.subreddit.posts", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"subreddit\":\"rust\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Cette API de passerelle est en préversion ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à $0.0009/success, frais de service inclus.