Schemas

Platforms' own embed code for public posts, videos, playlists and profiles: the HTML to paste, its iframe URL and size, and the title, author and thumbnail it shows.

Endpoints

1 endpoint returns embeds on Instagram.

Schema

Every endpoint above returns this object as data. The standard meta comes with every response.

platformstring

Platform ID (instagram, youtube, tiktok, …).

typestring

What is embedded, named by its resource: post (any post: photo, carousel, video, reel), profile (an account), or playlist. New values may be added; treat unknown values as other.

One ofpostprofileplaylist

idstring

The ID the platform's embed is addressed by (as in embed_url): a post's ID (equals post.id), a playlist's ID, and for a profile the account's username on platforms whose profile embeds are addressed by it (Instagram, TikTok); the account's numeric ID, when known, is author.id.

urlstring uri

Canonical public URL of what is embedded (post.url, profile.url): the link the embed opens.

htmlstring

The platform's embed code, ready to paste into an HTML page: its markup and, unless asked to leave it out, the script tag that turns it into the embedded post or profile. It loads the platform's script and content in the visitor's browser.

embed_urlstring urinullable

The platform's embed page alone, for an iframe's src (what html's script loads); null when the platform has none.

widthintegernullable

Width in pixels the embed is laid out for (its maximum when it is responsive); null when the platform does not say.

heightintegernullable

Height in pixels; null when the embed sizes itself to its content (Instagram's always do).

titlestringnullable

The title the platform gives the embed: a post's caption or a video's title, a profile's page title; null when it has none.

authorobject

The account the embedded item belongs to: the post's author, the playlist's owner, or for a profile the account itself.

ShowHide 6 child fields
idstringnullable

Platform-native account ID; null when only the handle is known.

usernamestringnullable

Handle without the @; null when the account has none.

display_namestringnullable

Display name shown on the profile.

urlstring urinullable

Canonical profile URL.

avatar_urlstring urinullable

Profile picture URL. Platform CDN URLs can expire within hours.

is_verifiedbooleannullable

Platform verification badge; null where the platform has no badge.

thumbnail_urlstring urinullable

Preview image URL the platform names for the embed (a post's image or cover, a profile's picture); platform CDN URLs can expire within hours.

thumbnail_widthintegernullable

Width of thumbnail_url in pixels; null when unknown.

thumbnail_heightintegernullable

Height of thumbnail_url in pixels; null when unknown.

platform_specificobject

Fields only this platform has, under its ID (platform_specific.<platform>); each null when unknown.

Item errors

Besides the request-level errors every endpoint can return, embed endpoints return:

CodeHTTPRetryMeaningWhat to do
not_found404NoThe item does not exist or was deleted. On GET /v1/requests/{id}/response: the response was not kept (details.reason says why).Check the link or ID. Do not retry.
private_or_unavailable403NoThe item exists but is not public: it is private, age- or region-restricted, or needs a login to view. It shares 403 with forbidden (which is about the key), so branch on the code.Only public items can be fetched. Do not retry.

Last updated