GET /social-feed
/api/store/[slug]/social-feedReturns the store's approved social media posts (Instagram, Facebook, TikTok) as a cursor-paginated feed with media URLs and engagement counts.
Path parameters
slugstringrequiredBusiness store slug
Query parameters
limitnumberoptionalPosts per page. Parsed as integer, clamped to 1-50; non-numeric falls back to 20.
Default 20
cursorstringoptionalOpaque pagination cursor: pass the next_cursor value from the previous response (base64url-encoded { published_at, id }). Legacy plain ISO-8601 timestamps are also accepted. An unparseable cursor returns 400 { error: "Invalid cursor parameter" }.
platformenumoptionalFilter posts to one platform. Values outside the enum are silently ignored (all platforms returned).
One of instagram, facebook, tiktok
Responses
The request succeeded.
Nothing has changed since the validator you sent. Reuse your copy.
Too many requests. Back off and retry after the window in the response.
What comes back
200 JSON: { posts: [...], next_cursor: string|null }. Each post has id, platform, media_type, media_url (public storage URL for images, direct URL for video thumbnails), embed_url (TikTok URLs normalized to player/v1 form; null for TikTok photo posts), caption, likes_count, comments_count, post_url, published_at, platform_username. next_cursor is null on the last page. Empty { posts: [], next_cursor: null } when the socials addon is disabled. Sends ETag and honors If-None-Match with 304 for server-side callers only; withheld from requests carrying an Origin header. Cached 10s at the browser (5s when empty); not shared-cacheable. CORS open, OPTIONS supported.