Skip to main content

Media List

Retrieve a list of recent media (posts, reels, videos, pins, tweets, etc.) from a connected social media account. Supports all major platforms: Instagram, TikTok, YouTube, LinkedIn, Facebook, X (Twitter), Threads, Pinterest, Bluesky, Reddit, and Twitch (past broadcasts, see Twitch).

Useful for building post selectors, displaying recent content, or getting media IDs for other API calls.


Get User Media​

Endpoint​

GET /api/uploadposts/media

Headers​

NameValueDescription
AuthorizationApikey your-api-key-hereYour API key for authentication

Query Parameters​

NameTypeRequiredDescription
platformStringYesThe platform to retrieve media from. See Supported Platforms.
userStringYesProfile username (as configured in Upload-Post).
limitIntegerNoNumber of media items to return. Defaults to 25, clamped to the range 1–100, and further capped per platform. See Pagination.
cursorStringNoOpaque next-page token returned by the previous response (pagination.next_cursor). Not supported on LinkedIn, Discord and Telegram. See Pagination.
page_urnStringNoLinkedIn only. Selects which LinkedIn organization page to fetch posts from. Accepts a numeric organization ID (e.g., 12345) or a full URN (e.g., urn:li:organization:12345). If omitted, the first organization the connected account administers is auto-resolved. Personal profiles are not supported — see the note below. Use the LinkedIn Pages endpoint to list available organizations.
filterStringNoBluesky only. Which posts to list: posts_with_replies, posts_no_replies, posts_with_media, posts_and_author_threads or posts_with_video. Without it, Bluesky's default. See Bluesky.
include_pinsBooleanNoBluesky only. true puts the account's pinned post first, flagged with pinned: true.

Supported Platforms​

PlatformValueDescription
InstagraminstagramPosts, reels, and carousels
TikToktiktokVideos
YouTubeyoutubeVideos from the channel's uploads playlist
LinkedInlinkedinPosts (text, images, articles)
FacebookfacebookPage/profile posts
X (Twitter)xTweets with media information
ThreadsthreadsThread posts
PinterestpinterestPins
BlueskyblueskyPosts (skeets)
RedditredditSubmissions
TwitchtwitchPast broadcasts (VODs) of the connected channel. Read-only connection, see Twitch

Example Requests​

Instagram:

curl 'https://api.upload-post.com/api/uploadposts/media?platform=instagram&user=my-profile' \
-H 'Authorization: Apikey your-api-key-here'

TikTok:

curl 'https://api.upload-post.com/api/uploadposts/media?platform=tiktok&user=my-profile' \
-H 'Authorization: Apikey your-api-key-here'

YouTube:

curl 'https://api.upload-post.com/api/uploadposts/media?platform=youtube&user=my-profile' \
-H 'Authorization: Apikey your-api-key-here'

Twitch (past broadcasts):

curl 'https://api.upload-post.com/api/uploadposts/media?platform=twitch&user=my-profile&limit=20' \
-H 'Authorization: Apikey your-api-key-here'

LinkedIn (personal profile):

curl 'https://api.upload-post.com/api/uploadposts/media?platform=linkedin&user=my-profile' \
-H 'Authorization: Apikey your-api-key-here'

LinkedIn (organization page):

curl 'https://api.upload-post.com/api/uploadposts/media?platform=linkedin&user=my-profile&page_urn=12345' \
-H 'Authorization: Apikey your-api-key-here'

LinkedIn (a specific organization page you administer):

curl 'https://api.upload-post.com/api/uploadposts/media?platform=linkedin&user=my-profile&page_urn=12345' \
-H 'Authorization: Apikey your-api-key-here'
LinkedIn lists organization posts only

LinkedIn does not let third-party apps list the posts a person authored: that needs its restricted r_member_social permission, granted to approved partners only. Requesting a personal profile — page_urn=me, or an account connected without any administered page — returns 400 with an explanation rather than a partial or misleading list. Posts published to a company page you administer are listed normally.

If you need the comments on a personal post, you do not need this endpoint: pass the post URN straight to Comments as post_id.

