Skip to content

92SM/structapi

Repository files navigation

StructAPI

Turn any website into structured JSON. Send a URL + CSS selectors. Get clean data back. No scraping, no parsing, no HTML to wade through.

Live instance: http://bore.pub:18161docs · pricing · status

curl -X POST http://bore.pub:18161/extract \
  -H "X-API-Key: $STRUCTAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://news.ycombinator.com",
    "fields": [
      {"name": "title", "selector": ".titleline a"},
      {"name": "score", "selector": ".score", "multiple": true}
    ]
  }'
{
  "success": true,
  "data": {
    "title": "Show HN: StructAPI",
    "score": ["127", "89", "342"]
  }
}

How It Works

  1. Define your fields — name and CSS selector per field
  2. POST to /extract — we fetch the page and run your selectors
  3. Get JSON back — no HTML, no parsing, just data

Or skip selectors with /auto — auto-detect title, headings, links, images, and paragraphs from any URL.

Why StructAPI

Every other scraping API returns raw HTML and makes you parse it. StructAPI returns structured JSON — the thing you actually want. Closest competitor is Diffbot at $299/mo minimum. StructAPI starts at free.

StructAPI Diffbot ScrapingBee
Output Structured JSON Structured JSON Raw HTML
Starting price Free $299/mo $49/mo
CSS selectors Yes No No
Auto-detect mode Yes Yes No
Free tier 100 req/mo 0 1,000 API credits

Pricing

Tier Requests/Month Price
Free 100 $0
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. Subscribe →

Quickstart

# 1. Get a free API key (100 req/mo, no credit card)
curl -X POST http://bore.pub:18161/keys \
  -H "Content-Type: application/json" \
  -H "X-Admin-Key: $ADMIN_KEY" \
  -d '{"tier": "free"}'

# 2. Extract structured data
curl -X POST http://bore.pub:18161/extract \
  -H "X-API-Key: $STRUCTAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "fields": [{"name": "title", "selector": "h1"}]}'

API Reference

Endpoint Method Auth Description
/extract POST API Key Extract fields via CSS selectors
/auto POST API Key Auto-detect page structure
/keys POST Admin Key Create API key
/usage GET API Key Check usage & limits
/health GET None Uptime check
/docs GET None Full documentation

Full reference: bore.pub:18161/docs

Self-Host

git clone git@github.com:92SM/structapi.git
cd structapi && npm install
ADMIN_KEY=your-secret node server.js
# → http://localhost:3000

Set BASE_URL to your public URL for correct docs/checkout links. Set STRIPE_SECRET_KEY + STRIPE_PRICE_ID for billing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors