{"openapi":"3.1.0","info":{"title":"Business Idea Generator API","version":"1","description":"Gives one researched business idea. Start a job, then read it until `status` is `completed` (about 2 minutes). Price: the first 100 ideas on the whole site are free. The next 200 cost $0.25 each, then $0.50. No sign-up. `GET /api/pricing` gives the live count and the packs on sale. The free ideas are one pool for the whole site; to keep them fair, one address can run a few per day (the exact windows are under `rate_limited`). On `payment_required` (402), give the person `buy_url`, or call `POST /api/credits/checkout` with a `pack_id` (packs are $5 or $20; VAT or sales tax may be added at checkout where it applies), show them `checkout_url`, keep `credit_token`, and send it as `Authorization: Bearer gmi_...` (MCP: the `credit_token` argument) once they have paid. Ideas you buy never run out by the day. A job that fails is not charged. On `rate_limited` or `daily_cap`, tell the person when to retry (`retry_after_s`); do not loop. This API and the MCP server at https://getmeanidea.com/mcp share one per-IP count. Free agent jobs may use at most $3 of the $5 daily research budget (UTC day); paid ideas have their own, separate daily safety limit. Every number names the call it came from (a number in `why_now` is copied from its linked page); a value that could not be fetched is null, never a guess. Idea names, one-liners and first steps are AI suggestions. Results are kept 30 days. Questions, payments or a lost credit token: anyos@nowix.ai.","contact":{"name":"Support","email":"anyos@nowix.ai"}},"servers":[{"url":"https://getmeanidea.com"}],"externalDocs":{"description":"How it works","url":"https://getmeanidea.com/docs/"},"paths":{"/api/jobs":{"post":{"operationId":"startIdeaJob","summary":"Start a research job. Every field is optional.","description":"No key while ideas are free. Once they are used up, send an idea credit token (`Authorization: Bearer gmi_...` or `X-Idea-Credit: gmi_...`); without one the answer is 402 `payment_required`.","security":[{},{"ideaCredit":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartJobRequest"}}}},"responses":{"202":{"description":"Started. Read it at `status_url`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartJobResponse"}}},"headers":{"X-RateLimit-Limit":{"description":"Jobs allowed in the tightest per-IP window of this channel.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs left in that window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until a slot in that window frees up (0 = none used).","schema":{"type":"integer"}}}},"400":{"description":"`invalid_input`: `fields` names each invalid field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"402":{"description":"`payment_required`: the free ideas are used up and no usable credit token was sent (none, unknown, or no ideas left). Give the person `buy_url`, or start a checkout at `checkout_endpoint`. Do not loop.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"`rate_limited`. Free ideas: this IP has used its jobs. Agents: 20 per rolling 24 hours and 3 per rolling 10 minutes (API and MCP together). Website: 5 per rolling 24 hours. Paid ideas skip the daily per-IP limit; agents keep the 3 per 10 minutes, and one credit token may start 30 ideas per rolling hour. `retry_after_s` and `Retry-After` give the wait. The `X-RateLimit-*` headers are sent for free jobs only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}},"headers":{"Retry-After":{"description":"Seconds to wait; the same as `retry_after_s`.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Jobs allowed in the tightest per-IP window of this channel.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Jobs left in that window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until a slot in that window frees up (0 = none used).","schema":{"type":"integer"}}}},"503":{"description":"`daily_cap`: today's research budget is used up (for free ideas the $5 daily cap, or the $3 of it agents may use; paid ideas have their own budget with a separate daily safety limit, and that refusal carries `support_email`). No idea credit is used. `retry_after_s` runs to 00:00 UTC, when it resets. `busy`: try again in a minute (also when the idea counter cannot be read). `not_configured`: the service is not set up. No calls were made.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}},"headers":{"Retry-After":{"description":"Seconds to wait; the same as `retry_after_s`.","schema":{"type":"integer"}}}}}}},"/api/jobs/{id}":{"get":{"operationId":"getIdeaJob","summary":"Read a job: status and stage while researching, the result when completed.","parameters":[{"name":"id","in":"path","required":true,"description":"The job_id from POST /api/jobs.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}}],"responses":{"200":{"description":"The job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatus"}}}},"404":{"description":"`not_found`: unknown or expired job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"503":{"description":"`not_configured`: the service is not set up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/api/jobs/{id}/report":{"get":{"operationId":"getIdeaJobReport","summary":"The evidence: every idea checked and every data call.","parameters":[{"name":"id","in":"path","required":true,"description":"The job_id from POST /api/jobs.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}}],"responses":{"200":{"description":"The merged report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobReport"}}}},"404":{"description":"`not_found`: unknown or expired job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"503":{"description":"`not_configured`: the service is not set up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/api/jobs/{id}/cancel":{"post":{"operationId":"cancelIdeaJob","summary":"Stop a job and the calls in flight.","parameters":[{"name":"id","in":"path","required":true,"description":"The job_id from POST /api/jobs.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}}],"responses":{"200":{"description":"Cancelled, or already finished.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobResponse"}}}},"404":{"description":"`not_found`: unknown or expired job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"503":{"description":"`not_configured`: the service is not set up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/api/pricing":{"get":{"operationId":"getPricing","summary":"The live idea counter: free ideas left, the current price and the packs on sale.","responses":{"200":{"description":"The counter. Cached for 5 seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pricing"}}},"headers":{"Cache-Control":{"description":"`public, max-age=5`.","schema":{"type":"string"}}}},"503":{"description":"`busy`: the idea counter cannot be read right now; try again in a minute. `not_configured`: the counter is not set up on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/api/credits/checkout":{"post":{"operationId":"startCreditCheckout","summary":"Start a Stripe checkout for a pack of idea credits.","description":"Returns `checkout_url` (show it to the person to pay) and `credit_token` (keep it; send it with `POST /api/jobs` once they have paid). Send an existing token as `Authorization: Bearer gmi_...` to top it up instead of getting a new one. VAT or sales tax may be added at checkout where it applies. At most 10 checkouts per IP address per rolling hour.","security":[{},{"ideaCredit":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"The checkout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}},"headers":{"Cache-Control":{"description":"`no-store`.","schema":{"type":"string"}}}},"400":{"description":"`invalid_input`: no or unknown `pack_id` (`fields.pack_id`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"401":{"description":"`invalid_credit_token`: the credit token is missing, malformed or not known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"409":{"description":"`free_ideas_left`: ideas are still free, there is nothing to pay for yet. `pack_not_on_sale`: the pack is not on sale now; `packs` lists the packs on sale.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"429":{"description":"`rate_limited`: too many checkouts from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}},"headers":{"Retry-After":{"description":"Seconds to wait; the same as `retry_after_s`.","schema":{"type":"integer"}}}},"503":{"description":"`payments_closed`: paid ideas are not open yet. `busy`: try again in a minute. `not_configured`: the counter is not set up on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/api/credits":{"get":{"operationId":"getCreditBalance","summary":"Ideas left on a credit token, and the price each was bought at.","security":[{"ideaCredit":[]}],"responses":{"200":{"description":"The balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}},"headers":{"Cache-Control":{"description":"`no-store`.","schema":{"type":"string"}}}},"401":{"description":"`invalid_credit_token`: the credit token is missing, malformed or not known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"503":{"description":"`busy`: the idea counter cannot be read right now; try again in a minute. `not_configured`: the counter is not set up on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}},"/api/credits/claim":{"get":{"operationId":"claimCredits","summary":"After a payment: is it confirmed? Called by the /paid page.","description":"The token of a payment that was not started with POST /api/credits/checkout is returned once, on the first pickup. Poll every 2 seconds while `status` is `pending`.","parameters":[{"name":"session_id","in":"query","required":true,"description":"The Stripe checkout session id from the redirect.","schema":{"type":"string","pattern":"^cs_(test|live)_[A-Za-z0-9]{10,200}$"}}],"responses":{"200":{"description":"The payment state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResponse"}}},"headers":{"Cache-Control":{"description":"`no-store`.","schema":{"type":"string"}}}},"400":{"description":"`invalid_input`: not a Stripe checkout session id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"503":{"description":"`busy`: the idea counter cannot be read right now; try again in a minute. `not_configured`: the counter is not set up on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}}},"components":{"securitySchemes":{"ideaCredit":{"type":"http","scheme":"bearer","description":"An idea credit token (gmi_...). Only needed for paid ideas. Also accepted as the X-Idea-Credit header."}},"schemas":{"StartJobRequest":{"type":"object","properties":{"hint":{"type":"string","maxLength":200,"description":"Anything the idea should fit, e.g. \"something I can build alone\". Default \"\"."},"skills":{"type":"string","maxLength":200,"description":"The skills the person brings. Default \"\"."},"budget":{"type":"string","enum":["zero","under_100","under_1000","over_1000"],"description":"Startup budget band. Default under_100."},"time":{"type":"string","enum":["few_hours_week","evenings_weekends","full_time"],"description":"Time the person can give the business. Default few_hours_week."},"region":{"type":"string","enum":["us","uk","de","hu","ca","au"],"description":"Market for the search data. Default us."},"audience":{"type":"string","maxLength":120,"description":"Optional target audience."}},"description":"Every field is optional; {} is valid."},"JobInput":{"type":"object","properties":{"hint":{"type":"string"},"skills":{"type":"string"},"budget":{"type":"string","enum":["zero","under_100","under_1000","over_1000"]},"time":{"type":"string","enum":["few_hours_week","evenings_weekends","full_time"]},"region":{"type":"string","enum":["us","uk","de","hu","ca","au"]},"audience":{"type":"string"}},"required":["hint","skills","budget","time","region"],"additionalProperties":false},"ApiError":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_input","payload_too_large","rate_limited","daily_cap","not_configured","busy","not_found","run_failed","checkpoint_lost","research_failed","timed_out","internal","payment_required","payments_closed","free_ideas_left","pack_not_on_sale","invalid_credit_token"]},"message":{"type":"string","description":"Safe to show to a person."},"retry_after_s":{"type":"integer"},"cached_run_id":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"invalid_input: field name to message."},"buy_url":{"type":"string","description":"payment_required: the page where a person buys a pack."},"checkout_endpoint":{"type":"string","description":"payment_required: POST here to start a checkout."},"packs":{"type":"array","items":{"$ref":"#/components/schemas/Pack"},"description":"payment_required, pack_not_on_sale: the packs on sale now."},"pack_lines":{"type":"array","items":{"type":"string"},"description":"The same packs as sentences, e.g. \"$5 for 20 ideas (25¢ each)\"."},"tax_note":{"type":"string"},"price_usd":{"type":"number"},"payments_open":{"type":"boolean"},"support_email":{"type":"string","description":"payment_required, invalid_credit_token and a paid job's daily_cap: who to write to (anyos@nowix.ai)."}},"required":["code","message"],"additionalProperties":false},"ApiErrorBody":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApiError"}},"required":["error"],"additionalProperties":false},"PaymentRequired":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","const":"payment_required"},"message":{"type":"string","description":"Safe to show to a person. Names the price, the packs on sale and where to buy."},"buy_url":{"type":"string","description":"Give this to the person: the page where they buy a pack."},"checkout_endpoint":{"type":"string","description":"Or start a checkout here (POST /api/credits/checkout)."},"packs":{"type":"array","items":{"$ref":"#/components/schemas/Pack"},"description":"The packs on sale now; [] when payments are not open."},"pack_lines":{"type":"array","items":{"type":"string"},"description":"The same packs as sentences."},"tax_note":{"type":"string","const":"VAT or sales tax may be added at checkout where it applies."},"price_usd":{"type":"number","description":"The price of the next idea: 0.25 or 0.5."},"payments_open":{"type":"boolean","description":"false: the free ideas are used up and paid ideas are not open yet."},"support_email":{"type":"string","const":"anyos@nowix.ai","description":"Who to write to about payments or a lost credit token."}},"required":["code","message","buy_url","checkout_endpoint","packs","pack_lines","tax_note","price_usd","payments_open","support_email"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Pack":{"type":"object","properties":{"id":{"type":"string","description":"The pack_id for POST /api/credits/checkout, e.g. t25_20."},"ideas":{"type":"integer"},"amount_usd":{"type":"number","description":"Before tax. VAT or sales tax may be added at checkout where it applies."},"per_idea_usd":{"type":"number"},"label":{"type":"string","description":"The pack line, e.g. \"$5 for 20 ideas (25¢ each)\"."}},"required":["id","ideas","amount_usd","per_idea_usd","label"],"additionalProperties":false},"Pricing":{"type":"object","properties":{"free_total":{"type":"integer","description":"Size of the free pool (100)."},"free_left":{"type":"integer","description":"Free ideas left. Running free jobs count as taken."},"delivered":{"type":"integer","description":"Ideas delivered on the whole site."},"current_price_usd":{"type":"number","description":"0, 0.25 or 0.5."},"tier":{"type":"string","enum":["free","t25","t50"]},"payments_open":{"type":"boolean","description":"Packs can be bought now."},"packs":{"type":"array","items":{"$ref":"#/components/schemas/Pack"},"description":"The packs on sale now; [] while ideas are free or payments are not open."}},"required":["free_total","free_left","delivered","current_price_usd","tier","payments_open","packs"],"additionalProperties":false},"CheckoutRequest":{"type":"object","properties":{"pack_id":{"type":"string","description":"A pack id from GET /api/pricing, e.g. t25_20."}},"required":["pack_id"],"additionalProperties":false},"CheckoutResponse":{"type":"object","properties":{"checkout_url":{"type":"string","description":"The Stripe checkout page. Show it to the person to pay."},"credit_token":{"type":"string","pattern":"^gmi_[A-Za-z0-9_-]{43}$","description":"Keep it: it is the only key to the ideas bought. On a top-up, the token that was sent."},"purchase_id":{"type":"string"},"ideas":{"type":"integer"},"amount_usd":{"type":"number","description":"Before tax."},"tax_note":{"type":"string","const":"VAT or sales tax may be added at checkout where it applies."}},"required":["checkout_url","credit_token","purchase_id","ideas","amount_usd","tax_note"],"additionalProperties":false},"Credits":{"type":"object","properties":{"balance":{"type":"integer","description":"Ideas left. A credit held by a running job is not counted (it comes back if the job fails)."},"tier_prices_paid":{"type":"array","items":{"type":"object","properties":{"tier":{"type":"string","enum":["t25","t50"]},"price_usd":{"type":"number"},"ideas_left":{"type":"integer"},"ideas_bought":{"type":"integer"}},"required":["tier","price_usd","ideas_left","ideas_bought"],"additionalProperties":false}}},"required":["balance","tier_prices_paid"],"additionalProperties":false},"ClaimResponse":{"description":"`pending`: the payment is not confirmed yet, ask again. `paid`: credited; `credit_token` only on the first pickup of a payment that was not started here. `claimed`: that token was already picked up.","anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"pending"}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"paid"},"purchase_id":{"type":"string"},"ideas":{"type":"integer"}},"required":["status","purchase_id","ideas"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"paid"},"credit_token":{"type":"string","pattern":"^gmi_[A-Za-z0-9_-]{43}$"},"ideas":{"type":"integer"}},"required":["status","credit_token","ideas"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"claimed"},"ideas":{"type":"integer"}},"required":["status","ideas"],"additionalProperties":false}]},"StartJobBilling":{"description":"How this job is paid for. A paid job uses one credit; it comes back if the job fails or is cancelled.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"free"},"price_usd":{"type":"number","const":0}},"required":["kind","price_usd"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"paid"},"price_usd":{"type":"number"},"ideas_left":{"type":"integer","description":"Credits left on the token after this one."}},"required":["kind","price_usd"],"additionalProperties":false}]},"JobBilling":{"type":"object","properties":{"kind":{"type":"string","enum":["free","paid"]},"settled":{"type":"string","enum":["open","counted","returned"],"description":"`counted`: the idea was delivered. `returned`: the free slot or the credit went back."}},"required":["kind","settled"],"additionalProperties":false},"StartJobResponse":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["queued","researching","completed","failed","cancelled"]},"status_url":{"type":"string","description":"/api/jobs/<job_id>"},"result_url":{"type":"string","description":"/idea/<job_id>: the private result page."},"eta_seconds":{"type":"integer","const":120,"description":"An upper bound, not a countdown."},"input":{"$ref":"#/components/schemas/JobInput"},"defaults_applied":{"type":"array","items":{"type":"string","enum":["hint","skills","budget","time","region"]}},"created_at":{"type":"string","format":"date-time"},"billing":{"$ref":"#/components/schemas/StartJobBilling"}},"required":["job_id","status","status_url","result_url","eta_seconds","input","defaults_applied","created_at"],"additionalProperties":false},"JobCounts":{"type":"object","properties":{"candidates":{"anyOf":[{"type":"integer"},{"type":"null"}]},"with_data":{"anyOf":[{"type":"integer"},{"type":"null"}]},"finalists":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["candidates","with_data","finalists"],"additionalProperties":false},"RunTotals":{"type":"object","properties":{"calls":{"type":"integer"},"cost_micro":{"type":"integer"},"per_run_cap_micro":{"type":"integer"},"uncertain_calls":{"type":"integer"},"ledger_micro":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["calls","cost_micro"],"additionalProperties":true},"IdeaReport":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"AI suggestion."},"one_liner":{"type":"string","description":"AI suggestion."},"keyword":{"anyOf":[{"type":"object","properties":{"keyword":{"type":"string"},"region":{"type":"string"},"volume":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"cpc":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"kd":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"fit":{"type":"object","description":"Does the buyer of the idea type this keyword to find such a product, 0 to 1, from the judge model (AI estimate). Absent = not asked or no answer.","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true}},"additionalProperties":true},{"type":"null"}]},"revenue":{"anyOf":[{"type":"object","description":"Value of the search traffic at rank #1: an estimate, not guaranteed revenue.","properties":{"monthly_usd":{"anyOf":[{"type":"number"},{"type":"null"}]},"yearly_usd":{"anyOf":[{"type":"number"},{"type":"null"}]},"derived":{"type":"boolean"}},"additionalProperties":true},{"type":"null"}]},"build_difficulty":{"anyOf":[{"type":"object","description":"AI estimate from a judge model.","properties":{"level":{"anyOf":[{"type":"string","enum":["easy","medium","hard"]},{"type":"null"}]},"ai_estimate":{"type":"boolean"}},"additionalProperties":true},{"type":"null"}]},"domain":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"verdict":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"first_steps":{"type":"array","items":{"type":"string"},"description":"AI suggestions."},"market":{"anyOf":[{"type":"object","description":"The market check. `ads`, `amazon` and `local` are present only when the extra market sources were switched on for the job.","properties":{"checked":{"type":"boolean"},"ads":{"anyOf":[{"type":"object","description":"Meta Ad Library: active ads found that name the topic. `ads_count`, `advertisers_count`, `long_running_count` (advertisers with an ad running 30 days or more), `oldest_start` and up to 5 `advertisers`. Active ads, never ad spend. 0 = asked, none found.","properties":{"query":{"type":"string"},"country":{"type":"string"},"ads_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"advertisers_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"long_running_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"oldest_start":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"advertisers":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true}},"additionalProperties":true},{"type":"null"}]},"amazon":{"anyOf":[{"type":"object","description":"Amazon listings for the topic (physical products only). `top_bucket` is the highest \"bought in past month\" text, as printed: a floor, never turned into sales or revenue.","properties":{"query":{"type":"string"},"country":{"type":"string"},"rows_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"with_bucket_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"top_bucket":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"top_bucket_floor":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"prices":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"samples":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true}},"additionalProperties":true},{"type":"null"}]},"amazon_not_checked":{"type":"string","enum":["kind","region","limit"]},"local":{"anyOf":[{"type":"object","description":"Google Maps businesses in one sample city (local services only), at most 20 rows: a sample, never a market size. `with_reviews_count` = rows with 20 or more reviews.","properties":{"query":{"type":"string"},"location":{"type":"string"},"rows_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"with_reviews_count":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"median_reviews":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true},"samples":{"type":"object","description":"A sourced value: `source` is the call id; `value` null means missing (see `missing_reason`).","properties":{"value":{},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"missing_reason":{"type":"string"}},"required":["value","source"],"additionalProperties":true}},"additionalProperties":true},{"type":"null"}]},"local_not_checked":{"type":"string","enum":["kind","region"]}},"additionalProperties":true},{"type":"null"}]},"cell":{"type":"object","description":"What the code dealt to the drafting model: an industry (or a customer group, in a job with a hint or an audience) and a business form. Absent on ideas of the angle drafter and on older results.","properties":{"cell_id":{"type":"string"},"type":{"type":"string","enum":["industry","customer_group","form_twist"]},"industry_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"customer_group":{"anyOf":[{"type":"string","description":"AI text."},{"type":"null"}]},"form_label":{"type":"string"},"twist_label":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":true},"signal":{"anyOf":[{"$ref":"#/components/schemas/Signal"},{"type":"null"}]},"kind":{"type":"string","enum":["local_service","physical_product","software","content","other"],"description":"Which market sources fit the idea. Set by code from its form, never by a model."},"lane":{"type":"string","enum":["why_now"],"description":"The idea has the place each batch reserves for an idea drafted from a published view."},"frontier":{"type":"object","description":"Set with `lane` when the idea missed a usual keyword check and was kept on the lower floor of that place: which check, with the real numbers.","properties":{"code":{"type":"string"},"detail":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"sources":{"type":"array","items":{"type":"string"},"description":"Call ids behind this idea."}},"required":["id","name","one_liner","keyword","domain","verdict","first_steps","sources"],"additionalProperties":true},"Signal":{"type":"object","properties":{"signal_id":{"type":"string"},"publisher":{"type":"string"},"kind":{"type":"string","enum":["request_for_startups","vc_thesis","asset_manager_outlook","consulting_study","gov_data","regulation","funding","launch","indie_revenue","marketplace","social_post","research"]},"title":{"type":"string"},"url":{"type":"string","description":"https only."},"published":{"anyOf":[{"type":"string","description":"As the page prints it: YYYY-MM-DD, YYYY-MM or YYYY. null = no date printed."},{"type":"null"}]},"thesis":{"type":"string","description":"A summary of the quote, written with AI."},"why_now":{"anyOf":[{"type":"string","description":"A summary, written with AI."},{"type":"null"}]},"quote":{"type":"string","description":"Verbatim from the linked page."},"origin":{"type":"string","enum":["seed","refresh"],"description":"seed = shipped with the app; refresh = read from the linked page by our refresher. Both paraphrases were written with AI."},"as_of":{"type":"string","description":"The day the page was last checked."}},"required":["signal_id","publisher","kind","title","url","published","thesis","why_now","quote","origin","as_of"],"additionalProperties":true,"description":"A snapshot of the published view the idea was drafted from. Context, never demand evidence. null = drafted without one; absent = the angle drafter or an older result. To show one to a person, use `why_now` of the job: it has the checks."},"WhyNow":{"type":"object","properties":{"heading":{"type":"string","description":"\"Why now\"."},"items":{"type":"array","description":"The published view (one).","items":{"type":"object","properties":{"signal_id":{"type":"string"},"publisher":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","description":"https only."},"published":{"anyOf":[{"type":"string","description":"As the page prints it. null = no date printed."},{"type":"null"}]},"text":{"anyOf":[{"type":"string","description":"A summary written with AI and checked against the quote. null when it held a number the quote, title and date do not print: then only the quote is shown."},{"type":"null"}]},"quote":{"type":"string","description":"Verbatim from the linked page."},"origin":{"type":"string","enum":["seed","refresh"]}},"required":["signal_id","publisher","title","url","published","text","quote","origin"],"additionalProperties":false}},"note":{"type":"string","description":"The idea is ours; the publisher did not suggest or endorse it; context, not proof of demand."},"ai_note":{"anyOf":[{"type":"string","description":"Set whenever `text` is shown: it was written with AI and checked against the quote."},{"type":"null"}]},"low_demand_note":{"anyOf":[{"type":"string","description":"Set when the idea was kept with a small search volume: the real number."},{"type":"null"}]}},"required":["heading","items","note","ai_note","low_demand_note"],"additionalProperties":false,"description":"Completed jobs whose winner was drafted from a published view: who published what, with the link and a verbatim quote. Built on every read from the snapshot in the winner (never stored). Context, never demand evidence, and no points in any score. Absent for every other job, and when the operator has hidden it."},"WhyNowLine":{"type":"object","properties":{"signal_id":{"type":"string"},"publisher":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","description":"https only."},"published":{"anyOf":[{"type":"string","description":"As the page prints it. null = no date printed."},{"type":"null"}]},"note":{"type":"string","description":"\"The idea is ours.\""}},"required":["signal_id","publisher","title","url","published","note"],"additionalProperties":false,"description":"The published view a runner-up was drafted from, in one line. Context, never demand evidence."},"Reason":{"type":"object","properties":{"code":{"type":"string"},"text":{"type":"string","description":"A template filled with real numbers, not model prose."},"tone":{"type":"string","enum":["good","neutral","bad"]},"sources":{"type":"array","items":{"type":"string"}}},"required":["code","text","tone","sources"],"additionalProperties":true},"JobResult":{"type":"object","properties":{"winner":{"anyOf":[{"$ref":"#/components/schemas/IdeaReport"},{"type":"null"}]},"why_it_won":{"type":"array","items":{"$ref":"#/components/schemas/Reason"}},"runner_ups":{"type":"array","items":{"$ref":"#/components/schemas/IdeaReport"},"maxItems":2},"judge_pick":{"type":"boolean"},"no_winner_reason":{"type":"string","enum":["only_repeats"],"description":"Set only when there is no winner for this reason: every finalist was the idea this client was shown last, so nothing new was left. The free slot or credit was given back."}},"required":["winner","why_it_won","runner_ups","judge_pick"],"additionalProperties":true},"WhyThisOne":{"type":"object","description":"Completed jobs with a winner: \"Why this idea and not the others?\". Built on every read from the stored result (never stored), so older results have it too. Every value is copied from the research data; a missing one is \"Not found\" or \"Not checked\". A sentence is only written when every value it compares is known and the winner is strictly better.","properties":{"intro":{"type":"string","description":"e.g. \"We drafted 24 ideas, checked 13 with real data, and picked this one.\" Unknown counts are left out."},"counts":{"$ref":"#/components/schemas/JobCounts"},"columns":{"type":"array","maxItems":3,"description":"The winner first, then up to 2 runner-ups. Empty when there were no runner-ups.","items":{"type":"object","properties":{"role":{"type":"string","enum":["winner","runner_up"]},"name":{"type":"string","description":"The idea name (AI suggestion)."},"cells":{"type":"array","description":"Always seven, in this order: money, searches, rank, trend, price, brands, domain.","items":{"type":"object","properties":{"id":{"type":"string","enum":["money","searches","rank","trend","price","brands","domain"]},"label":{"type":"string","description":"e.g. \"How hard to rank\"."},"value":{"type":"string","description":"e.g. \"1,900\", \"Easy\", \"Not found\"."},"unit":{"type":"string","description":"Small text after the value, e.g. \"/mo\"."},"sub":{"type":"string","description":"A small detail, e.g. \"12 of 100\" or the free domain name."},"tone":{"type":"string","enum":["good","caution","bad","neutral","missing"]}},"required":["id","label","value","tone"]}}},"required":["role","name","cells"]}},"sentences":{"type":"array","items":{"type":"string"},"maxItems":3,"description":"Plain comparisons from the values above, e.g. \"It has the most searches (1,900 a month vs 880 and 320).\""},"judge":{"anyOf":[{"type":"object","description":"The judge model's pick line (AI); null when the judge did not answer.","properties":{"text":{"type":"string"},"ai":{"type":"boolean","enum":[true]}},"required":["text","ai"]},{"type":"null"}]}},"required":["intro","counts","columns","sentences","judge"]},"ResultStats":{"type":"object","description":"Completed jobs with a winner: the result page's stat screen, built on every read from the stored idea (never stored). Every value is copied from the research data; a missing one is \"Not found\" (or \"Not checked\" when the check never ran).","properties":{"difficulty":{"anyOf":[{"type":"object","description":"The build difficulty (AI estimate); null when there is none.","properties":{"level":{"type":"string","enum":["easy","medium","hard"]},"label":{"type":"string"},"tone":{"type":"string","enum":["good","caution","bad"]},"ai_estimate":{"type":"boolean","enum":[true]}},"required":["level","label","tone","ai_estimate"]},{"type":"null"}]},"tiles":{"type":"array","description":"Always six, in this order: searches, trend, price, brands, domain, complaints.","items":{"type":"object","properties":{"id":{"type":"string","enum":["searches","trend","price","brands","domain","complaints"]},"label":{"type":"string","description":"e.g. \"Searches a month\"."},"value":{"type":"string","description":"e.g. \"1,900\", \"−16%\", \"Not found\"."},"unit":{"type":"string","description":"Small text after the value, e.g. \"/mo\"."},"sub":{"type":"string","description":"The detail and the source, e.g. \"Google, US · DataForSEO\"."},"tone":{"type":"string","enum":["good","caution","bad","neutral","missing"]},"badge":{"type":"string","enum":["free"]}},"required":["id","label","value","sub","tone"]}},"spark":{"anyOf":[{"type":"object","description":"Sparkline points: monthly Google searches (last 24), else weekly relative interest 0-100 (not searches). null with fewer than 2 real points.","properties":{"basis":{"type":"string","enum":["monthly","weekly"]},"points":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["label","value"]}}},"required":["basis","points"]},{"type":"null"}]}},"required":["difficulty","tiles","spark"]},"TregHelp":{"type":"object","properties":{"question":{"type":"string","const":"How can Treg help you build this?"},"log_available":{"type":"boolean","description":"false = the stored call log could not be read; `used` is then empty."},"used":{"type":"array","description":"What Treg did for this idea: the winner's Treg calls grouped by capability. Counts come from the call log.","items":{"type":"object","properties":{"capability":{"type":"string"},"providers":{"type":"array","items":{"type":"string"}},"calls":{"type":"integer","description":"Calls with status ok, counted from the log."},"failed":{"type":"integer","description":"Calls with status failed, counted from the log. Absent = none."}},"required":["capability","providers","calls"],"additionalProperties":false}},"next_steps":{"type":"array","description":"2 to 4 next steps with Treg, chosen by rules from the idea's own data (keyword, competitors, subreddits, buyer).","items":{"type":"object","properties":{"title":{"type":"string"},"detail":{"type":"string"},"tools":{"type":"array","items":{"type":"string"}}},"required":["title","detail","tools"],"additionalProperties":false}},"setup_url":{"type":"string","description":"The Set up Treg link, with the referral code."},"all_used":{"type":"array","description":"Every Treg call of the job (the research that found and checked the idea), grouped like `used`. Empty without the log.","items":{"type":"object","properties":{"capability":{"type":"string"},"providers":{"type":"array","items":{"type":"string"}},"calls":{"type":"integer","description":"Calls with status ok, counted from the log."},"failed":{"type":"integer","description":"Calls with status failed, counted from the log. Absent = none."}},"required":["capability","providers","calls"],"additionalProperties":false}},"summary":{"type":"string","description":"One plain sentence on what Treg did across the whole job, with the count of ok Treg calls."},"total_calls":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Ok Treg calls in the whole job log (RDAP left out). null = no log."},"short_steps":{"type":"array","items":{"type":"string"},"maxItems":3,"description":"2 or 3 one-line next steps in plain words, no vendor names."}},"required":["question","log_available","used","next_steps","setup_url","all_used","summary","total_calls","short_steps"],"additionalProperties":false,"description":"How can Treg help you build this? Completed jobs with a winner only; computed on every read, never stored."},"JobStatus":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["queued","researching","completed","failed","cancelled"]},"stage":{"anyOf":[{"type":"string","enum":["explore","demand","finalists","choose"]},{"type":"null"}]},"data_mode":{"type":"string","enum":["live","fixture"]},"input":{"$ref":"#/components/schemas/JobInput"},"defaults_applied":{"type":"array","items":{"type":"string","enum":["hint","skills","budget","time","region"]}},"created_at":{"type":"string","format":"date-time"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"counts":{"$ref":"#/components/schemas/JobCounts"},"progress":{"anyOf":[{"type":"object","description":"Evidence so far while researching. Never an idea name, grade or pick.","additionalProperties":true},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/JobResult"},{"type":"null"}]},"totals":{"$ref":"#/components/schemas/RunTotals"},"error":{"$ref":"#/components/schemas/ApiError"},"billing":{"$ref":"#/components/schemas/JobBilling"},"treg_help":{"$ref":"#/components/schemas/TregHelp"},"build_prompt":{"type":"string","description":"Completed jobs with a winner: a ready-to-paste markdown prompt for an AI coding tool (Cursor, Claude Code, Lovable, v0). Built by a template from the stored idea on every read (no model call); every number in it is copied from the research data, or from the page `why_now` quotes."},"stats":{"$ref":"#/components/schemas/ResultStats"},"why_this_one":{"$ref":"#/components/schemas/WhyThisOne"},"why_now":{"$ref":"#/components/schemas/WhyNow"},"why_now_runner_ups":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/WhyNowLine"},"description":"By idea id: the published view of each runner-up that has one. Built on every read. Absent when none has, and when the operator has hidden it."}},"required":["job_id","status","stage","data_mode","input","defaults_applied","created_at","started_at","updated_at","finished_at","counts","result","totals"],"additionalProperties":false},"JobReport":{"type":"object","properties":{"job_id":{"type":"string"},"status":{"type":"string","enum":["queued","researching","completed","failed","cancelled"]},"data_mode":{"type":"string","enum":["live","fixture"]},"input":{"$ref":"#/components/schemas/JobInput"},"created_at":{"type":"string","format":"date-time"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"batches":{"type":"array","items":{"type":"object","additionalProperties":true}},"ideas":{"type":"array","items":{"$ref":"#/components/schemas/IdeaReport"}},"calls":{"type":"array","items":{"type":"object","additionalProperties":true}},"notices":{"type":"array","items":{"type":"object","additionalProperties":true}},"totals":{"$ref":"#/components/schemas/RunTotals"},"counts":{"$ref":"#/components/schemas/JobCounts"}},"required":["job_id","status","data_mode","input","created_at","finished_at","batches","ideas","calls","notices","totals","counts"],"additionalProperties":true},"CancelJobResponse":{"type":"object","properties":{"job_id":{"type":"string"},"cancelled":{"type":"boolean","description":"false = the job had already finished."},"status":{"anyOf":[{"type":"string","enum":["queued","researching","completed","failed","cancelled"]},{"type":"null"}]}},"required":["job_id","cancelled","status"],"additionalProperties":false}}}}