Responses​

  • 200 OK
{
"success": true,
"media": [
{
"id": "17890455123456789",
"caption": "Check out our latest product launch!",
"media_type": "IMAGE",
"media_url": "https://scontent.xx.fbcdn.net/v/image123.jpg",
"permalink": "https://www.instagram.com/p/ABC123/",
"timestamp": "2025-06-15T10:30:00+0000",
"thumbnail_url": null
},
{
"id": "17890455987654321",
"caption": "Behind the scenes",
"media_type": "VIDEO",
"media_url": "https://scontent.xx.fbcdn.net/v/video456.mp4",
"permalink": "https://www.instagram.com/reel/DEF456/",
"timestamp": "2025-06-14T15:00:00+0000",
"thumbnail_url": "https://scontent.xx.fbcdn.net/..."
},
{
"id": "17890455111222333",
"caption": "Photo dump",
"media_type": "CAROUSEL_ALBUM",
"media_url": null,
"permalink": "https://www.instagram.com/p/GHI789/",
"timestamp": "2025-06-13T09:00:00+0000",
"thumbnail_url": null,
"children": [
{
"id": "17890455444555666",
"media_type": "IMAGE",
"media_url": "https://scontent.xx.fbcdn.net/v/item1.jpg",
"timestamp": "2025-06-13T09:00:00+0000"
},
{
"id": "17890455777888999",
"media_type": "VIDEO",
"media_url": "https://scontent.xx.fbcdn.net/v/item2.mp4",
"thumbnail_url": "https://scontent.xx.fbcdn.net/...",
"timestamp": "2025-06-13T09:00:00+0000"
}
]
}
],
"pagination": {
"limit": 50,
"next_cursor": "QVFIUkc...",
"has_more": true
}
}

The pagination object is additive — every pre-existing key of the response (success, media, and the per-item fields) is unchanged, so existing integrations keep working without any modification.

  • 400 Bad Request
{
"success": false,
"error": "Platform parameter is required"
}
{
"success": false,
"error": "Pagination cursor is not supported for LinkedIn"
}
  • 500 Internal Server Error
{
"success": false,
"error": "An internal server error occurred."
}

Response Fields​

All platforms return media items with a consistent structure:

FieldTypeDescription
idStringPlatform-specific unique identifier for the media item
captionStringText content, caption, or title of the post
media_typeStringType of media. See Media Types
media_urlString/nullDirect URL to the media file (image or video). See Media URL Availability
permalinkString/nullDirect URL to the post on the platform
timestampString/nullISO 8601 timestamp of when the post was created
thumbnail_urlString/nullURL of the thumbnail/preview image (if available)
childrenArrayInstagram carousels only (CAROUSEL_ALBUM). Every image/video in the carousel, in order, each with id, media_type, media_url, thumbnail_url (videos) and timestamp. Use it to get all carousel items: the parent's media_url may be null or only the first item.
FieldTypeDescription
paginationObjectPage metadata. See Pagination.

Pagination​

Use limit and cursor to page through an account's media instead of receiving only the most recent items.

NameTypeDefaultDescription
limitInteger25How many items to return. Values are clamped to 1–100, then capped again by the platform's own maximum page size (see the table below).
cursorString–Opaque token identifying the next page. Pass back exactly what the previous response returned in pagination.next_cursor. Do not build, parse or store these tokens — they are the platform's own paging tokens and their format can change at any time.

Every response carries a pagination object:

{
"limit": 50,
"next_cursor": "QVFIUkc...",
"has_more": true
}
FieldTypeDescription
limitIntegerThe effective limit that was applied after clamping and per-platform capping.
next_cursorString/nullToken to pass as cursor on the next request. null when there are no more pages.
has_moreBooleantrue when another page is available.

On the last page the object looks like this:

{
"limit": 50,
"next_cursor": null,
"has_more": false
}

Per-Platform Limits and Cursor Support​

PlatformMax limitCursor supportNotes
Instagram100YesGraph API after cursor
Facebook100YesGraph API after cursor
Threads100YesGraph API after cursor
TikTok20YesTikTok caps its page size at 20 items
YouTube50YesYouTube caps its page size at 50 items
Bluesky100Yes
X (Twitter)100YesPages after the first reach back 30 days
Pinterest100Yes
Reddit100Yes
Twitch100YesHelix after cursor
LinkedIn100Nolimit only. Passing cursor returns 400.
Discord–Nolimit only. Passing cursor returns 400.
Telegram–Nolimit only. Passing cursor returns 400.
warning

