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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| suprsonic-0.3.2.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| suprsonic-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / suprsonic-0.3.2.tar.gz
| Download URL | suprsonic-0.3.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f982689f7a99417ac9793365a09c0a9ce9ae56d9bb1cf1e0b68d9f3ddf8d17c
|
|
BLAKE2b-256 checksum How to use checksums |
705abecc0b9e967ce93283b3c2c4dedb918754d246d4871c71bdc720f9a0af17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|
Release files / suprsonic-0.3.2-py3-none-any.whl
| Download URL | suprsonic-0.3.2-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3eea37133bb1871a8ba3359365b92004116e2d92e8f878ab78a6aa276d880e0
|
|
BLAKE2b-256 checksum How to use checksums |
21fb0627c1ea4b8f379f5ba6cf6911573e8ddf69432a4f8e4340d18b1d1806f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|