{"openapi":"3.1.0","info":{"title":"StackGo Contact API","version":"0.1.0","description":"Extract structured public business contact information from any public business website. Returns company name, emails, phone numbers, social profiles, postal addresses, and contact pages as structured JSON. $0.05 per request via x402 on Base.","contact":{"email":"contact@stackgoai.com"},"x-guidance":"POST /api/v1/extract-contact with JSON body {\"url\": \"https://example.com\"} — a public business website URL. Returns structured public business contact information (company name, emails, phones, social links, postal addresses, contact pages). Price: $0.05 per request via x402 (scheme: exact) on eip155:8453 (Base mainnet). Health/readiness endpoints are free; only the extraction endpoint is paid."},"servers":[{"url":"https://api.stackgoai.com","description":"API origin"}],"tags":[{"name":"health","description":"Health operations"},{"name":"contact","description":"Business contact extraction"}],"paths":{"/api/healthz":{"get":{"operationId":"healthCheck","tags":["health"],"summary":"Health check","description":"Returns server health status","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/api/health":{"get":{"operationId":"health","tags":["health"],"summary":"Health check","description":"Returns server health status","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/api/ready":{"get":{"operationId":"readinessCheck","tags":["health"],"summary":"Readiness check","description":"Reports whether payment configuration is valid enough to serve paid traffic","security":[],"responses":{"200":{"description":"Ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessStatus"}}}},"503":{"description":"Not ready — payment configuration incomplete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessStatus"}}}}}}},"/api/v1/extract-contact":{"post":{"operationId":"extractContact","tags":["contact"],"summary":"Extract public business contact information from a website","description":"Securely fetches the submitted public business website (homepage plus up to 3 likely contact/about/support pages on the same domain) and returns publicly available business contact information as structured JSON.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractContactRequest"}}}},"responses":{"200":{"description":"Extraction result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactExtractionResult"}}}},"400":{"description":"Invalid input or prohibited target","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Payment required — request is valid but unpaid. The response body contains machine-readable x402 payment requirements."},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"422":{"description":"Fetch or processing failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service not configured for payments (fail-closed) or temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-x402":{"method":"POST","path":"/api/v1/extract-contact","price":"$0.05","network":"eip155:8453","scheme":"exact"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"HealthStatus":{"type":"object","properties":{"status":{"type":"string"}},"required":["status"]},"ReadinessStatus":{"type":"object","properties":{"status":{"type":"string"},"problems":{"type":"array","items":{"type":"string"}}},"required":["status"]},"ExtractContactRequest":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2048,"description":"Public http(s) business website URL","examples":["https://example.com"]}},"required":["url"]},"SourcedValue":{"type":"object","properties":{"value":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["value","sourceUrl"]},"SocialLinks":{"type":"object","properties":{"linkedin":{"type":"array","items":{"type":"string"}},"facebook":{"type":"array","items":{"type":"string"}},"instagram":{"type":"array","items":{"type":"string"}},"x":{"type":"array","items":{"type":"string"}},"youtube":{"type":"array","items":{"type":"string"}}},"required":["linkedin","facebook","instagram","x","youtube"]},"PostalAddress":{"type":"object","properties":{"streetAddress":{"type":"string"},"addressLocality":{"type":"string"},"addressRegion":{"type":"string"},"postalCode":{"type":"string"},"addressCountry":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["sourceUrl"]},"ContactExtractionResult":{"type":"object","properties":{"success":{"type":"boolean"},"inputUrl":{"type":"string"},"domain":{"type":"string"},"companyName":{"type":["string","null"]},"emails":{"type":"array","items":{"$ref":"#/components/schemas/SourcedValue"}},"phones":{"type":"array","items":{"$ref":"#/components/schemas/SourcedValue"}},"socials":{"$ref":"#/components/schemas/SocialLinks"},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/PostalAddress"}},"contactPages":{"type":"array","items":{"type":"string"}},"pagesScanned":{"type":"array","items":{"type":"string"}},"meta":{"type":"object","properties":{"pagesFetched":{"type":"number"},"durationMs":{"type":"number"}},"required":["pagesFetched","durationMs"]},"requestId":{"type":"string"}},"required":["success","inputUrl","domain","companyName","emails","phones","socials","addresses","contactPages","pagesScanned","meta","requestId"]},"ApiError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_URL","PRIVATE_ADDRESS","FETCH_FAILED","UNSUPPORTED_CONTENT_TYPE","RESPONSE_TOO_LARGE","TIMEOUT","RATE_LIMITED","INTERNAL_ERROR"]},"message":{"type":"string"}},"required":["code","message"]},"requestId":{"type":"string"}},"required":["success","error","requestId"]}}}}