LinkedIn, Discord and Telegram do not support cursors. Their APIs do not expose a paging token, so these platforms honour limit only. Sending a cursor for one of them returns 400 Bad Request with a message naming the platform (e.g. "Pagination cursor is not supported for LinkedIn"), rather than silently ignoring it.

Requesting a Specific Page Size​

curl 'https://api.upload-post.com/api/uploadposts/media?platform=instagram&user=my-profile&limit=50' \
-H 'Authorization: Apikey your-api-key-here'

Requesting the Next Page​

curl 'https://api.upload-post.com/api/uploadposts/media?platform=instagram&user=my-profile&limit=50&cursor=QVFIUkc...' \
-H 'Authorization: Apikey your-api-key-here'

Paginating Through Everything​

Keep calling the endpoint with the next_cursor from the previous response until has_more is false.

API_KEY="your-api-key-here"
CURSOR=""

while :; do
URL="https://api.upload-post.com/api/uploadposts/media?platform=instagram&user=my-profile&limit=100"
[ -n "$CURSOR" ] && URL="$URL&cursor=$CURSOR"

RESPONSE=$(curl -s "$URL" -H "Authorization: Apikey $API_KEY")
echo "$RESPONSE" | jq -r '.media[].id'

[ "$(echo "$RESPONSE" | jq -r '.pagination.has_more')" = "true" ] || break
CURSOR=$(echo "$RESPONSE" | jq -r '.pagination.next_cursor')
done
tip

For LinkedIn, Discord and Telegram there is no second page: request the largest limit you need in a single call and stop.

Twitch (past broadcasts)​

platform=twitch lists the past broadcasts (archived VODs, Helix type=archive) of the Twitch channel connected to the profile, newest first. Highlights and uploads are not included.

Twitch is a read-only connection: Twitch has no public video upload API, so Upload-Post cannot publish to Twitch and twitch is not accepted by the upload endpoints. The connection only proves the user owns the channel: no Twitch token is kept after connecting, so it never needs reconnecting. Connect it like any other platform: through the hosted connect page (pass "twitch" in the platforms list of Generate JWT, it is only shown when listed) or the Connect API (POST /api/uploadposts/oauth/twitch/start). No Twitch scopes are requested.

Each item has the same keys as every other platform, plus Twitch-specific fields:

{
"success": true,
"media": [
{
"id": "2299934401",
"caption": "Live now: building the bot",
"title": "Live now: building the bot",
"media_type": "VIDEO",
"media_url": null,
"permalink": "https://www.twitch.tv/videos/2299934401",
"timestamp": "2026-11-04T09:00:12Z",
"thumbnail_url": null,
"duration_seconds": 7380,
"is_live": true,
"view_count": 12,
"broadcaster_id": "141981764"
},
{
"id": "2298000011",
"caption": "Yesterday",
"title": "Yesterday",
"media_type": "VIDEO",
"media_url": null,
"permalink": "https://www.twitch.tv/videos/2298000011",
"timestamp": "2026-11-03T18:00:00Z",
"thumbnail_url": "https://static-cdn.jtvnw.net/cf_vods/d1m7jfoe9zdc1j/abc/thumb/thumb0-640x360.jpg",
"duration_seconds": 11313,
"is_live": false,
"view_count": 4321,
"broadcaster_id": "141981764"
}
],
"pagination": {
"limit": 20,
"next_cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6Mn19",
"has_more": true
}
}
FieldTypeDescription
titleStringBroadcast title (same value as caption).
timestampStringWhen the broadcast started, ISO 8601 in UTC (Z).
thumbnail_urlString/null640x360 thumbnail. null while Twitch is still processing the VOD (typically during a live stream).
duration_secondsIntegerLength of the VOD in seconds. For a live stream it is the length recorded so far.
is_liveBooleantrue when the VOD belongs to a broadcast that is still live: the recording is incomplete and keeps growing. Wait for false before processing the full video.
view_countIntegerViews of the VOD.
broadcaster_idStringTwitch user id of the channel.

Errors use the same wording as the other platforms:

