Skip to main content

Python client for anybrowse.dev — URL to Markdown scraping API

Project description

anybrowse

Turn any URL into LLM-ready Markdown. Python SDK for anybrowse.dev.

Handles JavaScript, dynamic pages, paywalls, and anti-bot measures — so your agents don't have to.


Install

pip install anybrowse

With LangChain support:

pip install anybrowse[langchain]

With LlamaIndex support:

pip install anybrowse[llamaindex]

Everything:

pip install anybrowse[all]

Quick Start

from anybrowse import AnybrowseClient

client = AnybrowseClient()  # uses free tier
# or: client = AnybrowseClient(api_key="your-key")

result = client.scrape("https://techcrunch.com")
print(result.markdown)

results = client.search("web scraping API 2025")
for r in results:
    print(r.title, r.url)

Client Usage

from anybrowse import AnybrowseClient

client = AnybrowseClient(api_key="your-api-key")  # optional for free tier

# Scrape a page → clean Markdown
page = client.scrape("https://news.ycombinator.com")
print(page.markdown)

# Scrape with context (better extraction)
page = client.scrape(
    "https://stripe.com/pricing",
    context="Extract all pricing tiers and their features"
)

# Crawl a site (multiple pages)
pages = client.crawl("https://docs.example.com", limit=20)

# Web search → Markdown results
results = client.search("best Python web scraping libraries 2024", count=5)
for r in results:
    print(r.title, r.url)

Convenience Functions

import anybrowse

# No client needed
result = anybrowse.scrape("https://example.com")
print(result.markdown)

results = anybrowse.search("AI news today", count=5)

LangChain Integration

from anybrowse.langchain import AnybrowseScrape, AnybrowseSearch, get_tools
from langchain.agents import initialize_agent, AgentType
from langchain.chat_models import ChatOpenAI

llm = ChatOpenAI(model="gpt-4")
tools = get_tools(api_key="your-api-key")

agent = initialize_agent(tools, llm, agent=AgentType.OPENAI_FUNCTIONS)
agent.run("Research the latest news on AI agents and summarize the top 3 stories")

LlamaIndex Integration

from anybrowse.llamaindex import AnybrowseReader

reader = AnybrowseReader(api_key="your-api-key")
docs = reader.load_data([
    "https://docs.python.org/3/library/asyncio.html",
    "https://fastapi.tiangolo.com/tutorial/",
])

from llama_index.core import VectorStoreIndex
index = VectorStoreIndex.from_documents(docs)
query_engine = index.as_query_engine()
response = query_engine.query("How do I use async with FastAPI?")

MCP (Model Context Protocol)

Use anybrowse directly in Claude Desktop:

{
  "mcpServers": {
    "anybrowse": {
      "command": "npx",
      "args": ["-y", "anybrowse-mcp"],
      "env": {
        "ANYBROWSE_API_KEY": "your-api-key"
      }
    }
  }
}

Full MCP setup guide


Free Tier

You get 10 free scrapes per day. To upgrade to 50 per day, enter your email:

from anybrowse import upgrade_free_tier
upgrade_free_tier("you@example.com")
# You now have 50 free scrapes per day

Or with curl:

curl -X POST https://anybrowse.dev/upgrade-free \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com"}'

Need more? → anybrowse.dev/pricing


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

anybrowse-1.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

anybrowse-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anybrowse-1.0.1.tar.gz
Algorithm Hash digest
SHA256 40e5fe4752d77032947db8cf4ff32dbb8ef3dd13ab4293b1fda1cd7e1d8c1761
MD5 7827ad8f021c190de49488fa5f9ffff1
BLAKE2b-256 ce38ed25498635b2c8fb788a8408ad18e9ed7cdb86272fee762e6e65dc1f4535

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for anybrowse-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f80e0915a2e0a8baee6a09abbd453164ab7d7c2a0143b4fc068e6fd61e0fa65
MD5 bd715cb31ed528a41514f5ee54608447
BLAKE2b-256 08ece95cf55170ea905e28d653efbdf76f1e4930b2502f2ab3cdd4396d57de45

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