---
name: "libextractor"
section: "3"
platform: "linux"
package: "libextractor"
version: "1.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libextractor"
---

# libextractor(3)

meta-information extraction library 1.0.0

## NAME

libextractor - meta-information extraction library 1.0.0

## SYNOPSIS

**#include \<extractor.h\>**

**const char \*EXTRACTOR\_metatype\_to\_string (enum EXTRACTOR\_MetaType** *type***);**

**const char \*EXTRACTOR\_metatype\_to\_description (enum EXTRACTOR\_MetaType** *type***);**

**enum EXTRACTOR\_MetaTypeEXTRACTOR\_metatype\_get\_max (void);**

**struct EXTRACTOR\_PluginList \*EXTRACTOR\_plugin\_add\_defaults (enum EXTRACTOR\_Options** *flags***);**

**struct EXTRACTOR\_PluginList \*EXTRACTOR\_plugin\_add (struct EXTRACTOR\_PluginList \****prev***, const char \****library***, const char \****options***, enum EXTRACTOR\_Options** *flags***);**

**struct EXTRACTOR\_PluginList \*EXTRACTOR\_plugin\_add\_last (struct EXTRACTOR\_PluginList \****prev***, const char \****library***, const char \****options***, enum EXTRACTOR\_Options** *flags***);**

**struct EXTRACTOR\_PluginList \*EXTRACTOR\_plugin\_add\_config (struct EXTRACTOR\_PluginList \****prev***, const char \****config***, enum EXTRACTOR\_Options** *flags***);**

**struct EXTRACTOR\_PluginList \*EXTRACTOR\_plugin\_remove (struct EXTRACTOR\_PluginList \****prev***, const char \****library***);**

**void EXTRACTOR\_plugin\_remove\_all (struct EXTRACTOR\_PluginList \****plugins***);**

**void EXTRACTOR\_extract (struct EXTRACTOR\_PluginList \****plugins***, const char \****filename***, const void \****data***, size\_t** *size***, EXTRACTOR\_MetaDataProcessor** *proc***, void \****proc\_cls***);**

**int EXTRACTOR\_meta\_data\_prin t(void \****handle***, const char \****plugin\_name***, enum EXTRACTOR\_MetaType** *type***, enum EXTRACTOR\_MetaFormat** *format***, const char \****data\_mime\_type***, const char \****data***, size\_t** *data\_len***);**

**EXTRACTOR\_VERSION**

## DESCRIPTION

**GNU libextractor is a simple library for keyword extraction.  libextractor does not support all formats but supports a simple plugging mechanism such that you can quickly add extractors for additional formats, even without recompiling libextractor.  libextractor typically ships with dozens of plugins that can be used to obtain meta data from common file-types.  If you want to write your own plugin for some filetype, all you need to do is write a little library that implements a single method with this signature:**

 **void EXTRACTOR\_XXX\_extract\_method (struct EXTRACTOR\_ExtractContext \****ec***);**

*ec contains function pointers for reading, seeking, getting the overall file size and returning meta data.  There is also a field with options for the plugin.  New plugins will be automatically located and used once they are installed in the respective directory (typically something like /usr/lib/libextractor/).*

*The application* **extract** *gives an example how to use libextractor.*

*The basic use of libextractor is to load the plugins (for example with* **EXTRACTOR\_plugin\_add\_defaults***), then to extract the keyword list using* **EXTRACTOR\_extract***, and finally unloading the plugins (with* **EXTRACTOR\_plugin\_remove\_all***).*

*Textual meta data obtained from libextractor is supposed to be UTF-8 encoded if the text encoding is known.  Plugins are supposed to convert meta-data to UTF-8 if necessary.    The* **EXTRACTOR\_meta\_data\_print** *function converts the UTF-8 keywords to the character set from the current locale before printing them.*

## SEE ALSO

*[extract(1)](/extract/1.md)*

## LEGAL NOTICE

*libextractor is released under the GPL and a GNU package (http://www.gnu.org/).*

## BUGS

*A couple of file-formats (on the order of 10^3) are not recognized...*

## AUTHORS

*extract was originally written by Christian Grothoff \<christian@grothoff.org\> and Vidyut Samanta \<vids@cs.ucla.edu\>. Use \<libextractor@gnu.org\> to contact the current maintainer(s).*

## AVAILABILITY

*You can obtain the original author's latest version from http://www.gnu.org/software/libextractor/.*
