Turn any AI web-chat provider into a tool-capable streaming API
Project description
ia-web-parser
Turn any AI web-chat into a tool-capable streaming API. Harvest your existing browser session once. Chat, call tools, parse responses — without an API key.
What it does
Most AI providers charge for API access while their web UIs are free with a subscription you already have.
ia-web-parser bridges that gap. It:
- Harvests your authenticated session via Playwright (you log in once in a real Chrome window).
- Streams chat responses back to your code with the same Bearer/cookie auth the browser uses.
- Injects tool manifests into the prompt and parses
<tool_call>blocks out of the model output, giving you the same tool-calling loop a native API would — but for providers that don't expose one publicly.
Built originally for Falcon (pip install falcon-agent) — the multi-provider AI CLI that pioneered tool-capable web providers — and now extracted as a standalone library so any Python project can use it.
Supported providers
| Provider | Module | Endpoint |
|---|---|---|
| Claude | claude-web |
claude.ai |
| Kimi | kimi-web |
kimi.com |
| Gemini | gemini-web |
gemini.google.com |
| DeepSeek | deepseek-web |
chat.deepseek.com |
| Qwen | qwen-web |
chat.qwen.ai |
Install
pip install ia-web-parser[harvester]
playwright install chromium
The [harvester] extra pulls Playwright (only needed for the one-time login step).
For pure chat usage after harvesting, pip install ia-web-parser is enough.
Quick start
1. Harvest auth (run once per provider)
from ia_web_parser import SessionManager, ClaudeHarvester
sm = SessionManager()
ClaudeHarvester(sm).harvest()
# → opens a real Chrome window. Log in. Cookies + Bearer get stashed
# to ~/.ia-web-parser/claude.json
2. Chat with tools
from ia_web_parser import ClaudeWebProvider, SessionManager
sm = SessionManager()
provider = ClaudeWebProvider(session_manager=sm)
tools = [{
"name": "Read",
"description": "Read a file from disk",
"parameters": {
"type": "object",
"properties": {"file_path": {"type": "string"}},
"required": ["file_path"],
},
}]
for chunk in provider.chat(
messages=[{"role": "user", "content": "Read /etc/hosts and summarize"}],
tool_schemas=tools,
):
if hasattr(chunk, "text"):
print(chunk.text, end="", flush=True)
elif hasattr(chunk, "tool_calls"):
for call in chunk.tool_calls:
print(f"\n→ tool call: {call.name}({call.arguments})")
That's it. Same shape works for all five providers — swap ClaudeWebProvider for KimiWebProvider, GeminiWebProvider, etc.
Architecture
ia_web_parser/
├── core/ # WebToolParser, history consolidation, manifest formatting
├── harvester/ # Playwright auth harvesters (one persistent profile per provider)
├── providers/ # Streaming chat clients
└── session.py # Cookie + auth file + state management
Auth lives in ~/.ia-web-parser/.
Persistent Chrome profiles live in ~/.ia-web-parser/profiles/<provider>/.
Log in once. Re-runs reuse the same profile — never re-authenticate.
Want the full agent experience?
ia-web-parser is the library. If you want the whole CLI — REPL, slash commands, sub-agents, MemPalace, voice, TTS, Mesa Redonda, 27 built-in tools, MCP, plugins — that's Falcon:
pip install falcon-agent
falcon
Falcon ships ia-web-parser integrated, plus 11 cloud APIs (Anthropic, OpenAI, Gemini, NVIDIA's free 14-model tier, Ollama, custom endpoints) and the full agentic loop.
Why this exists
Web subscriptions you already pay for ($20/mo Claude Pro, $20/mo Gemini Advanced, etc.) give you flagship-model access. APIs charge again per token. ia-web-parser lets your scripts use what you've already paid for — programmatically, with tool calls, streaming, and persistent sessions.
It's the same trick youtube-dl pulled with video sites: meet the user where their auth already is.
License
MIT. Fork it, ship it, build whatever.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ia_web_parser-0.1.0.tar.gz.
File metadata
- Download URL: ia_web_parser-0.1.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d85cd175b2938c9b12c28bd6e087e9635235c096b64604c569b72d6a43fc0455
|
|
| MD5 |
e0f749e3f7187ac53a5c8e5c7d7ce2a8
|
|
| BLAKE2b-256 |
47c74257037178d80c41cd324f4fc7c420afbc4773ad1f8d2623836715baeb93
|
File details
Details for the file ia_web_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ia_web_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa1bd3a53293a560affa56827b9a32f0c353113a4959062ab9fe24e17ac8aaa
|
|
| MD5 |
b3dd4e354ec1d3bfaf55f9bd1aa40af3
|
|
| BLAKE2b-256 |
eb9fad4cf4d757e817ead6ed330a027337ec36364a1dcc1bfcf8e4fb41e532fb
|