Structured data extraction from any URL. Send a URL + CSS selectors, get JSON back.
1. Get an API key:
curl -X POST https://structapi.duckdns.org/keys -H "Content-Type: application/json" -d '{}'
2. Extract data:
curl -X POST https://structapi.duckdns.org/extract \
-H "Content-Type: application/json" \
-H "X-API-Key: ***" \
-d '{
"url": "https://news.ycombinator.com",
"fields": [
{"name": "title", "selector": ".titleline a"},
{"name": "points", "selector": ".score", "multiple": true}
]
}'
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Key name in output JSON |
| selector | string | Yes | CSS selector to locate elements |
| attr | string | No | Attribute to extract (default: "text") |
| multiple | boolean | No | Return an array of all matches |
Python:
import requests
resp = requests.post("https://structapi.duckdns.org/extract",
headers={"X-API-Key": "sk-..."},
json={"url": "https://example.com", "fields": [{"name":"h1","selector":"h1"}]})
print(resp.json())
Node.js:
const resp = await fetch('https://structapi.duckdns.org/extract', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-API-Key': 'sk-...' },
body: JSON.stringify({ url: 'https://example.com', fields: [{ name: 'title', selector: 'h1' }] })
});
console.log(await resp.json());
| Tier | Requests/Month | Price |
|---|---|---|
| Free | 100 | Free |
| Starter | 10,000 | $29/mo |
| Pro | 50,000 | $99/mo |
| Scale | 200,000 | $299/mo |
Proxy tiers (residential IPs, geo-targeting, JS rendering) launch after first 5 paying customers.