suprsonic
Python SDK for Suprsonic. One API key, dozens of capabilities for your AI agent.
Install
pip install suprsonic
Usage
from suprsonic import Suprsonic
client = Suprsonic("omk_your_key")
# Search the web
result = client.search("latest AI funding rounds")
print(result.data)
# Find a professional email
result = client.emails.find(first_name="Yuma", last_name="Heymans", domain="o-mega.ai")
print(result.data["email"]) # yuma@o-mega.ai
# Scrape a webpage
result = client.scrape("https://example.com")
print(result.data["content"])
# Any capability via .run()
result = client.run("screenshot", url="https://example.com")
Response Format
Every method returns a unified response object:
{
"success": true,
"data": {
"results": [
{ "title": "OpenAI raises $6.6B", "url": "https://...", "snippet": "..." }
]
},
"error": null,
"metadata": {
"provider_used": "serperdev",
"providers_tried": ["serperdev"],
"response_time_ms": 1200,
"request_id": "req_abc123"
},
"credits_used": 1
}
On failure, success is false and error contains the details (see below).
Error Handling
from suprsonic import Suprsonic, SuprsonicError
client = Suprsonic("omk_your_key")
try:
result = client.search("latest AI funding rounds")
if not result.success:
# API returned an error response
print(result.error["detail"])
if result.error["is_retriable"]:
# Safe to retry after the suggested delay
time.sleep(result.error["retry_after_seconds"])
except SuprsonicError as e:
print(e.status, e.detail)
Error object structure:
{
"type": "billing_error",
"title": "Insufficient credits",
"status": 402,
"detail": "Your account has 0 credits remaining. Add credits at suprsonic.ai/app/billing.",
"is_retriable": false,
"retry_after_seconds": null,
"error_category": "billing"
}
Error categories: transient (retry safe), permanent (bad request), authentication (invalid key), billing (out of credits).
Agent Framework Examples
LangChain
from langchain.tools import StructuredTool
from suprsonic import Suprsonic
client = Suprsonic("omk_your_key")
search_tool = StructuredTool.from_function(
func=lambda query: client.search(query).data,
name="web_search",
description="Search the web for current information",
)
# Use in any LangChain agent
agent = initialize_agent(tools=[search_tool], llm=llm)
CrewAI
from crewai import Agent, Task, Crew
from crewai.tools import tool
from suprsonic import Suprsonic
client = Suprsonic("omk_your_key")
@tool("Web Search")
def search(query: str) -> dict:
"""Search the web for current information."""
return client.search(query).data
researcher = Agent(
role="Research Analyst",
goal="Find accurate, current information",
tools=[search],
)
OpenAI Function Calling
Use the /v1/tools endpoint to get Suprsonic capabilities as OpenAI-compatible function definitions:
import requests, openai
tools = requests.get(
"https://suprsonic.ai/v1/tools",
headers={"Authorization": "Bearer omk_your_key"},
).json()
response = openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Search for recent SpaceX launches"}],
tools=tools,
)
All Capabilities
search, scrape, profiles, emails, images, tts, stt, sms, documents, companies, email-verify, transcribe, invoice-parse, subtitle, file-convert, bg-remove, screenshot
Full API reference with all parameters and example responses: suprsonic.ai/apis
Get your API key at suprsonic.ai.
Metadata
Release files for suprsonic 0.3.3
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 |
|---|---|---|---|---|
| suprsonic-0.3.3.tar.gz | 8.1 kB | Without provenance | Details for suprsonic-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| suprsonic-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for suprsonic-0.3.3-py3-none-any.whl |
Total release size: 15.9 kB
Release files / suprsonic-0.3.3.tar.gz
| Download URL | suprsonic-0.3.3.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d4d3ee38a433a0c28da267a6bf382c46c56237aafba38ec3634071269086992
|
|
BLAKE2b-256 checksum How to use checksums |
178a591e8a2048b64e50f3f31f2d216fb591288bb12f564cdbed76405474f93a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / suprsonic-0.3.3-py3-none-any.whl
| Download URL | suprsonic-0.3.3-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8cc4dbf0f1352696e747eaee2c398fb029b1a3ee878f530c0894629e5d12530
|
|
BLAKE2b-256 checksum How to use checksums |
8aaa9bd7abcd6986018a2872197c6678c6e026c904e7729b84f8d9ef7581d213
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for suprsonic 0.3.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.