{"openapi":"3.1.0","info":{"title":"Company Profiles Content API","version":"1.0.0","description":"Read published Company Profiles company research as complete JSON, HTML, or Markdown. Reads never start scans or fetch original websites. No signup or token is required."},"servers":[{"url":"https://companyprofiles.dev"}],"paths":{"/api/v1/search":{"get":{"operationId":"searchCompanies","summary":"Search saved company reports","description":"Searches the public saved catalog by company name, domain, and description. An empty query lists saved companies. No external search is performed.","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":200,"default":""},"example":"Stripe"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Saved company matches. An empty array means no saved match.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"},"example":{"query":"Stripe","count":1,"results":[{"domain":"stripe.com","name":"Stripe","description":"Payments and billing software for businesses.","updatedAt":"2026-11-08T12:00:00.000Z","productCount":2,"urls":{"html":"https://companyprofiles.dev/stripe.com","markdown":"https://companyprofiles.dev/stripe.com.md","json":"https://companyprofiles.dev/api/v1/pages/stripe.com","original":"https://stripe.com"}}]}}}},"400":{"description":"Invalid query or limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Search limit must be an integer from 1 to 100.","code":"INVALID_LIMIT"}}}},"429":{"description":"Read rate limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again shortly.","code":"RATE_LIMITED"}}}}}}},"/api/v1/pages/{domain}":{"get":{"operationId":"getCompanyPage","summary":"Read a complete saved Company Profiles company report","description":"The default JSON contains all published research plus full rendered HTML and Markdown. Text formats return the equivalent complete representation. Source URLs and citations are retained. A missing report returns 404 without starting research.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"},"example":"stripe.com","description":"Public company domain, for example stripe.com. Use this canonical identifier for REST requests."},{"name":"format","in":"query","schema":{"type":"string","enum":["json","html","markdown"],"default":"json"}}],"responses":{"200":{"description":"Complete published company report. Content type follows format.","headers":{"ETag":{"description":"Opaque representation revision; return in If-None-Match for conditional requests.","schema":{"type":"string"}},"Cache-Control":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}},"text/html":{"schema":{"type":"string"},"example":"<!doctype html><html lang=\"en\">...</html>"},"text/markdown":{"schema":{"type":"string"},"example":"# Stripe\n\nPayments and billing software for businesses.\n\n## Products\n..."}}},"304":{"description":"The client already has this representation."},"400":{"description":"Invalid domain, URL, or representation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Format must be json, html, or markdown.","code":"INVALID_FORMAT"}}}},"404":{"description":"No saved public report for this domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"This company does not have a saved Company Profiles report.","code":"NOT_INDEXED","domain":"newcompany.com","indexed":false}}}},"429":{"description":"Read rate limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Too many requests. Try again shortly.","code":"RATE_LIMITED"}}}}}}},"/api/v1/companies/{domain}":{"get":{"operationId":"getCompanyContext","summary":"Get structured customer context without starting research","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"include","in":"query","schema":{"type":"string"},"description":"summary, products, feedback, ads, marketing, activity, brand"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}}],"responses":{"200":{"description":"Saved company context with module coverage, per-module pagination, and sources.","content":{"application/json":{"schema":{"type":"object","required":["schema_version","company","modules","sources","delivery"],"properties":{"schema_version":{"const":"1.0"},"company":{"type":"object"},"modules":{"type":"object","properties":{"brand":{"type":"object","properties":{"status":{"enum":["available","partial","unavailable","not_collected"]},"checked_at":{"type":["string","null"],"format":"date-time"},"data":{"type":["object","null"],"properties":{"version":{"const":1},"checkedAt":{"type":["string","null"],"format":"date-time"},"status":{"enum":["available","partial","unavailable"]},"method":{"enum":["rendered_styles","stylesheet","saved_html"]},"colors":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[A-F0-9]{6}$"},"role":{"enum":["primary","accent","background","text","border","other"]},"label":{"type":"string"},"selector":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"confidence":{"enum":["high","medium","low"]},"observed":{"type":"boolean"}}}},"typography":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"role":{"enum":["heading","body","ui","mono","other"]},"family":{"type":"string"},"cssFamily":{"type":"string"},"weights":{"type":"array","items":{"type":"string"}},"styles":{"type":"array","items":{"type":"string"}},"assetUrls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Evidence references only; not licensed or guaranteed loadable font downloads."},"licenseStatus":{"const":"unknown"},"fallbackStack":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"confidence":{"enum":["high","medium","low"]},"observed":{"type":"boolean"}}}},"limitations":{"type":"array","items":{"type":"string"}}}},"coverage":{"type":"array","items":{"type":"object"}},"note":{"type":"string"}}}}},"sources":{"type":"array","items":{"type":"object"}},"delivery":{"type":"object"}}}}}},"400":{"description":"Invalid domain, modules, or pagination"},"404":{"description":"No saved company"},"429":{"description":"Rate limited"}}}},"/api/v1/enrich":{"post":{"operationId":"enrichCompanies","summary":"Read saved context for up to 25 domains; missing companies do not trigger scans","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domains"],"additionalProperties":false,"properties":{"domains":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string","maxLength":253}},"include":{"type":"array","minItems":1,"items":{"type":"string","enum":["summary","products","feedback","ads","marketing","activity","brand"]}},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"offset":{"type":"integer","minimum":0,"maximum":100000,"default":0}}}}}},"responses":{"200":{"description":"Per-domain ready, not_indexed, or invalid results, plus counts."},"400":{"description":"Invalid request"},"413":{"description":"Body exceeds 2 KB"},"429":{"description":"Rate limited"}}}}},"security":[],"components":{"schemas":{"BrandProfile":{"type":["object","null"],"properties":{"version":{"const":1},"checkedAt":{"type":["string","null"],"format":"date-time"},"status":{"enum":["available","partial","unavailable"]},"method":{"enum":["rendered_styles","stylesheet","saved_html"]},"colors":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[A-F0-9]{6}$"},"role":{"enum":["primary","accent","background","text","border","other"]},"label":{"type":"string"},"selector":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"confidence":{"enum":["high","medium","low"]},"observed":{"type":"boolean"}}}},"typography":{"type":"array","maxItems":16,"items":{"type":"object","properties":{"role":{"enum":["heading","body","ui","mono","other"]},"family":{"type":"string"},"cssFamily":{"type":"string"},"weights":{"type":"array","items":{"type":"string"}},"styles":{"type":"array","items":{"type":"string"}},"assetUrls":{"type":"array","items":{"type":"string","format":"uri"},"description":"Evidence references only; not licensed or guaranteed loadable font downloads."},"licenseStatus":{"const":"unknown"},"fallbackStack":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"confidence":{"enum":["high","medium","low"]},"observed":{"type":"boolean"}}}},"limitations":{"type":"array","items":{"type":"string"}}}},"Urls":{"type":"object","properties":{"html":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"},"json":{"type":"string","format":"uri"},"original":{"type":"string","format":"uri"}},"required":["html","markdown","json","original"],"additionalProperties":true},"SearchResult":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"productCount":{"type":"integer","minimum":0},"urls":{"$ref":"#/components/schemas/Urls"}},"required":["domain","name","description","updatedAt","urls"],"additionalProperties":true},"SearchResponse":{"type":"object","properties":{"query":{"type":"string"},"count":{"type":"integer","minimum":0},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}}},"required":["query","count","results"],"additionalProperties":true},"Source":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"},"type":{"type":"string"},"sourceFamily":{"type":"string"},"status":{"type":"string"},"url":{"type":"string","format":"uri"},"excerpt":{"type":"string"},"sourceExcerpt":{"type":"string"},"date":{"type":"string","format":"date-time"},"retrievedAt":{"type":"string","format":"date-time"}},"required":["id","url"],"additionalProperties":true},"EvidenceReference":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"excerpt":{"type":"string"},"claimId":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}},"additionalProperties":true},"Feature":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"confidence":{"type":"string"},"officialUrl":{"type":"string","format":"uri"},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceReference"}},"solutionIds":{"type":"array","items":{"type":"string"}}},"required":["name"],"additionalProperties":true},"Solution":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"confidence":{"type":"string"},"officialUrl":{"type":"string","format":"uri"},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceReference"}},"featureIds":{"type":"array","items":{"type":"string"}},"productIds":{"type":"array","items":{"type":"string"}},"solutionIds":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"Product":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"buyer":{"type":"string"},"category":{"type":"string"},"confidence":{"type":"string"},"evidenceLevel":{"type":"string"},"status":{"type":"string"},"officialUrl":{"type":"string","format":"uri"},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceReference"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}},"solutions":{"type":"array","items":{"$ref":"#/components/schemas/Solution"}},"overview":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"text":{"type":"string"},"kind":{"type":"string"}},"additionalProperties":true}},"catalogSummary":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"text":{"type":"string"}},"additionalProperties":true}},"required":["id","name","features","solutions"],"additionalProperties":true},"ProductGroup":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"confidence":{"type":"string"},"evidenceLevel":{"type":"string"},"status":{"type":"string"},"officialUrl":{"type":"string","format":"uri"},"productIds":{"type":"array","items":{"type":"string"}}},"required":["name","productIds"],"additionalProperties":true},"Feedback":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"type":{"type":"string"},"product":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"quote":{"type":"string"},"sourceExcerpt":{"type":"string"},"date":{"type":"string","format":"date-time"},"author":{"type":"string"},"context":{"type":"string"},"sourceFamily":{"type":"string"},"platform":{"type":"string"},"label":{"type":"string"},"confidence":{"type":"string"},"evidenceType":{"type":"string"},"status":{"type":"string"},"url":{"type":"string","format":"uri"},"categories":{"type":"array","items":{"type":"string"}},"verbatim":{"type":"boolean"}},"required":["text","url"],"additionalProperties":true},"Discovery":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"snippet":{"type":"string"},"sourceFamily":{"type":"string"},"platform":{"type":"string"},"access":{"type":"string"},"url":{"type":"string","format":"uri"},"date":{"type":"string","format":"date-time"},"retrievedAt":{"type":"string","format":"date-time"}},"required":["url"],"additionalProperties":true},"Contacts":{"type":"object","properties":{"version":{"const":1},"checkedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"pagesScanned":{"type":"integer","minimum":0},"emails":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"url":{"type":"string","format":"uri"},"label":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}},"required":["email","url","sourceUrl"],"additionalProperties":true}},"bookingLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"provider":{"type":"string"},"label":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}},"required":["url","provider","sourceUrl"],"additionalProperties":true}},"forms":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"label":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}},"required":["url","sourceUrl"],"additionalProperties":true}}},"required":["version","emails","bookingLinks","forms","pagesScanned"],"additionalProperties":true},"Report":{"type":"object","properties":{"schemaVersion":{"type":"integer"},"id":{"type":"string"},"companyId":{"type":"string"},"domain":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"contacts":{"anyOf":[{"$ref":"#/components/schemas/Contacts"},{"type":"null"}]},"brand":{"anyOf":[{"$ref":"#/components/schemas/BrandProfile"},{"type":"null"}]},"company":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"description":{"type":"string"},"domain":{"type":"string"}},"required":["name","domain"],"additionalProperties":true},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"productGroups":{"type":"array","items":{"$ref":"#/components/schemas/ProductGroup"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"claims":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"entityId":{"type":"string"},"statement":{"type":"string"},"text":{"type":"string"},"excerpt":{"type":"string"},"kind":{"type":"string"},"confidence":{"type":"string"}},"additionalProperties":true}},"solutions":{"type":"array","items":{"$ref":"#/components/schemas/Solution"}},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}},"marketing":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"sourceId":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"title":{"type":"string"},"text":{"type":"string"},"type":{"type":"string"},"url":{"type":"string","format":"uri"},"date":{"type":"string","format":"date-time"}},"additionalProperties":true}},"coverage":{"type":"array","items":{"type":"object","properties":{"sourceFamily":{"type":"string"},"platform":{"type":"string"},"state":{"type":"string"},"scope":{"type":"string"},"attempted":{"type":"integer"},"collected":{"type":"integer"},"discovered":{"type":"integer"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}},"required":["domain","company","products","sources"],"additionalProperties":true},"Complaints":{"type":"object","properties":{"version":{"type":"integer"},"domain":{"type":"string"},"companyName":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"xIdentity":{"anyOf":[{"type":"object","properties":{"state":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"handles":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"},"verifiedWebsite":{"type":"string","format":"uri"},"method":{"type":"string"},"verification":{"type":"string"},"profileId":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"}},"additionalProperties":true}}},"additionalProperties":true},{"type":"null"}]},"xLookbackDays":{"type":"integer"},"xFeedbackPolicy":{"type":"string"},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Feedback"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"}},"discoveries":{"type":"array","items":{"$ref":"#/components/schemas/Discovery"}},"coverage":{"type":"array","items":{"type":"object","properties":{"sourceFamily":{"type":"string"},"platform":{"type":"string"},"state":{"type":"string"},"scope":{"type":"string"},"attempted":{"type":"integer"},"collected":{"type":"integer"},"discovered":{"type":"integer"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}}},"required":["domain","evidence","sources","discoveries"],"additionalProperties":true},"Ad":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"headline":{"type":"string"},"text":{"type":"string"},"cta":{"type":"string"},"collectedBy":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"},"landingUrl":{"type":"string","format":"uri"},"advertiser":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"}},"additionalProperties":true},"creative":{"type":"object","properties":{"imageUrl":{"type":"string","format":"uri"},"videoUrl":{"type":"string","format":"uri"},"sourceImageUrl":{"type":"string","format":"uri"},"assetId":{"type":"string","pattern":"^[a-f0-9]{64}$"},"mimeType":{"type":"string"}},"additionalProperties":true},"firstSeen":{"type":"string","format":"date-time"},"lastSeen":{"type":"string","format":"date-time"},"collectedAt":{"type":"string","format":"date-time"},"retainedFromPrevious":{"type":"boolean"},"active":{"type":"boolean"},"landingPage":{"anyOf":[{"type":"object","properties":{"status":{"type":"string"},"title":{"type":"string"},"reason":{"type":"string"},"url":{"type":"string","format":"uri"},"finalUrl":{"type":"string","format":"uri"},"capturedAt":{"type":"string","format":"date-time"},"assetId":{"type":"string","pattern":"^[a-f0-9]{64}$"},"mimeType":{"type":"string"}},"additionalProperties":true},{"type":"null"}]}},"required":["sourceUrl"],"additionalProperties":true},"Ads":{"type":"object","properties":{"version":{"type":"integer"},"domain":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"coverage":{"type":"array","items":{"type":"object","properties":{"sourceFamily":{"type":"string"},"platform":{"type":"string"},"state":{"type":"string"},"scope":{"type":"string"},"attempted":{"type":"integer"},"collected":{"type":"integer"},"discovered":{"type":"integer"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}},"ads":{"type":"array","items":{"$ref":"#/components/schemas/Ad"}}},"required":["domain","ads"],"additionalProperties":true},"Activity":{"type":"object","properties":{"version":{"type":"integer"},"domain":{"type":"string"},"checkedAt":{"type":"string","format":"date-time"},"coverage":{"type":"array","items":{"type":"object","properties":{"sourceFamily":{"type":"string"},"platform":{"type":"string"},"state":{"type":"string"},"scope":{"type":"string"},"attempted":{"type":"integer"},"collected":{"type":"integer"},"discovered":{"type":"integer"},"limitations":{"type":"array","items":{"type":"string"}}},"additionalProperties":true}},"entries":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"kind":{"type":"string"},"url":{"type":"string","format":"uri"},"signals":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["published","modified","first_archived"]},"date":{"type":"string","format":"date-time"},"sourceName":{"type":"string"},"sourceUrl":{"type":"string","format":"uri"}},"required":["type","date","sourceUrl"],"additionalProperties":true}}},"required":["url","signals"],"additionalProperties":true}}},"required":["domain","entries"],"additionalProperties":true},"PageResponse":{"type":"object","properties":{"version":{"type":"integer"},"domain":{"type":"string"},"indexed":{"const":true},"publishedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"urls":{"$ref":"#/components/schemas/Urls"},"report":{"$ref":"#/components/schemas/Report"},"complaints":{"anyOf":[{"$ref":"#/components/schemas/Complaints"},{"type":"null"}]},"ads":{"anyOf":[{"$ref":"#/components/schemas/Ads"},{"type":"null"}]},"activity":{"anyOf":[{"$ref":"#/components/schemas/Activity"},{"type":"null"}]},"html":{"type":"string","description":"Complete server-rendered Company Profiles page, including every saved section."},"markdown":{"type":"string","description":"Complete source-linked Company Profiles report, independent of selected browser tab."}},"required":["domain","indexed","updatedAt","urls","report","complaints","ads","activity","html","markdown"],"additionalProperties":true},"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"domain":{"type":"string"},"indexed":{"const":false}},"required":["error","code"],"additionalProperties":true}}}}