{"openapi":"3.0.3","info":{"title":"MainStreet — Reputation oracle for onchain AI agents","version":"0.3.0","description":"Reputation scoring (0-100) for AI agents on Base. Aggregates x402 Bazaar activity, ERC-8004 ReputationRegistry feedback, and ACP completions. Free reads, x402-paywalled live refresh.","contact":{"url":"https://github.com/philpof102-svg/mainstreet"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://avisradar-production.up.railway.app/api/agent","description":"MainStreet production"}],"paths":{"/score/{address}":{"get":{"summary":"Get reputation score for an onchain agent","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},{"name":"live","in":"query","schema":{"type":"string","enum":["1"]},"description":"Force fresh fetch via x402 paywall ($0.05 USDC)"}],"responses":{"200":{"description":"Score payload with metrics, source, snapshot date, resource path, price"},"402":{"description":"Payment required (live mode)"}}}},"/leaderboard":{"get":{"summary":"Get ranked leaderboard of all indexed agents","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":500}},{"name":"ecosystem","in":"query","schema":{"type":"string"}},{"name":"sparkline","in":"query","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"List of agents with score, metrics, description, resourcePath"}}}},"/snapshot/{placeId}":{"get":{"summary":"Google review snapshot for a real-world business (paid via x402, $0.10)","parameters":[{"name":"placeId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"402":{"description":"Payment required"}}}},"/compare":{"get":{"summary":"Head-to-head comparison of two agents","parameters":[{"name":"a","in":"query","required":true,"schema":{"type":"string"}},{"name":"b","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Winner, margin, recommendation, side-by-side metrics"}}}},"/movers":{"get":{"summary":"Top daily gainers and losers by score delta","responses":{"200":{"description":"gainers + losers arrays"}}}},"/featured":{"get":{"summary":"Selection of the week (trending/newcomer/volume/gem)","responses":{"200":{"description":"4 curated picks"}}}},"/search":{"get":{"summary":"Search agents by description/address/tags","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2}},{"name":"limit","in":"query","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Matching agents"}}}},"/recommend":{"get":{"summary":"Get similar agents (category + score band)","parameters":[{"name":"for","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":5}}],"responses":{"200":{"description":"Recommended agents with affinity rationale"}}}},"/history/{address}":{"get":{"summary":"Get score history time series","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}},{"name":"days","in":"query","schema":{"type":"integer","default":30,"maximum":90}}],"responses":{"200":{"description":"Daily score series"}}}},"/badge/claim":{"post":{"summary":"Claim an embeddable score badge (EIP-191 signed)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","message","signature"],"properties":{"address":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"}}}}}},"responses":{"200":{"description":"badgeUrl + embed snippet"},"401":{"description":"Signature does not match address"}}}},"/badge/{address}.svg":{"get":{"summary":"Embeddable SVG badge","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"SVG image"}}}},"/me":{"get":{"summary":"Proof of life — operator, MAIN token, ERC-8004 registries, surfaces","responses":{"200":{"description":"Full project proof payload"}}}},"/status":{"get":{"summary":"Live infrastructure state","responses":{"200":{"description":"x402 state, operator, token"}}}},"/health":{"get":{"summary":"Endpoints + capabilities discovery","responses":{"200":{"description":"All endpoints with auth/price"}}}},"/og.png":{"get":{"summary":"Dynamic OG image (leaderboard top-5 or per-agent if ?addr=)","parameters":[{"name":"addr","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"SVG image"}}}},"/frame/leaderboard":{"get":{"summary":"Farcaster Frame v2 for leaderboard","responses":{"200":{"description":"Frame meta HTML"}}}},"/tags":{"get":{"summary":"List top 100 tags across all indexed agents","responses":{"200":{"description":"Array of {tag, count}"}}}},"/tags/{tag}":{"get":{"summary":"Agents matching a tag, ranked by score","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","minLength":2}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}}],"responses":{"200":{"description":"Array of matching agents"}}}},"/webhook/subscribe":{"post":{"summary":"Subscribe to score-change webhook (30-day grace period free)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["subscriberAddr","watchAddr","webhookUrl"],"properties":{"subscriberAddr":{"type":"string"},"watchAddr":{"type":"string"},"webhookUrl":{"type":"string","description":"http(s) URL — private IPs blocked"},"thresholdDelta":{"type":"integer","default":5,"minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"Subscription active"},"400":{"description":"Invalid address/URL or SSRF block"},"429":{"description":"Rate limit (5/h/IP)"}}}},"/webhook/list":{"get":{"summary":"List subscriptions by subscriber","parameters":[{"name":"for","in":"query","required":true,"schema":{"type":"string","description":"0x address of subscriber"}}],"responses":{"200":{"description":"Subscription list"}}}}}}