Audioscrape Python SDK
Official Python client library for the Audioscrape API. This library provides a clean, Pythonic interface to interact with Audioscrape's various endpoints for searching podcast transcriptions and managing notification subscriptions.
Installation
pip install audioscrape-sdk
Authentication
To use the Audioscrape API, you need an API key, which can be obtained from your Audioscrape dashboard.
import audioscrape
client = audioscrape.Client(api_key="YOUR_API_KEY")
Usage Examples
Search API
Search for podcast segments that mention specific terms:
# Basic search
results = client.search.search("machine learning AND neural networks")
# With pagination
results = client.search.search(
query="machine learning AND neural networks",
limit=10,
offset=0
)
# Print the first result
if results["results"]:
first_match = results["results"][0]
print(f"Podcast: {first_match['podcast']['title']}")
print(f"Episode: {first_match['episode']['title']}")
print(f"Match: {first_match['matches'][0]['text']}")
Notifications API
Create and manage search term notifications:
# Create a notification
notification = client.notifications.create_notification(
search_term="\"artificial intelligence\" AND ethics",
webhook_url="https://your-webhook.com/endpoint",
email_recipient="user@example.com"
)
print(f"Created notification with ID: {notification['id']}")
# List all notifications
notifications = client.notifications.list_notifications()
for notification in notifications:
print(f"ID: {notification['id']}, Term: {notification['search_term']}")
# Delete a notification
client.notifications.delete_notification(notification_id=123)
Advanced Query Syntax
Audioscrape supports advanced query syntax for more precise searches:
"exact phrase"- Match exact phrasesterm1 AND term2- Both terms must be presentterm1 OR term2- Either term can be presentterm1 NOT term2orterm1 -term2- Exclude content with second termterm*- Wildcard matching (prefix search)(term1 OR term2) AND term3- Grouping for complex queries
Error Handling
The SDK will raise exceptions for API errors:
import requests
from audioscrape import Client
try:
client = Client(api_key="YOUR_API_KEY")
results = client.search.search("artificial intelligence")
except requests.exceptions.HTTPError as e:
print(f"API error: {e}")
License
This SDK is distributed under the MIT license.
Metadata
Release files for audioscrape-sdk 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 | |
|---|---|---|---|
| audioscrape_sdk-0.1.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| audioscrape_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / audioscrape_sdk-0.1.0.tar.gz
| Download URL | audioscrape_sdk-0.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9967ab483099f7271196ea4ffa2cd566c108d81668de4d7126a6632fd3258c7
|
|
BLAKE2b-256 checksum How to use checksums |
be5ea96151171ed7255331461448dba59fe602f2f56d9e440bae491e298e244d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / audioscrape_sdk-0.1.0-py3-none-any.whl
| Download URL | audioscrape_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdcd06073d4bd0ba89f6a4956d58c424f4a83e510004e3130ae5e87757ee8c60
|
|
BLAKE2b-256 checksum How to use checksums |
ea23f170e7abd16b61dd4cc3568fded6944b4f2e19b527b1181c2a40ab795082
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|