StripFeed Python SDK
Official Python SDK for StripFeed - convert any URL to clean, token-efficient Markdown for AI agents, RAG pipelines, and LLM workflows.
Install
pip install stripfeed
Quick Start
from stripfeed import StripFeed
sf = StripFeed("sf_live_your_api_key")
# Full result with metadata
result = sf.fetch("https://news.ycombinator.com")
print(result["markdown"])
print(f"Tokens: {result['tokens']} (saved {result['savingsPercent']}%)")
# Just the Markdown string
md = sf.fetch_markdown("https://news.ycombinator.com")
With Options
result = sf.fetch(
"https://example.com",
selector="article", # CSS selector (Pro)
format="json", # json, text, html (Pro)
model="claude-sonnet-4-6", # cost tracking
cache=False, # bypass cache
ttl=7200, # custom cache TTL
max_tokens=5000, # truncate to token budget
)
Batch (Pro plan)
result = sf.batch(
[
"https://example.com",
{"url": "https://docs.anthropic.com", "selector": "article"},
],
model="claude-sonnet-4-6",
)
for item in result["results"]:
print(f"{item['url']}: {item['tokens']} tokens")
Check Usage
usage = sf.usage()
print(f"Plan: {usage['plan']}")
print(f"Used: {usage['usage']} / {usage['limit']}")
print(f"Remaining: {usage['remaining']}")
Error Handling
from stripfeed import StripFeed, StripFeedError
try:
result = sf.fetch("https://example.com")
except StripFeedError as e:
print(f"API error {e.status}: {e}")
Configuration
sf = StripFeed(
"sf_live_your_api_key",
base_url="https://custom.api/v1", # optional
timeout=10, # optional, default 30s
)
Methods
sf.fetch(url, **options)- Fetch URL, return full result dict (markdown, tokens, metadata)sf.fetch_markdown(url, **options)- Fetch URL, return only Markdown stringsf.batch(urls, model=None)- Fetch up to 10 URLs in parallel (Pro plan)sf.usage()- Check current monthly API usage and plan limits
Requirements
- Python 3.9+
- No external dependencies
Links
Metadata
Release files for stripfeed 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| stripfeed-1.1.0.tar.gz | 7.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stripfeed-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / stripfeed-1.1.0.tar.gz
| Download URL | stripfeed-1.1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24aef01bfd686011908d5ff651b7413ccbd13b37af630dac344ac226c26e66fd
|
|
BLAKE2b-256 checksum How to use checksums |
31662b0b2dc1af9435425b6aed6a385b7c4d6b6feac6c6c164d84ee4fa631753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / stripfeed-1.1.0-py3-none-any.whl
| Download URL | stripfeed-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5e377416fef7e31288000e3c17628e1d6218489b2305a601e5422002d75b44d
|
|
BLAKE2b-256 checksum How to use checksums |
af514891adbe3f500771e3a89734e2553e3c461ef395f134cbc21d4d3cf40120
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for stripfeed 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.