gainflow
Official Python SDK (sync & async) for Gainflow - hard-to-get web data for builders and AI agents.
- Docs: https://docs.gainflow.ai
- Hosted MCP Server:
https://mcp.gainflow.ai/mcp - Agent Skill:
npx skills add https://gainflow.ai
Install
pip install gainflow
# or
uv add gainflow
Quickstart (Sync)
Set GAINFLOW_API_KEY in your environment (or pass api_key=... explicitly):
export GAINFLOW_API_KEY="gf_live_..."
from gainflow import GainflowClient
with GainflowClient() as gf:
page = gf.scrape(
"https://news.ycombinator.com",
formats=["markdown"],
parse={"titles": ".titleline > a"},
extract={
"prompt": "Extract the top 3 story titles",
"schema": {
"type": "object",
"properties": {"top_stories": {"type": "array", "items": {"type": "string"}}},
"required": ["top_stories"],
},
},
)
print(page["data"]["extracted"])
Async Client
import asyncio
from gainflow import AsyncGainflowClient
async def main() -> None:
async with AsyncGainflowClient() as gf:
page = await gf.scrape("https://example.com", render_js=True)
print(page["data"]["markdown"])
asyncio.run(main())
Features
- Scraping & PDF OCR:
gf.scrape(url, formats=..., parse=..., extract=..., render_js=..., actions=..., ocr=..., country=..., max_age_sec=..., zdr=...) - Site Mapping & Crawling:
gf.map(url, search=..., limit=...),gf.crawls.create(url=..., max_pages=..., max_depth=...) - Async Batches:
gf.batches.create(urls=...),gf.batches.get(batch_id),gf.batches.cancel(batch_id) - Monitors & Webhooks:
gf.monitors.create(...),gf.webhooks.create(url=..., events=...) - Local Businesses:
gf.businesses.search(...),gf.businesses.enrich(business_id) - Account & Billing:
gf.account.balance(),gf.account.usage(),gf.account.create_api_key(name=...),gf.billing.checkout(...) - Low-level Escape Hatch:
gf.request("POST", "/v1/...", json=...)with automatic auth and retries on408/429/502/503/504.
License
MIT
Metadata
Release files for gainflow 0.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 | Actions |
|---|---|---|---|---|
| gainflow-0.1.0.tar.gz | 19.9 kB | With provenance | Details for gainflow-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gainflow-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for gainflow-0.1.0-py3-none-any.whl |
Total release size: 28.4 kB
Release files / gainflow-0.1.0.tar.gz
| Download URL | gainflow-0.1.0.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84e7f453706bb1222415f62df9501b6cba3979616eb3f33ea297fd5f86472825
|
|
BLAKE2b-256 checksum How to use checksums |
0f3c1bb41e157d7e248c9e74f7b78af959b970f2ed4eb08034e769512632115d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / gainflow-0.1.0-py3-none-any.whl
| Download URL | gainflow-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3096e03b7fa164fb6650608e2ad344a5a0cde5bc03f67b6ea5b8fb7c45ffe15
|
|
BLAKE2b-256 checksum How to use checksums |
e082e9bc79b23f936962f364f4b89b920c60dca45506b1db4488b9276b79e433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for gainflow 0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gainflow-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.