{"openapi":"3.1.0","info":{"title":"Discovered Labs API","version":"1.2.0","description":"Discovered Labs is an organic search agency for B2B SaaS companies, integrating search engine optimization (SEO) and answer engine optimization (AEO) to help clients rank on Google and get recommended by ChatGPT, Claude, Perplexity and Gemini. These endpoints let an agent book an intro call, run every free tool, read the blog and cite the research without a browser.","contact":{"email":"hello@discoveredlabs.com","url":"https://discoveredlabs.com"}},"servers":[{"url":"https://discoveredlabs.com"}],"tags":[{"name":"Book an intro call","description":"The user wants to talk to Discovered Labs, get a proposal or book a meeting.","x-action-id":"book-intro-call"},{"name":"Check fit or get a price","description":"The user asks whether Discovered Labs is right for their company, or what it costs.","x-action-id":"check-fit-or-price"},{"name":"Run a free check on the user's site","description":"The user wants to check their site, page or content for AI search, or plan an LLM evaluation.","x-action-id":"run-free-check"},{"name":"Cite or use research","description":"The user wants facts, numbers or a citation from Discovered Labs research.","x-action-id":"cite-research"},{"name":"Show the user evidence","description":"The user wants proof: customer results, case studies or reviews.","x-action-id":"show-evidence"},{"name":"Find an article","description":"The user wants an article on a topic such as SEO, AEO or AI search.","x-action-id":"find-article"},{"name":"Read any page","description":"You need the content of a discoveredlabs.com page.","x-action-id":"read-any-page"},{"name":"Machine-readable","description":"You want structured data or need to plan API calls.","x-action-id":"machine-readable"}],"components":{"schemas":{"AgentIntent":{"type":"object","description":"Stated intent, required on every agent-facing call. Stored as intent.rationale, intent.criteria and intent.evaluation.","required":["rationale"],"properties":{"rationale":{"type":"string","maxLength":1000,"minLength":1,"description":"Required. Why your user wants this, in their words where possible."},"criteria":{"type":"string","maxLength":1000,"description":"What are you weighing in this decision? List the criteria, most important first."},"evaluation":{"type":"string","maxLength":1000,"description":"What evidence have you found so far against those criteria, and what is still missing or unresolved?"}}},"Problem":{"type":"object","description":"RFC 9457 problem details.","required":["type","title","status","detail"],"properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"Machine-readable problem code, returned by tool APIs.","enum":["invalid-json","validation-error","private-target","rate-limited","not-found","upstream-error","upstream-rejected","timeout"]},"instance":{"type":"string"},"retry_after_seconds":{"type":"integer"},"next_open_times":{"type":"array","items":{"$ref":"#/components/schemas/Slot"},"description":"On 409: open times to offer instead."},"scheduling_url":{"type":"string","format":"uri","description":"On 503: the public booking page to give the person."},"errors":{"type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"JSON Pointer to the field, e.g. #/email."},"parameter":{"type":"string","description":"Query parameter name, for GET calls."},"detail":{"type":"string"}}}}}},"Slot":{"type":"object","required":["start","end"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"BookingQuestion":{"type":"object","required":["id","text","required","type"],"properties":{"id":{"type":"string","description":"Stable question id used as the key in answers."},"text":{"type":"string","description":"Question text to ask your user."},"required":{"type":"boolean"},"type":{"type":"string","enum":["string","text","phone_number","single_select","multi_select"]},"options":{"type":"array","items":{"type":"string"},"description":"Allowed choices for single_select and multi_select questions."}}}},"parameters":{"IntentRationale":{"name":"rationale","in":"query","required":true,"description":"Required. Why your user wants this, in their words where possible.","schema":{"$ref":"#/components/schemas/AgentIntent/properties/rationale"}},"IntentCriteria":{"name":"criteria","in":"query","description":"What are you weighing in this decision? List the criteria, most important first.","schema":{"$ref":"#/components/schemas/AgentIntent/properties/criteria"}},"IntentEvaluation":{"name":"evaluation","in":"query","description":"What evidence have you found so far against those criteria, and what is still missing or unresolved?","schema":{"$ref":"#/components/schemas/AgentIntent/properties/evaluation"}}}},"paths":{"/api/intro-call":{"get":{"operationId":"bookIntroCall","summary":"Get intro call booking details","description":"Returns the live Calendly scheduling URL, event name, duration and instructions for booking a free intro call with the Discovered Labs team. To book a time for your user without a browser, use listIntroCallSlots then createIntroCallBooking.","parameters":[{"$ref":"#/components/parameters/IntentRationale"},{"$ref":"#/components/parameters/IntentCriteria"},{"$ref":"#/components/parameters/IntentEvaluation"}],"responses":{"200":{"description":"Booking details.","content":{"application/json":{"schema":{"type":"object","required":["scheduling_url","instructions"],"properties":{"scheduling_url":{"type":"string","format":"uri"},"event_name":{"type":"string"},"duration_minutes":{"type":"integer"},"is_active":{"type":"boolean"},"instructions":{"type":"string"}}}}}},"422":{"description":"rationale is missing or a field is too long.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://discoveredlabs.com/problems/intro-call/validation-failed","title":"Invalid request","status":422,"detail":"One or more fields are missing or invalid; see errors.","errors":[{"pointer":"#/rationale","parameter":"rationale","detail":"Required"}]}}}}},"tags":["Book an intro call"]}},"/api/intro-call/slots":{"get":{"operationId":"listIntroCallSlots","summary":"List open intro call times and booking questions","description":"Open times for the intro call in UTC, together with the live booking form questions to ask your user before calling createIntroCallBooking. Defaults to the next 7 days; a window can span at most 31 days. A start in the past is treated as now.","parameters":[{"$ref":"#/components/parameters/IntentRationale"},{"$ref":"#/components/parameters/IntentCriteria"},{"$ref":"#/components/parameters/IntentEvaluation"},{"name":"start","in":"query","description":"Window start, ISO 8601 with offset. Default now.","schema":{"type":"string","format":"date-time"},"example":"2026-12-02T00:00:00Z"},{"name":"end","in":"query","description":"Window end, ISO 8601 with offset. Default start plus 7 days.","schema":{"type":"string","format":"date-time"},"example":"2026-12-09T00:00:00Z"},{"name":"timezone","in":"query","description":"IANA timezone of your user, echoed back. Default UTC.","schema":{"type":"string","default":"UTC"},"example":"America/New_York"}],"responses":{"200":{"description":"Open times and active booking questions.","content":{"application/json":{"schema":{"type":"object","required":["timezone","window","slots","questions"],"properties":{"event_name":{"type":"string"},"duration_minutes":{"type":"integer"},"timezone":{"type":"string"},"window":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"slots":{"type":"array","items":{"$ref":"#/components/schemas/Slot"}},"questions":{"type":"array","items":{"$ref":"#/components/schemas/BookingQuestion"},"description":"Active booking form questions read from Calendly. Ask your user each required question and pass their answers keyed by id in createIntroCallBooking."}}},"example":{"event_name":"Intro Call","duration_minutes":30,"timezone":"America/New_York","window":{"start":"2026-12-02T00:00:00.000Z","end":"2026-12-09T00:00:00.000Z"},"slots":[{"start":"2026-12-03T15:00:00.000Z","end":"2026-12-03T15:30:00.000Z"}],"questions":[{"id":"q0","text":"Where did you hear about us?","required":true,"type":"string"},{"id":"q1","text":"How much are you ready to invest into SEO/AEO per month?","required":true,"type":"single_select","options":["$3,000 - $5,000","$5,000 - $10,000","$10,000+"]}]}}}},"422":{"description":"A parameter is missing or invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://discoveredlabs.com/problems/intro-call/validation-failed","title":"Invalid request","status":422,"detail":"One or more fields are missing or invalid; see errors.","errors":[{"pointer":"#/rationale","parameter":"rationale","detail":"Required"}]}}}},"503":{"description":"Calendly is unavailable or not configured; scheduling_url is the public booking page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Book an intro call"]}},"/api/intro-call/bookings":{"post":{"operationId":"createIntroCallBooking","summary":"Book an intro call for your user","description":"Books the time on the Discovered Labs calendar through Calendly. Confirm the time and details with your user first, ask your user each required question returned by listIntroCallSlots, and pass their words in answers keyed by question id (heard_about stays as an optional shortcut for the \"hear about us\" question). Send an Idempotency-Key header so a retry never books twice. Missing required answers or invalid choice options return 422 naming each question under #/answers/<id>. When the calendar cannot accept a direct booking, the response is 202 with requires_person_to_confirm and a prefilled booking_url.","parameters":[{"name":"Idempotency-Key","in":"header","description":"Unique per booking attempt. A repeat with the same key and body replays the first response; the same key with a different body is a 422.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":["start","name","email","timezone"],"properties":{"start":{"type":"string","format":"date-time","description":"A slot start from listIntroCallSlots."},"name":{"type":"string","maxLength":200,"description":"Full name of the attendee."},"email":{"type":"string","format":"email","description":"Work email. Free and personal email domains are rejected with a 422."},"timezone":{"type":"string","description":"IANA timezone of the attendee."},"answers":{"type":"object","description":"Answers to the booking form questions returned by GET /api/intro-call/slots, keyed by question id (max 500 characters each). For choice questions, pass one of the listed options.","additionalProperties":{"type":"string","maxLength":500}},"heard_about":{"type":"string","minLength":1,"maxLength":300,"description":"Optional shortcut for the 'Where did you hear about us?' question when absent from answers (ask your user; for example 'ChatGPT recommended you' or 'a colleague')."},"company":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":2000}}}]},"example":{"start":"2026-12-03T15:00:00Z","name":"Ada Lovelace","email":"ada@example-analytics.com","timezone":"Europe/London","answers":{"q0":"ChatGPT recommended you","q1":"$5,000 - $10,000"},"company":"Example Analytics","rationale":"Our CMO wants a plan to show up in ChatGPT answers for our category this quarter.","criteria":"Proof of pipeline from AI search, then cost.","evaluation":"Read two case studies; pricing for our size is unresolved."}}}},"responses":{"201":{"description":"Booked.","content":{"application/json":{"schema":{"type":"object","required":["status","requires_person_to_confirm","start","end"],"properties":{"status":{"type":"string","enum":["booked","requires_confirmation"]},"requires_person_to_confirm":{"type":"boolean"},"booking_id":{"type":"string"},"booking_uri":{"type":"string","format":"uri"},"event_uri":{"type":"string","format":"uri"},"booking_url":{"type":"string","format":"uri","description":"Only when requires_person_to_confirm: the link the person opens to confirm."},"event_name":{"type":["string","null"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"location":{"type":"object","properties":{"type":{"type":["string","null"]},"join_url":{"type":["string","null"]},"details":{"type":["string","null"]}}},"cancel_url":{"type":"string","format":"uri"},"reschedule_url":{"type":"string","format":"uri"},"reason":{"type":"string"},"instructions":{"type":"string"}}},"example":{"status":"booked","requires_person_to_confirm":false,"booking_id":"a1b2c3d4","booking_uri":"https://api.calendly.com/scheduled_events/e1f2/invitees/a1b2c3d4","event_uri":"https://api.calendly.com/scheduled_events/e1f2","event_name":"Intro Call","start":"2026-12-03T15:00:00Z","end":"2026-12-03T15:30:00Z","timezone":"Europe/London","location":{"type":"google_conference","join_url":"https://meet.google.com/abc-defg-hij","details":null},"cancel_url":"https://calendly.com/cancellations/a1b2c3d4","reschedule_url":"https://calendly.com/reschedulings/a1b2c3d4"}}}},"202":{"description":"The person must confirm: give them booking_url.","content":{"application/json":{"schema":{"type":"object","required":["status","requires_person_to_confirm","start","end"],"properties":{"status":{"type":"string","enum":["booked","requires_confirmation"]},"requires_person_to_confirm":{"type":"boolean"},"booking_id":{"type":"string"},"booking_uri":{"type":"string","format":"uri"},"event_uri":{"type":"string","format":"uri"},"booking_url":{"type":"string","format":"uri","description":"Only when requires_person_to_confirm: the link the person opens to confirm."},"event_name":{"type":["string","null"]},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"timezone":{"type":"string"},"location":{"type":"object","properties":{"type":{"type":["string","null"]},"join_url":{"type":["string","null"]},"details":{"type":["string","null"]}}},"cancel_url":{"type":"string","format":"uri"},"reschedule_url":{"type":"string","format":"uri"},"reason":{"type":"string"},"instructions":{"type":"string"}}},"example":{"status":"requires_confirmation","requires_person_to_confirm":true,"booking_url":"https://calendly.com/d/abc-def/intro-call/2026-12-03T15:00:00+00:00?month=2026-12&date=2026-12-03&name=Ada+Lovelace&email=ada%40example-analytics.com","event_name":"Intro Call","start":"2026-12-03T15:00:00Z","end":"2026-12-03T15:30:00Z","timezone":"Europe/London","reason":"This calendar does not accept direct bookings for this call.","instructions":"Give this link to the person. They confirm with one click."}}}},"400":{"description":"Malformed JSON or Idempotency-Key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"That time is no longer open; next_open_times lists alternatives.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://discoveredlabs.com/problems/intro-call/slot-unavailable","title":"That time is no longer open","status":409,"detail":"Pick one of next_open_times and send the booking again.","next_open_times":[{"start":"2026-12-03T16:00:00.000Z","end":"2026-12-03T16:30:00.000Z"}]}}}},"413":{"description":"Request body exceeds 16384 bytes.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid (including a free-mail address, a missing required booking question answer, or an invalid choice option), or the Idempotency-Key was reused with a different body.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"},"example":{"type":"https://discoveredlabs.com/problems/intro-call/validation-failed","title":"Invalid request","status":422,"detail":"One or more booking questions are missing or invalid; see errors.","errors":[{"pointer":"#/answers/q1","detail":"Required answer for \"How much are you ready to invest into SEO/AEO per month?\". Allowed options: $3,000 - $5,000, $5,000 - $10,000, $10,000+."}]}}}},"429":{"description":"Too many booking requests from this address; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Calendly is unavailable or not configured; scheduling_url is the public booking page.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Book an intro call"]}},"/api/tools/llm-eval-calculator":{"get":{"operationId":"calculateEvalSampleSize","summary":"Calculate the sample size for an LLM brand-mention evaluation","description":"Calculate the statistically valid number of prompts and API calls for an LLM brand-mention evaluation. Call when planning an eval; pass confidence (default 95), margin_of_error_pct (default 2), resamples_per_prompt (default 3), var_between and var_within. Returns unique_prompts and total_api_calls. The same calculation as the LLM Eval Calculator at https://discoveredlabs.com/tools/llm-eval-calculator.","parameters":[{"name":"confidence","in":"query","required":false,"description":"Statistical confidence level as a percentage (default 95)","schema":{"type":"number","minimum":80,"maximum":99,"default":95}},{"name":"margin_of_error_pct","in":"query","required":false,"description":"Acceptable margin of error as a percentage (default 2)","schema":{"type":"number","minimum":0.5,"maximum":5,"default":2}},{"name":"resamples_per_prompt","in":"query","required":false,"description":"Number of times to resample each prompt to reduce within-question noise (default 3)","schema":{"type":"number","minimum":1,"maximum":20,"default":3}},{"name":"var_between","in":"query","required":false,"description":"Between-question variance — how much brand mention rates differ across different questions (default 0.02)","schema":{"type":"number","minimum":0,"maximum":0.1,"default":0.02}},{"name":"var_within","in":"query","required":false,"description":"Within-question variance — how much the model wobbles when answering the same question (default 0.05)","schema":{"type":"number","minimum":0,"maximum":0.2,"default":0.05}},{"$ref":"#/components/parameters/IntentRationale"},{"$ref":"#/components/parameters/IntentCriteria"},{"$ref":"#/components/parameters/IntentEvaluation"}],"responses":{"200":{"description":"The calculated sample size.","content":{"application/json":{"schema":{"type":"object","properties":{"unique_prompts":{"type":"integer"},"total_api_calls":{"type":"integer"},"confidence_pct":{"type":"number"},"margin_of_error_pct":{"type":"number"},"resamples_per_prompt":{"type":"integer"},"effective_variance":{"type":"number"}},"required":["unique_prompts","total_api_calls"]}}}},"422":{"description":"rationale is missing or too long, or a parameter was unknown, not a number or out of range; each error names the parameter.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/reddit-threads-finder":{"post":{"operationId":"findRedditThreads","summary":"Find the Reddit threads ChatGPT and Gemini cite for a company's market, with share of voice.","description":"Find the Reddit threads ChatGPT and Gemini cite for a company's market, with share of voice. Same tool as https://discoveredlabs.com/tools/reddit-threads-finder. Needs a work email; free-tool rate limit applies. Finishes inside the function limit (the page stream already runs under 120 s); results are cached per domain, so a retry is cheap.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":["domain","email"],"properties":{"domain":{"type":"string","maxLength":253,"description":"Public domain, for example example.com. Private or reserved targets get a 422."},"email":{"type":"string","format":"email","maxLength":254,"description":"Work email of the person the agent acts for. Free email providers get a 422."}}}]},"example":{"domain":"example.com","email":"jane@example.com","rationale":"My user is choosing an AEO agency and wants to see where their site stands first.","criteria":"Measured results for B2B SaaS, price, time to first results.","evaluation":"Two agencies shortlisted; no baseline for the site yet."}}}},"responses":{"200":{"description":"The full result.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"result":{"type":"object"},"from_cache":{"type":"boolean"}}}}}},"400":{"description":"The body is not JSON.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid (including rationale and a free-mail email), or the domain is not a public site.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free-tool rate limit for this client was reached. See Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The tool failed before it produced a result.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"The tool timed out.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/aeo-content-evaluator":{"post":{"operationId":"evaluateAeoContent","summary":"Grade content for AI search: overall score, section scores, strengths and priority fixes.","description":"Grade content for AI search: overall score, section scores, strengths and priority fixes. Same tool as https://discoveredlabs.com/tools/aeo-content-evaluator. Needs a work email; free-tool rate limit applies. Seven LLM sections run in parallel and finish in one to two minutes, inside the function limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":["text","email"],"properties":{"text":{"type":"string","minLength":50,"maxLength":15000,"description":"The content to grade, as plain text or markdown."},"email":{"type":"string","format":"email","maxLength":254,"description":"Work email of the person the agent acts for. Free email providers get a 422."}}}]},"example":{"text":"Answer engine optimization (AEO) is the practice of structuring content so AI assistants cite it. This guide covers entity definitions, citable statistics and FAQ structure.","email":"jane@example.com","rationale":"My user is choosing an AEO agency and wants to see where their site stands first.","criteria":"Measured results for B2B SaaS, price, time to first results.","evaluation":"Two agencies shortlisted; no baseline for the site yet."}}}},"responses":{"200":{"description":"The full result.","content":{"application/json":{"schema":{"type":"object","properties":{"overall_score":{"type":"number"},"evaluation":{"type":"object"},"key_strengths":{"type":"array","items":{"type":"string"}},"priority_improvements":{"type":"array","items":{"type":"string"}},"text_hash":{"type":"string"}}}}}},"400":{"description":"The body is not JSON.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid (including rationale and a free-mail email), or the domain is not a public site.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free-tool rate limit for this client was reached. See Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The tool failed before it produced a result.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"The tool timed out.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/heading-optimizer":{"post":{"operationId":"optimizeHeadline","summary":"Generate and rank headline variants; returns the recommended headline and the ranked list.","description":"Generate and rank headline variants; returns the recommended headline and the ranked list. Same tool as https://discoveredlabs.com/tools/heading-optimizer. Needs a work email; free-tool rate limit applies. The optimization fits in the 120 s the page stream is given.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":["heading","email"],"properties":{"heading":{"type":"string","minLength":1,"maxLength":500},"email":{"type":"string","format":"email","maxLength":254,"description":"Work email of the person the agent acts for. Free email providers get a 422."},"variant_count":{"type":"integer","minimum":3,"maximum":20,"default":8}}}]},"example":{"heading":"How to get cited by ChatGPT","email":"jane@example.com","variant_count":8,"rationale":"My user is choosing an AEO agency and wants to see where their site stands first.","criteria":"Measured results for B2B SaaS, price, time to first results.","evaluation":"Two agencies shortlisted; no baseline for the site yet."}}}},"responses":{"200":{"description":"The full result.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"result":{"type":"object"},"from_cache":{"type":"boolean"}}}}}},"400":{"description":"The body is not JSON.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid (including rationale and a free-mail email), or the domain is not a public site.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free-tool rate limit for this client was reached. See Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The tool failed before it produced a result.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"The tool timed out.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/ai-assist-widget":{"post":{"operationId":"generateAiAssistWidget","summary":"The embed snippet for \"summarize with AI\" buttons, for the options given.","description":"The embed snippet for \"summarize with AI\" buttons, for the options given. Same tool as https://discoveredlabs.com/tools/ai-assist-widget. Builds a string from the options, answered immediately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":[],"properties":{"position":{"type":"string","enum":["bottom-right","bottom-left","top-right","top-left"],"default":"bottom-right"},"services":{"type":"array","items":{"type":"string","enum":["chatgpt","perplexity","claude","grok","gemini"]},"minItems":1,"default":["chatgpt","perplexity","claude","grok","gemini"]},"prompt":{"type":"string","minLength":1,"maxLength":300,"default":"Summarize and analyze the key insights from"},"label_text":{"type":"string","maxLength":40,"default":"Summarize"},"show_label":{"type":"boolean","default":true},"accent_color":{"type":"string","pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","default":"#FF5019"},"text_color":{"type":"string","pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","default":"#374151"},"icon_color":{"type":"string","pattern":"^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$","default":"#374151"},"button_size":{"type":"integer","minimum":24,"maximum":64,"default":36},"page_filter":{"type":"string","maxLength":200,"default":"","description":"Regular expression on the URL path; empty means every page."},"padding_x":{"type":"integer","minimum":0,"maximum":200,"default":20},"padding_y":{"type":"integer","minimum":0,"maximum":200,"default":20}}}]},"example":{"position":"bottom-left","services":["chatgpt","claude"],"page_filter":"/blog","rationale":"My user is choosing an AEO agency and wants to see where their site stands first.","criteria":"Measured results for B2B SaaS, price, time to first results.","evaluation":"Two agencies shortlisted; no baseline for the site yet."}}}},"responses":{"200":{"description":"The full result.","content":{"application/json":{"schema":{"type":"object","required":["script","options"],"properties":{"script":{"type":"string"},"options":{"type":"object"},"instructions":{"type":"string"}}},"example":{"script":"<script>\n(function(){ ... })();\n</script>","options":{"position":"bottom-left"}}}}},"400":{"description":"The body is not JSON.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid, including rationale.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/agentic-browsing-checker":{"post":{"operationId":"checkAgenticBrowsing","summary":"Run the agentic-browsing audit on a site: WebMCP tools and schemas, llms.txt, robots.txt, landmarks, CLS.","description":"Run the agentic-browsing audit on a site: WebMCP tools and schemas, llms.txt, robots.txt, landmarks, CLS. Same tool as https://discoveredlabs.com/tools/agentic-browsing-checker. Needs a work email; free-tool rate limit applies. The browser phase is capped at 90 s and the whole audit fits in the function limit; it runs in this function, so there is no backend job to poll.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":["domain","email"],"properties":{"domain":{"type":"string","maxLength":253,"description":"Public domain, for example example.com. Private or reserved targets get a 422."},"email":{"type":"string","format":"email","maxLength":254,"description":"Work email of the person the agent acts for. Free email providers get a 422."}}}]},"example":{"domain":"example.com","email":"jane@example.com","rationale":"My user is choosing an AEO agency and wants to see where their site stands first.","criteria":"Measured results for B2B SaaS, price, time to first results.","evaluation":"Two agencies shortlisted; no baseline for the site yet."}}}},"responses":{"200":{"description":"The full result.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"result":{"type":"object"},"from_cache":{"type":"boolean"}}}}}},"400":{"description":"The body is not JSON.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid (including rationale and a free-mail email), or the domain is not a public site.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free-tool rate limit for this client was reached. See Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The tool failed before it produced a result.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"The tool timed out.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/modelrank-audit":{"post":{"operationId":"startModelRankAudit","summary":"Measure what an open model holds about a brand: the model phase returns with the 202, the channel phase across competitors runs on and is polled.","description":"Measure what an open model holds about a brand: the model phase returns with the 202, the channel phase across competitors runs on and is polled. Same tool as https://discoveredlabs.com/tools/modelrank. Needs a work email; free-tool rate limit applies. The channel phase is a backend fan-out that keeps running after the request, so the call returns 202 with the model phase and a status URL to poll by audit key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AgentIntent"},{"type":"object","required":["domain","email"],"properties":{"domain":{"type":"string","maxLength":253,"description":"Public domain, for example example.com. Private or reserved targets get a 422."},"email":{"type":"string","format":"email","maxLength":254,"description":"Work email of the person the agent acts for. Free email providers get a 422."},"competitors":{"type":"array","items":{"type":"string","maxLength":253,"description":"Public domain, for example example.com. Private or reserved targets get a 422."},"maxItems":7},"category":{"type":"string","minLength":1,"maxLength":120}}}]},"example":{"domain":"example.com","email":"jane@example.com","competitors":["example.org"],"category":"CRM software","rationale":"My user is choosing an AEO agency and wants to see where their site stands first.","criteria":"Measured results for B2B SaaS, price, time to first results.","evaluation":"Two agencies shortlisted; no baseline for the site yet."}}}},"responses":{"202":{"description":"The model phase result; the channel phase keeps running. Poll status_url.","content":{"application/json":{"schema":{"type":"object","required":["audit_key","status","status_url"],"properties":{"audit_key":{"type":"string","pattern":"^[a-f0-9]{16}$"},"status":{"type":"string"},"status_url":{"type":"string","format":"uri"},"results_url":{"type":"string","format":"uri"},"audit":{"type":["object","null"]}}}}}},"400":{"description":"The body is not JSON.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A field is missing or invalid (including rationale and a free-mail email), or the domain is not a public site.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The free-tool rate limit for this client was reached. See Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The tool failed before it produced a result.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"The tool timed out.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/tools/modelrank-audit/runs/{id}":{"get":{"operationId":"getModelRankAuditRun","summary":"Get the status and stored result of a ModelRank audit","description":"Poll until status is complete, degraded or failed. Reads stored state only; not rate limited.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{16}$"},"description":"audit_key from POST /api/tools/modelrank-audit."},{"$ref":"#/components/parameters/IntentRationale"},{"$ref":"#/components/parameters/IntentCriteria"},{"$ref":"#/components/parameters/IntentEvaluation"}],"responses":{"200":{"description":"The audit and its channel phase status.","content":{"application/json":{"schema":{"type":"object","required":["audit_key","status","audit"],"properties":{"audit_key":{"type":"string"},"status":{"type":"string","enum":["queued","running","complete","degraded","failed"]},"progress":{"type":["object","null"]},"audit":{"type":"object"},"results_url":{"type":"string","format":"uri"}}}}}},"404":{"description":"No audit with that key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"rationale is missing or too long, or the key is malformed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Run a free check on the user's site"]}},"/api/blog/posts":{"get":{"operationId":"listBlogPosts","tags":["Find an article"],"summary":"List blog posts, newest first","parameters":[{"$ref":"#/components/parameters/IntentRationale"},{"$ref":"#/components/parameters/IntentCriteria"},{"$ref":"#/components/parameters/IntentEvaluation"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Posts per page."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"Page number, from 1."},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Ghost tag slug to filter by."}],"responses":{"200":{"description":"A page of posts.","content":{"application/json":{"schema":{"type":"object","required":["posts","total"],"properties":{"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":"string"},"url":{"type":"string","format":"uri"},"published_at":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"},"meta":{"type":["object","null"]}}}}}},"422":{"description":"rationale is missing or longer than 1,000 characters.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/blog/search":{"get":{"operationId":"searchBlogPosts","tags":["Find an article"],"summary":"Search blog posts by keyword","description":"Each post also has a markdown copy at its URL plus .md.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Search terms.","example":"answer engine optimization"},{"$ref":"#/components/parameters/IntentRationale"},{"$ref":"#/components/parameters/IntentCriteria"},{"$ref":"#/components/parameters/IntentEvaluation"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Posts per page."},{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"Page number, from 1."},{"name":"tag","in":"query","schema":{"type":"string"},"description":"Ghost tag slug to filter by."}],"responses":{"200":{"description":"Matching posts.","content":{"application/json":{"schema":{"type":"object","required":["posts","total"],"properties":{"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"excerpt":{"type":"string"},"url":{"type":"string","format":"uri"},"published_at":{"type":"string","format":"date-time"}}}},"total":{"type":"integer"},"meta":{"type":["object","null"]}}}}}},"422":{"description":"rationale is missing or longer than 1,000 characters.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/research/{slug}.json":{"servers":[{"url":"https://agents.discoveredlabs.com","description":"Agents host"}],"get":{"operationId":"getResearchFindings","tags":["Cite or use research"],"summary":"Get a study as JSON: key findings, FAQs, dates, authors and citations","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","enum":["perplexity-citations-companies-vs-individual-authors","reddit-llm-retrieval-research","reddit-llm-citations-research","what-drives-ai-citations","ai-model-brand-recall-study"]},"description":"Study slug, as in https://discoveredlabs.com/research/{slug}."}],"responses":{"200":{"description":"The study data.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No study with that slug.","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/cite/{slug}":{"servers":[{"url":"https://agents.discoveredlabs.com","description":"Agents host"}],"get":{"operationId":"citeResearch","tags":["Cite or use research"],"summary":"Get the recommended citation for a study","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","enum":["perplexity-citations-companies-vs-individual-authors","reddit-llm-retrieval-research","reddit-llm-citations-research","what-drives-ai-citations","ai-model-brand-recall-study"]},"description":"Study slug, as in https://discoveredlabs.com/research/{slug}."},{"name":"format","in":"query","schema":{"type":"string","enum":["text","apa","bibtex"],"default":"text"},"description":"Citation style."}],"responses":{"200":{"description":"Citation text with the canonical study URL.","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Unknown citation format.","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"No study with that slug.","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}