API v2 — please expose customFeaturedImageUrl in the posts list and site-data/export responses

A post's featured image (customFeaturedImageUrl) is currently returned only by GET /sites/{supername}/posts/{cuid} — one post per request. It is absent from both endpoints that return posts in bulk: - GET /sites/{supername}/posts — returns cuid, title, status, author, createdAt, publishedAt, updatedAt, isSEOCheckPassed, tags, slug, category, _count. No image field. - POST /sites/{supername}/site-data/export — returns title, content, tags, author, slug, status, metaTitle, metaDescription, publishedAt, createdAt. No image field. So building a post index with preview images — a blog feed, a "latest posts" widget, an internal dashboard — requires one HTTP request per post. For us that's 712 published posts = 712 requests to assemble what a single field on the list response would provide. Please include customFeaturedImageUrl (and ideally ogImageUrl) in both payloads. Related: post lookup by slug GET /sites/{supername}/posts/{slug} returns 404 — only cuid works. Since site-data/export returns slug but not cuid, there is no way to join export output back to per-post detail. Either accepting a slug here, or adding cuid to the export payload, would close that gap. Why this is currently blocking These two limitations compound with the pagination bug reported separately (page/limit always 400 on the list endpoint): - site-data/export gives us all 712 published posts — but no images. - The list endpoint gives cuids — but caps at 50 posts, so we can only resolve images for the newest 50. - Export returns slugs, detail requires cuids, and slug lookup 404s — so the two datasets can't be joined. The result is that there is no supported path to "all posts with their featured image." We're currently scraping the JSON-LD "image" field off our own public post pages as a workaround, which we'd rather not depend on. Adding the image field to the list/export response would resolve this for us even before the pagination bug is fixed.

Abhinav Jain

0


1 Answer

Added. GET /sites/{supername}/posts and POST /sites/{supername}/site-data/export now both return customFeaturedImageUrl and ogImageUrl on every post. You should be able to drop the JSON-LD scraping entirely. Joining export output back to per-post detail site-data/export now returns cuid alongside slug, so the two datasets join directly. With images on both payloads you may not need the join for this particular use case any more, but it is there. We are not adding slug lookup to GET /sites/{supername}/posts/{cuid} for now, since the cuid in the export response closes the gap that led you to ask. If you have a case where that is not enough, tell us and we will look again. Give it a try and let us know if anything is still off.

Sai Krishna answered

Superblog Team

0

Login to post an answer

or continue with

By continuing, you are agreeing to our terms of service.