SDKs & Tools
Official client libraries, CLI, and MCP server for the Sylvia API.
Every SDK and tool below talks to the same REST API and needs only an API key
(X-API-KEY header). Get a key at sylvia-api.com — the free
tier includes 480 req/min and $0.50 of starting credit.
Python SDK
The fastest way into Reddit data from scripts, notebooks, and pipelines. No OAuth, no browser automation — just an API key.
pip install sylvia-api
from sylvia import Sylvia
sylvia = Sylvia(api_key="syl_...")
# Subreddit info
sub = sylvia.subreddit("python")
print(f"r/{{sub['name']}}: {{sub['members']:,}} members")
# Top posts
for post in sylvia.subreddit_posts("programming", sort="hot", limit=5):
print(f"{{post['score']}} — {{post['title']}}")
# User profile
spez = sylvia.user("spez")
# Global search (not available in Reddit's own API)
for post in sylvia.search("llama 4 model", limit=10):
print(f"r/{{post['subreddit']}} — {{post['title']}}")
# Live comment firehose
for comment in sylvia.live_comments(limit=10):
print(f"u/{{comment['author']}}: {{comment['body'][:100]}}")
# Full thread with all nested comments expanded
thread = sylvia.thread("1tlh5aj")
Python methods
| Method | What it does |
|---|---|
subreddit(name) | Subreddit metadata — members, description, icon |
subreddit_posts(sub, sort, limit) | Post listings — hot, new, top, rising, controversial |
user(username) | User profile + karma |
search(query, limit) | Global keyword search across all of Reddit |
live_comments(limit) | Real-time comment stream |
thread(post_id) | Full post with every nested comment resolved |
CLI (Rust)
A fast command-line client for scripts, CI, and quick lookups.
# From crates.io
cargo install sylvia-api-cli
# Or from the AUR (Arch Linux)
yay -S sylvia
sylvia config set api_key syl_your_key_here
sylvia subreddit about haskell
sylvia subreddit posts rust top --limit 5
sylvia user about spez
sylvia thread abc123
sylvia search "llama 4 model"
Commands
| Command | Description |
|---|---|
sylvia subreddit | Subreddit endpoints (about, posts, rules) |
sylvia user | User endpoints (about, comments, submitted) |
sylvia submission / comment | Fetch a single post or comment |
sylvia thread | Full thread with resolved comments |
sylvia live | Real-time comment streams |
sylvia search | Global search |
sylvia keys | Manage API keys |
sylvia account | Account info & balance |
Global options
| Flag | Description |
|---|---|
-k, --api-key KEY | API key override |
-F, --format FMT | Response format: reddit, minimal, ndjson, csv |
-o, --output FILE | Write output to a file |
MCP Server
For AI agents. Point any MCP-compatible agent (Claude, Cursor, Windsurf, Copilot, …) at the hosted endpoint — no install, no local process.
{{
"mcpServers": {{
"sylvia": {{
"url": "https://api.sylvia-api.com/mcp",
"headers": {{ "X-API-KEY": "syl_your_key" }}
}}
}}
}}
The server exposes 26 Reddit tools — subreddit listings, search, threads, user history, live streams, and more. Full reference: docs.
REST API
No SDK needed — any HTTP client works.
curl -H "X-API-KEY: syl_..." \
"{API}/v1/reddit/r/all/hot?limit=25"
Base URL: {API}/v1/reddit. Every request carries the X-API-KEY
header and returns clean JSON. See the OpenAPI spec for
every endpoint, parameter, and response shape.