This module is an add-on to the Search API module which allows the indexing and searching of attachments.
The extraction can be done using one of the following methods:
- Apache Tika App
- Apache Tika Server
- The Solr built-in extractor
- pdftotext for PDFs
- Python pdf2txt for PDFs
- golang docconv
- Unstructured.io (cloud or self-hosted)
Architecture
The module is built on two kinds of plugins :
text extractor plugins convert a file into text

file aggregator plugins find which files belong to the entity being indexed.
File aggregator plugins can be enabled together.
only the pluginOne level file fields is enabled by default.

-
One level file fields
one step away, on the entity : direct file, image, SVG and media reference fields, plus the file itself when the datasource isFile.
(This is the only plugin enabled by default) -
One level body text embeds
one step away, inside the entity : files and media embedded in a formatted text field.
For example a media entity in a body field.
The UUID matchers, target entity types and scanned fields are configurable. -
One level Layout Builder blocks
one step away, outside the entity fields : inline and reusable custom blocks placed in Layout Builder sections that contain file/media fields or text embeds. -
One level link fields
one step away, on the entity : direct link fields pointing to remote files such as a PDF on a CDN.
The file is downloaded, extracted and cached. -
Many levels entity references
more than one step away (nested) : recursively followsentity_referenceandentity_reference_revisionsfields.
For example :
Article node => its paragraphs => their media fields.
Article node => its paragraphs => referenced Page node => their file fields.
The nested aggregator does not extract files itself : it only explores entity references and runs the enabled one-level plugins on every referenced entity.
Nested depth is configurable (default 3).
Discovery uses BFS Algo to explore entities once avoiding loops.
Features
-
Indexes files from the core
fileandimagefield types, media reference fields, and any field type whose class extendsFileItem(e.g.svg_image_field). -
Extraction cache (stored in key-value or files under
private://orpublic://), automatic invalidation when a file changes, and a fallback queue for failed extractions. - Providing a field formatter ("Text extracted from attachment") and an extra field ("Search API attachments") to display extracted text when needed.
- Providing a Views filter ("Exclude search in attachments"), so users can include or exclude attachment text in fulltext searches.
- Per-processor limits : excluded extensions, maximum file size, include/exclude private files, number of files to extract per field, and maximum extracted text size.
- Some aggregator plugins provide Allowed/Exclude field names, so that user can limit the fields discovered by the plugin.
- Hooks for custom indexing rules, post-extraction reactions, and non-file media sources such as Acquia DAM. See search_api_attachments.api.php
- Debug mode, extractor test on save, and config-import validation of aggregator dependencies.
See the README for installation, extractor configuration, aggregator settings, caching, hooks and usage examples.
Drupal 11
The module's D11 version is available.
Drupal 10
10.0.18 is the last pure Drupal 10 compatible version.
Drupal 9
9.0.6 is the last pure Drupal 9 compatible version.
Project information
- Project categories: Media, Site search
- Ecosystem: Search API
15,989 sites report using this module
- By izus on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 10.0.x-dev updated 2 Dec 2026 at 09:40 UTC

