Sign In
Developer entry point

A live demand dataset you can query, not just browse

Use the API layer when you want structured access to the same monthly dataset shown in the dashboard. Authentication starts with an API key, then the agent bootstrap route hands back the protected query and SSE endpoint map.

Bootstrap first

curl -s -H "Authorization: Bearer <key>" /api/agent/bootstrap

Create a key and call /api/agent/bootstrap first to confirm access and fetch the protected endpoint map.

Protected
D1-backed
Agent-first

Monthly backed-up dataset

The API sits on top of the same D1-backed monthly snapshot pipeline used by the product, not on top of ad hoc page scraping.

JSON for pull, SSE for stream

Use the protected /api/agent/query endpoints for direct reads and /api/agent/sse when you want agents or tools to consume rows incrementally.

Built for analysis workflows

The shape is optimized for category discovery, revenue scanning, pain-point clustering, and gig-level inspection.

Overview endpoints

Start here when you need month-level summaries and category-level context before drilling into individual gigs.

/api/agent/bootstrap
/api/agent/query/months
/api/agent/query/stats?month=2026-03

Search and detail endpoints

Use these when you need filtered snapshots, one-record inspection, or history for a single gig.

/api/agent/query/category-rollups?month=2026-03&sort=avg_revenue&limit=20
/api/agent/query/snapshots?month=2026-03&category_slug=business-plans&limit=20
/api/agent/query/snapshot?snapshot_id=snap_2ed6d0bb78ed0dae52588bf5

Analysis and streaming endpoints

Use these when you want repeated pain points, streaming rows, or agent-friendly consumption.

/api/agent/query/gig-history?gig_id=gig_40a1870d7325306b7bb2&limit=12
/api/agent/query/pain-points?month=2026-03&q=plan&limit=20
/api/agent/sse/category-rollups?month=2026-03

Data model behind the API

The page should explain that the API is reliable because the data is layered, versioned by month, and backed by D1.

Raw layer

One source export per category, preserved monthly as the backup layer.

Normalized layer

Cleaned snapshots, category rollups, and LLM-ready fields for service, pain point, price, orders, and revenue.

Serving layer

A protected app-layer gateway sits in front of the Cloudflare D1 Worker so external agents authenticate with your key instead of hitting the raw Worker URL.

Getting started

Keep the first path simple for technical users.

01

Create a key and call /api/agent/bootstrap first to confirm access and fetch the protected endpoint map.

02

Use /api/agent/query/months, /api/agent/query/stats, and /api/agent/query/category-rollups to narrow the market you care about.

03

Switch to /api/agent/query/pain-points, /api/agent/query/snapshot, /api/agent/query/gig-history, or /api/agent/sse when you need deeper analysis.

See the skills page