TikTok or Instagram post URL to media details: accepted URL shapes
tiktok_media and instagram_media accept only https post URLs on tiktok.com or instagram.com; profile, story and login links return 400. Accepted shapes below.

To get details for one TikTok or Instagram post on Sume, send its public URL to POST /v1/scrapecreators/tiktok_media or POST /v1/scrapecreators/instagram_media. The URL must be https, on tiktok.com or instagram.com, and point at a single post; a profile, story or login link is rejected with 400 scrapecreators_invalid_input.
The answer is a media candidate: metadata and links, not a copy hosted by Sume. Copying the bytes is the separate media import step.
URL shapes that pass
Instagram paths must start with /p/, /reel/ or /reels/. TikTok paths must be @user/video/<id>, @user/photo/<id> or the short /t/<code> form, and the short-link hosts vm.tiktok.com and vt.tiktok.com are accepted. Query strings and hash fragments are stripped before the lookup, so tracking parameters on a pasted link are harmless.
instagram_media also takes a shortcode instead of a url, but never both at once. tiktok_media requires url. Both accept region, a two-letter code.
| Input | Accepted | Result |
|---|---|---|
| https://www.instagram.com/reel/<code>/?igsh=... | Yes, query stripped | Candidate for that reel |
| https://www.instagram.com/<handle>/ | No, profile page | 400 scrapecreators_invalid_input |
| https://www.tiktok.com/@user/video/<id> | Yes | Candidate for that video |
| https://vm.tiktok.com/<code> | Yes, short host | Candidate for that video |
| http:// or a URL with credentials | No | 400 scrapecreators_invalid_input |
| Any story or login URL | No | 400 scrapecreators_invalid_input |
Call it
Pass the pasted link as is. If you hold only a handle, use the profile and feed routes first and take the post URLs from there.
curl -sS https://api.sume.com/v1/scrapecreators/instagram_media \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.instagram.com/reel/EXAMPLECODE/"}'From candidate to something you can generate with
A candidate lets you decide whether a post is worth keeping. To use it as an input for a video model or for analysis, import it: POST /v1/media-imports takes a public TikTok or Instagram video URL, mirrors it to media.sume.com and records an asset, at a fixed estimate of $0.15 per accepted import. YouTube and other hosts are rejected there with unsupported_platform.
Reading is free in v1 and importing is not, so the cheap pattern is to read many candidates, filter on the metadata you got back, and import only the few you will actually use. The import cost breakdown has the per-batch arithmetic.
Sources
Related posts
More in Developers
- TikTok title 2,200 limit counts UTF-16: a Python length check
TikTok caps the direct post title at 2,200 UTF-16 runes. Emoji count as two, so Python len() undercounts. A short check to run before you post.
- Timeline audio concat limits: 20 parts, 1,800 s, one channel layout
Timeline audio concat accepts 1 to 20 parts, outputs up to 1,800 seconds and needs one channel layout. Limits, refusal codes and a request that works.
- Timeline audio 400 codes: what each refusal means and the fix
Sume timeline audio refuses bad concat and split requests with stable codes such as audio_concat_requires_parts. Each code, its cause and the fix.
- Hook and full cut from one track: overlapping Timeline audio splits
Timeline audio split ranges may overlap, up to 20 per job at $0.01. Cut a 15-second hook and the full track from one song or voice-over in a single call.
Written by Sume