{"openapi":"3.1.1","info":{"title":"Rivalead Public Market API","version":"1.0.0","description":"Read published SaaS changes, pricing snapshots, and competitor comparisons without a workspace."},"servers":[{"url":"https://rivalead.com/api/v1"}],"externalDocs":{"description":"Rivalead developer docs","url":"https://rivalead.com/developers"},"paths":{"/changes":{"get":{"operationId":"listMarketChanges","summary":"List the latest published SaaS changes, newest first.","description":"List the latest published SaaS changes, newest first.","parameters":[{"name":"domain","in":"query","description":"Company hostname, for example example.com.","schema":{"type":"string","maxLength":255,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$"}},{"name":"family","in":"query","description":"Type of market change to include.","schema":{"type":"string","enum":["pricing","product","positioning"]}},{"name":"limit","in":"query","description":"Maximum changes to return.","schema":{"type":"integer","minimum":1,"maximum":50,"default":15}}],"responses":{"200":{"description":"Public market data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeFeed"}}}},"400":{"description":"Invalid parameter. The response includes a hint for retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The data source is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/changes/{slug}":{"get":{"operationId":"getMarketChange","summary":"Get one published market change with before-and-after evidence.","description":"Get one published market change with before-and-after evidence.","parameters":[{"name":"slug","in":"path","required":true,"description":"Report slug returned by listMarketChanges.","schema":{"type":"string","pattern":"^[a-z0-9-]{2,120}$"}}],"responses":{"200":{"description":"Public market data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketChange"}}}},"400":{"description":"Invalid parameter. The response includes a hint for retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No published record matched the identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The data source is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/pricing-history/{domain}":{"get":{"operationId":"getCompanyPricingHistory","summary":"Get a company's published pricing snapshot and recorded pricing changes.","description":"Get a company's published pricing snapshot and recorded pricing changes.","parameters":[{"name":"domain","in":"path","required":true,"description":"Company hostname without a scheme or path.","schema":{"type":"string","maxLength":255,"pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$"}}],"responses":{"200":{"description":"Public market data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPricingHistory"}}}},"400":{"description":"Invalid parameter. The response includes a hint for retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No published record matched the identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The data source is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/compare/{slug}":{"get":{"operationId":"getPricingComparison","summary":"Get a published side-by-side SaaS pricing comparison.","description":"Get a published side-by-side SaaS pricing comparison.","parameters":[{"name":"slug","in":"path","required":true,"description":"Comparison slug from a Rivalead comparison page.","schema":{"type":"string","pattern":"^[a-z0-9.-]{1,200}-vs-[a-z0-9.-]{1,200}$"}}],"responses":{"200":{"description":"Public market data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingComparison"}}}},"400":{"description":"Invalid parameter. The response includes a hint for retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No published record matched the identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The data source is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}},"required":["code","message","hint"]}},"required":["error"]},"ChangeSummary":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"company":{"type":"string"},"domain":{"type":"string"},"family":{"type":"string"},"published_at":{"type":"string","format":"date-time"},"report_url":{"type":"string","format":"uri"},"source_url":{"type":["string","null"],"format":"uri"}},"required":["slug","title","summary","company","domain","family","published_at","report_url","source_url"]},"ChangeFeed":{"type":"object","properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/ChangeSummary"}},"total":{"type":"integer","minimum":0}},"required":["changes","total"]},"MarketChange":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"company":{"type":"string"},"domain":{"type":"string"},"family":{"type":"string"},"published_at":{"type":"string","format":"date-time"},"report_url":{"type":"string","format":"uri"},"source_url":{"type":["string","null"],"format":"uri"},"why":{"type":"string"},"detected_at":{"type":"string","format":"date-time"},"before":{"type":"array","items":{"type":"string"}},"after":{"type":"array","items":{"type":"string"}},"key_changes":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"before":{"type":"string"},"after":{"type":"string"}},"required":["label","before","after"]}}},"required":["slug","title","summary","company","domain","family","published_at","report_url","source_url","why","detected_at","before","after","key_changes"]},"PricingTier":{"type":"object","properties":{"plan":{"type":"string"},"price":{"type":"string"},"monthly":{"type":["number","null"]},"symbol":{"type":"string"},"period":{"type":"string"},"note":{"type":"string"}},"required":["plan","price","monthly","symbol","period","note"]},"CompanyPricing":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"currency":{"type":"string"},"last_checked":{"type":["string","null"]},"pricing_url":{"type":["string","null"],"format":"uri"},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/PricingTier"}}},"required":["name","domain","currency","last_checked","pricing_url","tiers"]},"CompanyPricingHistory":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"currency":{"type":"string"},"last_checked":{"type":["string","null"]},"pricing_url":{"type":["string","null"],"format":"uri"},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/PricingTier"}},"url":{"type":"string","format":"uri"},"history":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"headline":{"type":"string"},"report_url":{"type":["string","null"],"format":"uri"}},"required":["date","headline","report_url"]}}},"required":["name","domain","currency","last_checked","pricing_url","tiers","url","history"]},"PricingComparison":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"updated_at":{"type":["string","null"]},"a":{"$ref":"#/components/schemas/CompanyPricing"},"b":{"$ref":"#/components/schemas/CompanyPricing"},"verdict":{"type":"object","properties":{"headline":{"type":"string"},"summary":{"type":"string"},"entry_price_winner":{"type":["string","null"]}},"required":["headline","summary","entry_price_winner"]}},"required":["slug","url","updated_at","a","b","verdict"]}}}}