{"openapi":"3.1.0","info":{"title":"SPG Runner","version":"3.1"},"paths":{"/health":{"get":{"summary":"Health","description":"Liveness plus egress readiness.\n\nReturns HTTP 503 with ``status: \"degraded\"`` when the shared WARP network\nnamespace cannot resolve DNS or reach Cloudflare through the SOCKS5 tunnel.\nThe compose healthcheck, the smoke test and operators all read this; a bare\n``{\"status\": \"ok\"}`` hid a dead warp-svc for three days in September 2026.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics","description":"Get request metrics and statistics.","operationId":"metrics_metrics_get","parameters":[{"name":"x-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Metrics Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics/reset":{"post":{"summary":"Metrics Reset","description":"Reset all metrics (for testing).","operationId":"metrics_reset_metrics_reset_post","parameters":[{"name":"x-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Metrics Reset Metrics Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/soax-log":{"post":{"summary":"Soax Log","description":"Record SOAX Webdata API call from gateway (fire-and-forget).","operationId":"soax_log_soax_log_post","parameters":[{"name":"x-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoaxLogPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Soax Log Soax Log Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/soax-stats":{"get":{"summary":"Soax Stats","description":"Get SOAX usage stats from Redis.","operationId":"soax_stats_soax_stats_get","parameters":[{"name":"x-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Soax Stats Soax Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/screenshot":{"post":{"summary":"Screenshot","description":"Take screenshot of URL using Playwright via WARP proxy.","operationId":"screenshot_screenshot_post","parameters":[{"name":"x-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/execute":{"post":{"summary":"Execute","operationId":"execute_execute_post","parameters":[{"name":"x-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Payload":{"properties":{"url":{"type":"string","title":"Url"},"method":{"type":"string","title":"Method","default":"GET"},"service_type":{"type":"string","enum":["general","google_serp","google_serp_full","youtube_transcript","youtube_serp","youtube_video_info","similarweb","twitter","twitter_user","twitter_timeline","instagram","instagram_engagement","tiktok","tiktok_user","tiktok_engagement","tiktok_video","tiktok_actor_video","tiktok_actor_profile","celebritynetworth","celebheights","personality_db","whosdatedwho"],"title":"Service Type","default":"general"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"strategy":{"type":"string","enum":["native","dc","residential"],"title":"Strategy","default":"native"},"options":{"$ref":"#/components/schemas/ScrapeOptions"},"use_fallback":{"type":"boolean","title":"Use Fallback","default":true},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"json":{"anyOf":[{},{"type":"null"}],"title":"Json"},"timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Timeout"},"verify_ssl":{"type":"boolean","title":"Verify Ssl","default":true},"allow_redirects":{"type":"boolean","title":"Allow Redirects","default":true}},"type":"object","required":["url"],"title":"Payload"},"ScrapeOptions":{"properties":{"fetch_paa":{"type":"boolean","title":"Fetch Paa","default":true},"fetch_organic":{"type":"boolean","title":"Fetch Organic","default":true},"fetch_related":{"type":"boolean","title":"Fetch Related","default":true},"paa_depth":{"type":"integer","maximum":6.0,"minimum":1.0,"title":"Paa Depth","default":3},"force":{"type":"boolean","title":"Force","default":false},"max_results":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Results","default":5},"timeline_limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Timeline Limit","default":20},"include_engagement":{"type":"boolean","title":"Include Engagement","default":false},"recent_video_limit":{"type":"integer","maximum":12.0,"minimum":0.0,"title":"Recent Video Limit","default":0}},"type":"object","title":"ScrapeOptions"},"ScreenshotPayload":{"properties":{"url":{"type":"string","title":"Url"},"width":{"type":"integer","title":"Width","default":1280},"height":{"type":"integer","title":"Height","default":800},"full_page":{"type":"boolean","title":"Full Page","default":false},"format":{"type":"string","enum":["png","jpeg","webp"],"title":"Format","default":"png"},"quality":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Quality","default":80},"wait_for":{"type":"integer","maximum":30000.0,"minimum":0.0,"title":"Wait For","default":0},"selector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selector"},"dark_mode":{"type":"boolean","title":"Dark Mode","default":false},"device_scale":{"type":"number","maximum":3.0,"minimum":0.5,"title":"Device Scale","default":1.0},"use_fallback":{"type":"boolean","title":"Use Fallback","default":true}},"type":"object","required":["url"],"title":"ScreenshotPayload"},"SoaxLogPayload":{"properties":{"service":{"type":"string","title":"Service"},"kind":{"type":"string","title":"Kind","default":"webdata"},"success":{"type":"boolean","title":"Success","default":true},"ms":{"type":"number","title":"Ms","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["service"],"title":"SoaxLogPayload"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}