StatusBodyMeaning
400{"success": false, "error": "Profile does not have a twitch account linked."}No Twitch channel connected to this profile.
503{"success": false, "error": "Twitch is not configured on this server."}Temporary problem on Upload-Post's side. Retry later.
400{"success": false, "error": "Twitch API Error: <message>"}Twitch answered with an error (including when the live check could not be done: the list is not returned rather than risk marking a live VOD as finished).

Bluesky (filters and pinned posts)​

platform=bluesky lists the posts of the connected Bluesky account, newest first. Two optional parameters narrow it, with the same values as Bluesky's author feed:

  • filter: posts_with_replies, posts_no_replies, posts_with_media, posts_and_author_threads or posts_with_video.
  • include_pins=true: the pinned post comes first.

Each item has the usual keys plus two more:

FieldTypeDescription
post_idStringThe post's at:// URI: the identifier to pass as post_id to Comments, post analytics or post engagement. id stays the post's cid, as before.
pinnedBooleantrue for the pinned post returned by include_pins=true.
curl 'https://api.upload-post.com/api/uploadposts/media?platform=bluesky&user=my-profile&filter=posts_with_media&include_pins=true&limit=20' \
-H 'Authorization: Apikey your-api-key-here'
{
"success": true,
"media": [
{
"id": "bafyreib...",
"post_id": "at://did:plc:abc123.../app.bsky.feed.post/3lb2xyz",
"caption": "Our new feature is live",
"media_type": "IMAGE",
"media_url": "https://cdn.bsky.app/img/feed_fullsize/...",
"permalink": "https://bsky.app/profile/did:plc:abc123.../post/3lb2xyz",
"timestamp": "2026-11-10T16:00:00.000Z",
"thumbnail_url": "https://cdn.bsky.app/img/feed_thumbnail/...",
"pinned": true
}
],
"pagination": {
"limit": 20,
"next_cursor": "2026-11-09T12:00:00.000Z",
"has_more": true
}
}

A filter outside that list, or an include_pins that is not true / false, answers 400 with error_code: "bluesky_invalid_parameter". For other Bluesky reads (any account's feed, threads, likes, followers) see Bluesky Reads.

Media Types​

TypeDescription
IMAGESingle photo post or image pin
VIDEOVideo post, reel, or video pin
CAROUSEL_ALBUMMulti-image/video post (carousel)
TEXTText-only post (no media attached)

Media URL Availability​

The media_url field returns a direct URL to the media file (image or video) when available. Support varies by platform:

Platformmedia_url SupportDetails
InstagramYesDirect image/video URL. For a CAROUSEL_ALBUM, the parent's URL may be null or only the first item: read every item from children. Omitted (field absent) for videos, reels and video stories with copyrighted or licensed audio, including Instagram's audio library, even on your own media: fall back to permalink or thumbnail_url. URLs are temporary.
ThreadsYesDirect image/video URL, same behavior as Instagram.
FacebookYesImage URL or playable video URL via attachments.
X (Twitter)YesDirect photo URL. For videos, returns the preview image URL.
LinkedInYesResolved via Images/Videos API. URLs are signed and temporary.
RedditYesDirect i.redd.it image URL, v.redd.it video URL (video-only, no audio), or first gallery image URL.
BlueskyYesfullsize CDN image (up to 2000px) or HLS playlist URL (.m3u8) for videos.
PinterestYesLargest available image URL (up to 1200px or original). Video URLs are restricted by Pinterest.
TikTokNoTikTok API does not expose direct video file URLs. Use permalink instead.
YouTubeNoYouTube API does not provide direct video URLs (prohibited by ToS). Use permalink instead.
TwitchNoTwitch does not expose VOD files. Use permalink instead.
warning

Media URLs from most platforms are temporary and will expire after some time (hours to days). Do not store them permanently — re-fetch from the API when needed, or download the media file to your own storage.

Common Use Cases​

  • Post selector UI: Display the user's recent posts so they can pick one for comment monitoring or AutoDMs.
  • Get media IDs: Use the id field from the response as the post_id parameter in the Comments endpoint.
  • Content overview: Show a dashboard of recent content across all platforms with permalinks and captions.
  • Cross-platform analytics: Aggregate media from multiple platforms to display a unified content calendar.
  • Full back-catalogue sync: Use limit and cursor to walk an account's entire media history, then feed the resulting IDs into Cached Post Analytics for bulk metrics.