Extract Inline Media API

inline_videos and inline_audios list the page's videos and audio with their sources. Embedded players from known platforms, such as YouTube and Vimeo, are also listed in inline_videos with their provider and video_id. inline_iframes lists every iframe.

API Examples

Inline videos

Inline videos

JSON Example

{
  ...
  "inline_videos": [
    {
      "position": 1,
      "type": "native",
      "source": "https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.480p.vp9.webm",
      "sources": [
        "https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.480p.vp9.webm",
        "https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.1080p.vp9.webm",
        "https://upload.wikimedia.org/wikipedia/commons/c/c0/Big_Buck_Bunny_4K.webm"
      ],
      "poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Big_Buck_Bunny_4K.webm/500px-seek%3D116-Big_Buck_Bunny_4K.webm.jpg",
      "width": 350,
      "height": 197
    }
  ]
}

JSON Structure Overview

{
  ...
  "inline_videos": [
    {
      "position": "Integer - Position of the video",
      "type": "String - 'native' for video elements, 'embed' for embedded players",
      "provider": "String - Platform of the embedded player. Can be 'youtube', 'vimeo', 'wistia', 'loom', 'dailymotion', 'twitch', 'facebook', 'streamable', 'brightcove', 'jwplayer' or 'kaltura'",
      "video_id": "String - Video ID of an embedded YouTube, Vimeo, Wistia, Loom or Dailymotion player",
      "title": "String - Title attribute of the video",
      "source": "String - URL of the video",
      "sources": "Array - URLs of the video's source elements (native videos only)",
      "poster": "String - URL of the video's poster image (native videos only)",
      "embed_url": "String - URL of the embedded player (embedded videos only)",
      "width": "Integer - Width attribute of the video",
      "height": "Integer - Height attribute of the video"
    },
    ...
  ],
  "inline_audios": [
    {
      "position": "Integer - Position of the audio",
      "title": "String - Title attribute of the audio",
      "source": "String - URL of the audio",
      "sources": "Array - URLs of the audio's source elements"
    },
    ...
  ],
  "inline_iframes": [
    {
      "position": "Integer - Position of the iframe",
      "title": "String - Title attribute of the iframe",
      "source": "String - URL of the iframe",
      "width": "Integer - Width attribute of the iframe",
      "height": "Integer - Height attribute of the iframe",
      "serpapi_extract_link": "String - Extract API link for extracting this URL next"
    },
    ...
  ],
  ...
}