The repository or configuration that created this release differ from a previous release. View details.
Stophy for Python
Web scraping API for AI agents, in Python. One API to search the web, read what people say, and look up products, places, jobs and homes. Pay only for answers. Every method and result is typed.
Install
pip install stophy
Try it without a key
from stophy import Stophy
result = Stophy().google.search(query="bun runtime")
print(result["data"]["results"])
Some searches and lookups work without a key, within a small free allowance. The endpoint list marks them with keyless: true. Every other method raises a StophyError with the code unauthorized.
Use an API key
Get a key from the dashboard. Keys start with st_. Set it as STOPHY_API_KEY, or pass it in:
stophy = Stophy(api_key="st_...")
videos = stophy.youtube.search(query="bun runtime")
print(videos["data"]["results"])
Methods follow the source and the command: stophy.google.maps.search(...), stophy.reddit.subreddit(...), stophy.meta.ads.search(...).
To point at one thing, send its link or its id, never both: stophy.youtube.video(video_url=...) or stophy.youtube.video(video_id=...). Methods that take a person send user_url or username.
Every response is a dict with success, data, creditsUsed, and requestId. data is one flat dict. Lists are in data["results"].
Arguments are keyword-only and snake_case.
For async code, use AsyncStophy. It has the same methods, and you await each call.
More data
A YouTube transcript, Reddit posts, Google Maps reviews, a TikTok profile and Meta ads:
stophy = Stophy(api_key="st_...")
transcript = stophy.youtube.transcript(video_url="https://youtu.be/dQw4w9WgXcQ", include_timestamps=True)
print(transcript["data"].get("text"), transcript["data"].get("segments"))
posts = stophy.reddit.search(query="bun runtime", sort="top", within="month")
print(posts["data"]["results"])
places = stophy.google.maps.search(query="coffee", location="Austin, TX")
place_id = places["data"]["results"][0].get("placeId")
if place_id:
reviews = stophy.google.maps.reviews(place_id=place_id)
print(reviews["data"]["results"])
profile = stophy.tiktok.profile(username="tiktok")
print(profile["data"].get("followers"), profile["data"].get("results"))
ads = stophy.meta.ads.search(query="running shoes")
print(ads["data"]["results"])
Get the next page
Each call returns one page of results, as the site shows it. List methods page in one of two ways.
Some take a page number. They return data["page"]. Ask for the next number to continue, and stop when results comes back empty:
first = stophy.google.search(query="bun runtime")
second = stophy.google.search(query="bun runtime", page=first["data"]["page"] + 1)
Others return data["cursor"] when there is more. Pass it back as is:
first = stophy.youtube.search(query="bun runtime")
if first["data"].get("cursor"):
next_page = stophy.youtube.search(query="bun runtime", cursor=first["data"]["cursor"])
Handle errors
from stophy import StophyError
try:
stophy.reddit.search(query="bun")
except StophyError as error:
print(error.code, error.retryable, error.retry_after_seconds)
StophyError has code, retryable, retry_after_seconds, status, and request_id. The message is str(error).
The SDK retries network errors and the HTTP statuses 429, 500, 502, 503, and 504, and it waits as long as the API asks. If the API asks for a wait longer than 60 seconds, the SDK raises right away with retry_after_seconds set.
Options
| Option | Default | What it does |
|---|---|---|
api_key |
STOPHY_API_KEY |
Your API key |
base_url |
STOPHY_BASE_URL, or the Stophy API |
The server to call |
max_retries |
2 |
Retries per request. 0 turns retries off. |
timeout |
70.0 |
Time limit in seconds for each attempt |
Check your account
usage = stophy.usage()
logs = stophy.logs(days=7, page=0)
usage returns your balance and your all-time usage. logs returns your recent requests. Both need an API key.
License
MIT
Metadata
Release files for stophy 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stophy-1.2.1.tar.gz | 57.5 kB | With provenance | Details for stophy-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stophy-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for stophy-1.2.1-py3-none-any.whl |
Total release size: 105.1 kB
Release files / stophy-1.2.1.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | stophy-1.2.1.tar.gz |
|---|---|
| Size | 57.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38f4454ab9c83ed13a12426c3b9e9d0a7b48c4f8fbe3e50385ff86f98b95163d
|
|
BLAKE2b-256 checksum How to use checksums |
418d3ebe886f9c0616c599fd66422a54193e07b30197b4fb686ac2c33ba29efd
|
| 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 Oct 31, 2026.
Transparency logRelease files / stophy-1.2.1-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | stophy-1.2.1-py3-none-any.whl |
|---|---|
| Size | 47.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab9c2abb09bcf44b8a5b0e9605597027e6786e9cc33147f8c17cde2cfca68993
|
|
BLAKE2b-256 checksum How to use checksums |
7d1f1c9d78824be7f7fdb411057e017dc9ced38192bd28c8af77fcad2bbf1e8a
|
| 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 Oct 31, 2026.
Transparency logSecurity for stophy 1.2.1
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.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 1.2.0 github.com/stophydotdev/sdk
- Added 1.2.1 github.com/stophydotdev/stophy
Attestation for stophy-1.2.1.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 Oct 31, 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.