This release is a pre-release and may not be stable for production use.
[!WARNING] Yosoi is currently in Alpha. The API is expected to change significantly. We do not expect a stable API until we are out of Beta.
Yosoi - You Only Scrape Once (iteratively)
Discover once, scrape forever
[!WARNING] Yosoi is research tooling for API design and web reverse engineering. You assume all legal risk for how you use it. Respect
robots.txt, rate limits, and IP bans; and please don't bypass them with Tor or a VPN. Read DISCLAIMER.md before pointing it at anything.
Give Yosoi a URL, domain, or group of URLs, and it uses AI to automatically discover the best selectors for structured content.
Installation
# Install yosoi using uv
uv add yosoi
Browser Fetcher (JavaScript-heavy pages)
Yosoi uses VoidCrawl, its Rust-native Chrome DevTools Protocol backend, for rendered headless, headful, and waterfall acquisition. The pinned VoidCrawl wheel is installed with Yosoi; building from source is optional.
from yosoi.core.fetcher import create_fetcher
async def fetch_rendered():
fetcher = create_fetcher('headless', no_sandbox=True)
async with fetcher:
result = await fetcher.fetch('https://example.com')
print(result.html)
For direct VoidCrawl usage, use its current pool API:
from voidcrawl import BrowserPool, PoolConfig
async def fetch_directly():
async with BrowserPool(PoolConfig()) as pool:
async with pool.acquire() as tab:
response = await tab.goto('https://example.com', capture_endpoints=True)
print(response.html, response.endpoints)
See docs/voidcrawl.md, the official VoidCrawl documentation, and docs/fingerprinting-stack.md.
Deterministic extractor fields
Use fluent selector plans or ys.Extractor() callbacks for async, per-row scraper logic that consumes already-acquired evidence without an LLM:
import yosoi as ys
class Company(ys.Contract):
# Without a root, the full page is one row. Collection plans naturally return [].
name: str = ys.css('h1').text()
links: list[str] = ys.css('a[href]').attr('href')
records = await ys.extract(html, Company, url='https://example.com/')
The annotation supplies cardinality and remains the model value type. @ys.extraction(field) binds custom logic without static methods or naming conventions; @ys.extractions(...) executes one callback for several fields. Extractor fingerprints contain strategy/structure evidence, never extracted values. See docs/extractors.md and examples/extractor_fields.py.
Portable recipes
Recipes package a contract, verified selectors, optional A3Node browser actions, and validation evidence into deterministic JSON for review and replay:
uv run yosoi recipe mint --contract @Product --from-cache https://example.com/product/1 --out .yosoi/recipes/ --yes
uv run yosoi recipe validate .yosoi/recipes/product.recipe.json --url https://example.com/product/1 --write
uv run yosoi scrape https://example.com/product/2 --recipe .yosoi/recipes/product.recipe.json --recipe-id v1:sha256:...
Remote recipes are pin-required and trust-gated. See docs/recipes.md.
Agent workflows
Install Yosoi fetch/search/crawl/research skills into supported coding agents:
uvx yosoi agents install --target pi
uvx yosoi agents install --target agents
See docs/agent-workflows.md. For direct, bounded multi-URL page acquisition, see docs/fetch.md.
Quick Start
API Key
Export your API Key or create a .env file
# Set keys for whichever providers you want to use
<PROVIDER_NAME>_KEY=your_api_key_here
GROQ_API_KEY=your_groq_key_here # groq/...
GEMINI_API_KEY=your_gemini_api_key_here # gemini/...
OPENAI_API_KEY=your_openai_api_key_here # openai/...
CEREBRAS_API_KEY=your_cerebras_api_key_here # cerebras/...
OPENROUTER_API_KEY=your_openrouter_key_here # openrouter/...
See the full list of supported providers
Basic Usage
CLI Usage
# Specify model explicitly with -m provider:model-name
uv run yosoi -m groq:llama-3.3-70b-versatile --url https://qscrape.dev/l1/eshop/catalog/?cat=Forge%20%26%20Smithing --contract Product
You can then find your scraped content, selectors and logs in ./.yosoi relative to the directory you run the CLI command from.
Python Usage
We also have example scripts, you can find them in our example docs
Citation
If you use yosoi in your research or projects, please cite it using the metadata provided in the CITATION.cff file.
Community
- Responsible use: see DISCLAIMER.md
Contact
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 yosoi-0.0.3a23.tar.gz.
File metadata
- Download URL: yosoi-0.0.3a23.tar.gz
- Upload date:
- Size: 503.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51caa8f013eb18b41ddf6310c88d477fb2416417b0be3334e1266a2748c9a6c8
|
|
| MD5 |
4b259b2431e03cf2b58b59c5777d77dc
|
|
| BLAKE2b-256 |
689acdb97ba53f6be0e5535380ee4f1e35ae4553d1a57fa04a566d644837a86a
|
Provenance
The following attestation bundles were made for yosoi-0.0.3a23.tar.gz:
Publisher:
publish.yaml on CascadingLabs/Yosoi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yosoi-0.0.3a23.tar.gz -
Subject digest:
51caa8f013eb18b41ddf6310c88d477fb2416417b0be3334e1266a2748c9a6c8 - Sigstore transparency entry: 2207961660
- Sigstore integration time:
-
Permalink:
CascadingLabs/Yosoi@ef15b68b04045842c36b5f026866463ed38eb062 -
Branch / Tag:
refs/tags/v0.0.3a23 - Owner: https://github.com/CascadingLabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@ef15b68b04045842c36b5f026866463ed38eb062 -
Trigger Event:
release
-
Statement type:
File details
Details for the file yosoi-0.0.3a23-py3-none-any.whl.
File metadata
- Download URL: yosoi-0.0.3a23-py3-none-any.whl
- Upload date:
- Size: 597.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a37c62b2f3d21ad67b6a16ad9f8d2311f9c93bc1b49ba3644e329e4f6e263c06
|
|
| MD5 |
94b2077e35b9700b423edba32b06eb88
|
|
| BLAKE2b-256 |
f9b4ee427804d93a81d1913fc2bc6ac747dac5833e56bca59967749307048a5f
|
Provenance
The following attestation bundles were made for yosoi-0.0.3a23-py3-none-any.whl:
Publisher:
publish.yaml on CascadingLabs/Yosoi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yosoi-0.0.3a23-py3-none-any.whl -
Subject digest:
a37c62b2f3d21ad67b6a16ad9f8d2311f9c93bc1b49ba3644e329e4f6e263c06 - Sigstore transparency entry: 2207961972
- Sigstore integration time:
-
Permalink:
CascadingLabs/Yosoi@ef15b68b04045842c36b5f026866463ed38eb062 -
Branch / Tag:
refs/tags/v0.0.3a23 - Owner: https://github.com/CascadingLabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@ef15b68b04045842c36b5f026866463ed38eb062 -
Trigger Event:
release
-
Statement type: