Consiglierei di utilizzare una query di esplorazione dati per questo. Puoi eseguire query programmaticamente e ottenere risultati JSON. Ecco qui:
-- [params]
-- post_id :post_id
SELECT
p.id,
p.topic_id,
p.post_number,
p.raw AS raw_content, -- Markdown/source
p.cooked AS html_content, -- Rendered HTML
p.user_id,
p.created_at,
p.updated_at
FROM posts p
WHERE p.id = :post_id
AND p.deleted_at IS NULL -- rimuovi se vuoi anche i post eliminati
-- AND p.hidden = false -- escludi opzionalmente i post nascosti
LIMIT 1;