Skip to main content

Official Python SDK for StripFeed - convert any URL to clean Markdown

Project description

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
)

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")

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 string
  • sf.batch(urls, model=None) - Fetch up to 10 URLs in parallel (Pro plan)

Requirements

  • Python 3.9+
  • No external dependencies

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stripfeed-1.0.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stripfeed-1.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file stripfeed-1.0.1.tar.gz.

File metadata

  • Download URL: stripfeed-1.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for stripfeed-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2a9ad7cf46b870eed3810d20f8beb515c8c17c0197075720592248765734c23e
MD5 19b2b6f34ad68b40b1c3f46f242d0d9d
BLAKE2b-256 043aba2fb6e196ddc4a7194c9b19b818cd0f0519e26405ba760a54f85b5385ad

See more details on using hashes here.

File details

Details for the file stripfeed-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: stripfeed-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for stripfeed-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2657c95966b307b84f144600ffb3a9eef71133da80a6435ee74aeadd207bd0d
MD5 d8b306cda9fa0da0b98f9c683a388c76
BLAKE2b-256 f398d8b8045ba2d7e7ca42f7a7d26ed1ad3e4df97054fee8000b9798e255e46d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page