Free plan

Extract media

List or take out the pictures and sounds inside an Office file
POST
/v1/documents/media

About this tool

Word, Excel and PowerPoint files can hold pictures, sounds and videos inside them. This tool lists these items with their size and where they are used. Or it takes them out and gives them to you in one ZIP file, which is a folder packed into one file. You can pick only pictures, sounds or videos.
For example, a PowerPoint has many photos and you want to save all of them as separate files.

How to use it

  1. Choose this tool.
  2. Add your Word, Excel, PowerPoint or OpenDocument file.
  3. Choose to List the items or Extract them, and which kinds you want.
  4. Press Generate.
  5. Read the list or download the ZIP file.

What you get back

You get a list on screen, or a ZIP file with the pictures, sounds and videos to download.
GOOD TO KNOW
Pictures, audio and video in the media folders of the file (and Pictures of OpenDocument files). Linked files that are not inside the document are not included. Counts as one document.
TEST IT LIVE

Try Extract media in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/media
Tool ID
documents.media
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/media" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'operation=list' \
  -F 'kind=all' \
  -F 'formats=["png","jpg"]'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.media({
    "file": 'document.pdf',
    "operation": "list",
    "kind": "all",
    "formats": "[\"png\",\"jpg\"]"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->media([
    'file' => 'document.pdf',
    'operation' => 'list',
    'kind' => 'all',
    'formats' => '["png","jpg"]',
]);
echo $result->requestId;
FAQ

Frequently asked questions

List the pictures, sounds and videos inside a Word, Excel, PowerPoint or OpenDocument file, with their size, picture dimensions and where they are used, or take them out into a ZIP, once each if you like.

Extract media works from text and settings, so no file is needed. Every input is optional.

Extract media is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/media with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.