Free plan

Document Metadata

See or remove the hidden details stored in an Office file
POST
/v1/documents/metadata

About this tool

Office files store hidden details about themselves, called metadata: the author name, company, dates, program used and even names of people who commented. This tool lists them, and can remove them or change some. The text, tables and design of your file stay the same. It is useful for privacy before you share a file.
For example, you clear your name and company from a Word file before sending it to a customer.

How to use it

  1. Choose this tool.
  2. Add your Word, Excel, PowerPoint or OpenDocument file.
  3. To only look, leave the cleaning options empty. To remove details, choose what to clean.
  4. Press Generate.
  5. Read the list or download the cleaned file.

What you get back

You get the list of hidden details on screen, or a new cleaned file to download if you asked for changes.
GOOD TO KNOW
Scanned PDFs have no text layer: use /v1/pdfs/ocr first. With output=url the text comes back as a file (txt, md or json), and response, filename and filename_template deliver and name it like any other file; with output=inline (the default) there is no file, so those three parameters are accepted and change nothing.
TEST IT LIVE

Try Document Metadata 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/metadata
Tool ID
documents.metadata
Authentication
API key
Accepts
DOCX, XLSX, PPTX, ODT, ODS, ODP +4 more
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/metadata" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'mode=read' \
  -F 'clean=all' \
  -F 'response=url'

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.metadata({
    "file": 'document.pdf',
    "mode": "read",
    "clean": "all",
    "response": "url"
  });
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()->metadata([
    'file' => 'document.pdf',
    'mode' => 'read',
    'clean' => 'all',
    'response' => 'url',
]);
echo $result->requestId;
FAQ

Frequently asked questions

With nothing asked it lists every property of a DOCX, XLSX, PPTX, ODT, ODS or ODP file: Core (title, author, dates …), Extended (application, company, counts …), Custom, Thumbnail, and the names of the people who commented or tracked changes (Revisions). With clean, mode, remove, remove_groups or set it returns a new file with the change; the text, tables, slides and formatting are never touched. Older .doc, .xls, .ppt and RTF files can be read, not changed.

Document Metadata accepts DOCX, XLSX, PPTX, ODT, ODS, ODP, RTF, DOC, XLS, PPT. You can send several files in one request.

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

Send a POST request to /v1/documents/metadata 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.