{"openapi":"3.1.0","info":{"title":"FxSteam Workshop Embed API","version":"0.1.0","description":"Discord-friendly Steam Workshop embed proxy and parsed Workshop item metadata API."},"servers":[{"url":"https://fixsteamcommunity.com"}],"tags":[{"name":"Embeds","description":"Routes intended for Discord link previews."},{"name":"API","description":"JSON endpoints for parsed Workshop metadata."},{"name":"Operations","description":"Health and deployment metadata."}],"paths":{"/post/{id}":{"get":{"tags":["Embeds"],"summary":"Render Discord embed metadata for a Workshop item","parameters":[{"name":"id","in":"path","required":true,"description":"Steam Workshop item id.","schema":{"type":"string","pattern":"^\\d{1,20}$","example":"3720048351"}}],"responses":{"200":{"description":"HTML metadata page that redirects browsers to Steam after crawlers read it.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid post id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Invalid post id"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Post not found"}}}}}}},"/post/{id}/gallery":{"get":{"tags":["Embeds"],"summary":"Render Discord gallery embed metadata for a Workshop item","parameters":[{"name":"id","in":"path","required":true,"description":"Steam Workshop item id.","schema":{"type":"string","pattern":"^\\d{1,20}$","example":"3720048351"}}],"responses":{"200":{"description":"HTML metadata page with up to 9 Workshop gallery images, then redirects browsers to Steam.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid post id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Invalid post id"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Post not found"}}}}}}},"/api/posts/{id}":{"get":{"tags":["API"],"summary":"Fetch parsed Workshop item metadata","parameters":[{"name":"id","in":"path","required":true,"description":"Steam Workshop item id.","schema":{"type":"string","pattern":"^\\d{1,20}$","example":"3720048351"}}],"responses":{"200":{"description":"Parsed Steam Workshop item metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"description":"Invalid post id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Invalid post id"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Post not found"}}}}}}},"/oembed":{"get":{"tags":["Embeds"],"summary":"Return oEmbed metadata for a Workshop item","parameters":[{"name":"url","in":"query","description":"A Steam Workshop URL, proxy /post URL, or raw Workshop id.","schema":{"type":"string","example":"https://fxsteam.up.railway.app/post/3720048351"}},{"name":"id","in":"query","description":"Raw Workshop id. Used when url is omitted.","schema":{"type":"string","pattern":"^\\d{1,20}$","example":"3720048351"}},{"name":"format","in":"query","description":"Compatibility parameter for oEmbed clients.","schema":{"type":"string","enum":["json"],"default":"json"}}],"responses":{"200":{"description":"oEmbed response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OEmbed"}}}},"400":{"description":"Missing or invalid url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Missing or invalid url"}}}}}}},"/debug/post/{id}":{"get":{"tags":["Embeds"],"summary":"Render a human-readable parser debug page","parameters":[{"name":"id","in":"path","required":true,"description":"Steam Workshop item id.","schema":{"type":"string","pattern":"^\\d{1,20}$","example":"3720048351"}}],"responses":{"200":{"description":"HTML debug page.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid post id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Invalid post id"}}}},"404":{"description":"Post not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"Post not found"}}}}}}},"/healthz":{"get":{"tags":["Operations"],"summary":"Health check","responses":{"200":{"description":"Service is alive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/version":{"get":{"tags":["Operations"],"summary":"Build/runtime version metadata","responses":{"200":{"description":"Version metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}}}}},"/openapi.json":{"get":{"tags":["Operations"],"summary":"OpenAPI document","responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"FooterMeta":{"type":"object","required":["label","value"],"properties":{"label":{"type":"string","example":"Updated"},"value":{"type":"string","example":"4 May @ 12:47pm"}}},"Post":{"type":"object","required":["title","description","originalUrl","contributors","images"],"properties":{"title":{"type":"string","example":"Greased Lighter"},"description":{"type":"string","example":"By The Dreaded Candiru\n\nTeam Fortress 2 collection - 3 items\n\nClass: Pyro"},"footer":{"type":"string","example":"Updated 4 May @ 12:47pm"},"footerMeta":{"type":"array","items":{"$ref":"#/components/schemas/FooterMeta"}},"updatedAt":{"type":["string","null"],"format":"date-time","example":"2026-05-04T12:47:00.000Z"},"image":{"type":["string","null"],"format":"uri"},"imageAlt":{"type":"string"},"imageType":{"type":"string","example":"image/gif"},"imageTypes":{"type":"object","additionalProperties":{"type":"string"},"example":{"https://images.steamusercontent.com/ugc/example/?imw=512":"image/gif"}},"images":{"type":"array","items":{"type":"string","format":"uri"}},"contributors":{"type":"array","items":{"type":"string"},"example":["The Dreaded Candiru"]},"originalUrl":{"type":"string","format":"uri"},"stale":{"type":"boolean"}}},"OEmbed":{"type":"object","required":["type","version","title","provider_name","provider_url","url"],"properties":{"type":{"type":"string","enum":["rich"]},"version":{"type":"string","enum":["1.0"]},"title":{"type":"string"},"provider_name":{"type":"string","example":"Steam Workshop"},"provider_url":{"type":"string","format":"uri"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"thumbnail_url":{"type":"string","format":"uri"},"thumbnail_width":{"type":"integer","example":512},"thumbnail_height":{"type":"integer","example":512},"cache_age":{"type":"integer","example":900}}},"Health":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean","example":true}}},"Version":{"type":"object","required":["name","version","node","environment"],"properties":{"name":{"type":"string","example":"steam-workshop-embed"},"version":{"type":"string","example":"0.0.1"},"node":{"type":"string","example":"v22.0.0"},"environment":{"type":"string","example":"production"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}