Extract structured data from any website with one API call. Haunt API Python SDK.
Project description
hauntapi
Python SDK for Haunt API — extract structured data from any website with one API call.
Install
pip install hauntapi
Quick Start
from hauntapi import Haunt
client = Haunt(api_key="haunt_your_key")
# Extract data from any URL
result = client.extract(
url="https://news.ycombinator.com",
prompt="Get the top 5 story titles and their points"
)
print(result.data)
# {"stories": [{"title": "...", "points": 572}, ...]}
print(result.credits_remaining)
# 97
# Get usage info
print(client.usage())
# {"plan": "free", "remaining": 97, "monthly_limit": 100}
Features
extract(url, prompt)— Extract structured data from any URLextract_auth(url, prompt, cookies=..., headers=...)— Extract from authenticated/private pagesextract_batch(urls, prompt)— Extract from multiple URLs at onceusage()— Check your quota and plan
Error Handling
from hauntapi import Haunt, AuthenticationError, QuotaExceededError
client = Haunt(api_key="your_key")
try:
result = client.extract(url="https://example.com", prompt="Get the title")
except AuthenticationError:
print("Invalid API key")
except QuotaExceededError:
print("Monthly quota exceeded")
Pricing
- Free: 100 requests/month, no credit card
- Pro: $0.01/request — pay only for what you use
Get your API key at hauntapi.com.
Links
- Docs: https://hauntapi.com/docs
- MCP Server: https://github.com/Darko893/mcp-server
- API: https://hauntapi.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hauntapi-1.0.0.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hauntapi-1.0.0.tar.gz.
File metadata
- Download URL: hauntapi-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a223b90c74604128b1d20e3380049f7ad356c606ab4ccc8c6092d5d1413519b
|
|
| MD5 |
50f525577bda7c0702556097681ff174
|
|
| BLAKE2b-256 |
bfb7ef3f0641d459d1f802fdd2659ba749d75fddc64435fd51195c81386ee252
|
File details
Details for the file hauntapi-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hauntapi-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66220a77c9d002c467b7a8222c1a557c09fd5a8bb0860bf80f19292a5f2745d3
|
|
| MD5 |
18ae43501c03d9e05b1028d851f2b633
|
|
| BLAKE2b-256 |
227f2227dff7a69e0262c9dcd2379088fefc96aec4be909d91c4e0f2c9841eb0
|