curl --request GET \
--url https://api.example.com/api/reddit/public{
"*": "<any>",
"error": "<string>",
"details": "<string>"
}Server-side proxy for unauthenticated Reddit JSON endpoints with URL allowlist
curl --request GET \
--url https://api.example.com/api/reddit/public{
"*": "<any>",
"error": "<string>",
"details": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MatthewSabia1/SubPirate-Pro/llms.txt
Use this file to discover all available pages before exploring further.
/r/subreddit/about.json). For authenticated endpoints, use the campaign system which handles OAuth tokens./r/{subreddit}/about.json - Subreddit metadata/r/{subreddit}/about/rules.json - Subreddit rules/r/{subreddit}/{hot|new|top}.json - Subreddit posts/r/{subreddit}/comments/{id}.json - Post comments/r/{subreddit}/about/moderators.json - Moderator list/user/{username}/about.json - User profile/user/{username}/submitted.json - User submissions/user/{username}/submitted/{new|top}.json - Sorted submissions/user/{username}/overview.json - User overview/user/{username}/comments.json - User comments/subreddits/search.json - Search subreddits/api/search_reddit_names.json - Search by namehttps://reddit.com or www.reddit.com400 Invalid or disallowed Reddit URL| Status | Error | Description |
|---|---|---|
| 400 | Invalid or disallowed Reddit URL | URL doesn’t match allowlist patterns |
| 405 | Method not allowed | Only GET requests supported |
| 502 | Reddit request failed (status) | Reddit API returned error (includes upstream status) |
| 502 | Reddit returned invalid JSON | Response body was not valid JSON |
| 502 | Failed to contact Reddit | Network error or timeout |
curl "https://api.subpirateapp.com/api/reddit/public?url=https://www.reddit.com/r/typescript/about.json"
{
"kind": "t5",
"data": {
"display_name": "typescript",
"title": "TypeScript",
"public_description": "TypeScript is a language for application-scale JavaScript development",
"subscribers": 123456,
"created_utc": 1234567890.0,
"over18": false
}
}
curl "https://api.subpirateapp.com/api/reddit/public?url=https://www.reddit.com/r/typescript/about/rules.json"
{
"rules": [
{
"kind": "all",
"short_name": "Be respectful",
"description": "Treat others with respect",
"violation_reason": "Rule 1: Be respectful",
"priority": 0
}
]
}
curl "https://api.subpirateapp.com/api/reddit/public?url=https://www.reddit.com/user/spez/about.json"
curl "https://api.subpirateapp.com/api/reddit/public?url=https://www.reddit.com/r/programming/top.json?t=week&limit=25"
?t=week&limit=25) are preserved and passed through to Reddit.curl "https://api.subpirateapp.com/api/reddit/public?url=https://www.reddit.com/subreddits/search.json?q=javascript&limit=10"
User-Agent: web:SubPirate:1.0.0 (by /u/unknown)
REDDIT_USER_AGENT environment variable.
redditFetch() helper:
REDDIT_CLIENT_ID and REDDIT_CLIENT_SECRETapi/_lib/redditAppAuth.js for implementation.
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-ResetCORS_ORIGINS environment variablehttp://localhost:5173,http://127.0.0.1:5173 in development403 Origin not allowed for unauthorized originsreddit.com, www.reddit.com only)/api/submit, /api/vote, etc.)