Developer API

Pain Spotter REST API

Pull AI-scored business opportunities mined from Reddit, Hacker News, Product Hunt, Stack Exchange and more — straight into your agent, dashboard, or newsletter pipeline.

60-second quickstart

  1. Create an account and verify your email.
  2. Go to Account → API Keys and click Generate. The raw key is shown once; copy it immediately.
  3. Call the endpoints below with header X-API-Key: psk_….

Authentication

Every request needs an API key. Either method works:

  • HTTP header: X-API-Key: psk_live_abc...
  • Query string: ?api_key=psk_live_abc... (handy for browser tests; avoid in logs / referrers in production)

Keys live as SHA-256 hashes server-side. Lost key = revoke + generate a new one.

Endpoints

GET/api/v1/opportunities

List opportunities with filters and pagination.

Query parameters

NameTypeDescription
platformstring?reddit | hackernews | producthunt | stackexchange | …
channelstring?Channel / subreddit name (case-sensitive).
qstring?Keyword search across title + description (≤100 chars).
min_scoreint 0–100Drop anything below this composite score. Default 0.
recommendationBuild|Validate|SkipHard filter on the LLM verdict.
online_onlyboolOnly ideas shippable as software / SaaS. Default true.
pageint ≥11-indexed. Default 1.
page_sizeint 1–100Default 20. Hard max 100.

Example

curl -H "X-API-Key: psk_live_abc..." \
  "https://painspotter.ai/api/v1/opportunities?min_score=80&page_size=5&platform=reddit"

Response shape

{
  "items": [
    {
      "id": 7301,
      "platform": "reddit",
      "channel_name": "SaaS",
      "title": "LLM Firewall Proxy API",
      "slug": "llm-firewall-proxy-api",
      "recommendation": "Build",
      "score": 92,
      "pain_point_intensity": 9,
      "willingness_to_pay_score": 9,
      "tech_difficulty": 4,
      "sustainability_score": 8,
      "target_audience": "CTOs at mid-large AI-heavy SaaS",
      "monetization_model": "SaaS usage-based subscription",
      "evidence_count": 12,
      "merged_from_count": 3,
      "is_online_deliverable": true,
      "created_at": "2026-05-17T08:21:33+00:00"
    }
  ],
  "total": 1284,
  "page": 1,
  "page_size": 5
}
GET/api/v1/opportunities/{id}

Full opportunity detail. 404s do NOT count against your quota.

Example

curl -H "X-API-Key: psk_live_abc..." \
  https://painspotter.ai/api/v1/opportunities/7301

Detail-only fields

  • description — long-form narrative
  • market_size_estimate
  • key_features — string[]
  • competitors — string[]
  • differentiation
  • risks — string[]

Quotas & rate limits

PlanCalls / monthKeys per user
Free205
Pro ($20 / mo)1,0005
Business ($50 / mo)5,0005

Quota resets at the 1st of each calendar month UTC. Hitting the cap returns HTTP 429 with body:

{
  "error": "quota_exceeded",
  "current": 1000,
  "limit": 1000,
  "reset_at": "2026-06-01T00:00:00+00:00"
}

Error codes

  • 401 — missing or invalid API key (header / query both empty, or key not found, or revoked).
  • 403 — key was revoked by you or by admin.
  • 404 — opportunity id does not exist. Not counted against quota.
  • 422 — invalid query parameter (e.g. min_score=150).
  • 429 — monthly quota exceeded. See response body for reset time.

CORS, PII & compliance

  • All responses are JSON, UTF-8. CORS is * for v1 read-only endpoints — calling from a browser is fine, but never expose your API key in client-side code.
  • evidence_quotes are scrubbed: usernames u/xxx and handles @xxx are replaced with [user]; emails & phone numbers stripped at write time and on read.
  • Opportunity titles are LLM rewrites — not the original Reddit headline — so they're safe to display in your own product.

Changelog

  • 2026-05-19 — v1.0: GET /api/v1/opportunities + GET /api/v1/opportunities/{id} public release.