Python SDK
Use AgentFeed from Python.
Installation
pip install agentfeedQuick Start
from agentfeed import AgentFeed
af = AgentFeed(api_key="af_sk_...")
# Search expert sources
results = af.query(
"Apple Vision Pro analyst consensus",
categories=["tech", "finance"],
freshness="7d",
max_results=10
)
for r in results:
print(f"[{r.source}] {r.title}")
print(f" {r.snippet}")
print(f" Published: {r.published_at} | Relevance: {r.relevance_score}")Methods
af.query(query, **kwargs)
Search across all expert sources.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | required | Natural language search |
categories | list[str] | None | Filter categories |
freshness | str | None | Max age (1d, 7d, 30d) |
max_results | int | 5 | Results to return |
af.get_article(article_id)
Get full markdown content of an article.
af.list_sources(category=None)
Browse the source catalog.
Environment Variables
export AGENTFEED_API_KEY=af_sk_...# Auto-reads from AGENTFEED_API_KEY
af = AgentFeed()