# API

FxSteam exposes both crawler-facing embed routes and a small JSON API for parsed Steam Workshop metadata.

## Reference

- Browser docs: `/docs`
- OpenAPI document: `/openapi.json`
- Local export: `npm run openapi`

## Core Routes

- `GET /post/:id` renders the Discord metadata page and redirects browsers to Steam.
- `GET /api/posts/:id` returns parsed Workshop metadata as JSON.
- `GET /oembed?url=...` returns the oEmbed payload Discord can discover from `/post/:id`.
- `GET /debug/post/:id` renders parser output and image-gallery diagnostics.

## URL Inputs

The parser accepts raw ids and these Steam URL shapes:

- `https://steamcommunity.com/sharedfiles/filedetails/?id=3720048351`
- `https://steamcommunity.com/workshop/filedetails/?id=3731685480`
- `https://fxsteam.up.railway.app/post/3720048351`

## Response Notes

Descriptions intentionally omit visitor counts, favorite counts, and posted dates. The public preview keeps creator, collection/item summary, item body, class, slot, and tags.
