Skip to main content

Function: getOEmbed()

getOEmbed(client, props): Promise<{ version: "1.0"; type: "link" | "photo" | "video" | "rich"; provider_name: string; provider_url: string; url?: string; width?: number; height?: number; title?: string; author_name?: string; author_url?: string; thumbnail_url?: string; thumbnail_width?: number; thumbnail_height?: number; html?: string; }>

Gets oEmbed data for a URL. Returns structured metadata about the resource following the oEmbed specification.

Parameters​

client​

ApiClient

The API client instance

props​

The request properties

query​

{ url: string; format: "json" | "xml"; maxwidth?: number; maxheight?: number; } = getOEmbedQuerySchema

Query parameters (url, format, maxwidth, maxheight)

query.url​

string = ...

query.format​

"json" | "xml" = ...

query.maxwidth?​

number = ...

query.maxheight?​

number = ...

Returns​

Promise<{ version: "1.0"; type: "link" | "photo" | "video" | "rich"; provider_name: string; provider_url: string; url?: string; width?: number; height?: number; title?: string; author_name?: string; author_url?: string; thumbnail_url?: string; thumbnail_width?: number; thumbnail_height?: number; html?: string; }>

Promise resolving to oEmbed response data

Operation Id​

get-oembed

Example​

const oembed = await getOEmbed(client, {
query: { url: 'https://example.com/org/my-org', format: 'json' }
});