
Apache Tika Parse
CertifiedParse files with Apache Tika
Apache Tika Parse
Parse files with Apache Tika
Auto-detects MIME type, extracts text and metadata, and can capture embedded files. Defaults to XHTML content, no OCR, and stores the parsed Ion payload to internal storage unless store is false. OCR on images requires Tesseract to be installed on the Kestra host; without it, image parsing falls back to metadata extraction only.
type: io.kestra.plugin.tika.ParseExamples
Extract text and embedded files from an upload.
id: tika_parse_file
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: parse
type: io.kestra.plugin.tika.Parse
from: "{{ inputs.file }}"
extractEmbedded: true
store: false
- id: log_embedded
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.parse.result.embedded }}"
Extract text from an image using OCR (requires Tesseract on the Kestra host).
id: tika_parse_image_ocr
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: parse
type: io.kestra.plugin.tika.Parse
from: "{{ inputs.file }}"
ocrOptions:
strategy: OCR_AND_TEXT_EXTRACTION
store: true
Download and extract image metadata using Apache Tika.
id: parse-image-metadata-using-apache-tika
namespace: company.team
tasks:
- id: get_image
type: io.kestra.plugin.core.http.Download
uri: https://kestra.io/cdn-cgi/image/onerror=redirect,width=1080,height=608,fit=cover,format=webp/_astro/main.C_OjFrVt.jpg
- id: tika
type: io.kestra.plugin.tika.Parse
from: "{{ outputs.get_image.uri }}"
store: false
contentType: TEXT
ocrOptions:
strategy: OCR_AND_TEXT_EXTRACTION
- id: log_metadata
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.tika.result.metadata }}"
Download a PDF file and extract text from it using Apache Tika.
id: parse-pdf
namespace: company.team
tasks:
- id: download_pdf
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/resolve/main/pdf/app_store.pdf
- id: parse_text
type: io.kestra.plugin.tika.Parse
from: "{{ outputs.download_pdf.uri }}"
contentType: TEXT
store: false
- id: log_extracted_text
type: io.kestra.plugin.core.log.Log
message: "{{ outputs.parse_text.result.content }}"
Properties
charactersLimit integerstring
Character write limit
Maximum characters when writing TEXT content; -1 (default) disables the limit.
contentType string
XHTMLTEXTXHTMLXHTML_NO_HEADEROutput content format
Choose TEXT, XHTML (default), or XHTML_NO_HEADER. charactersLimit applies only to TEXT.
extractEmbedded booleanstring
falseExtract embedded files
If true, inline/embedded resources are saved to internal storage and returned in embedded; default is false.
from string
Source file to parse
Internal storage URI (e.g. kestra://...).
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
ocrOptions Non-dynamic
{
"strategy": "NO_OCR"
}Custom OCR options
OCR options for image parsing. To extract text from images, Tesseract must be installed on the Kestra host (apt-get install tesseract-ocr). Without Tesseract, images are parsed with ImageParser and only metadata is returned regardless of the strategy. Default strategy is NO_OCR.
io.kestra.plugin.tika.Parse-OcrOptions
Enable image preprocessing
Apache Tika will run preprocessing of images (rotation detection and image normalizing with ImageMagick) before sending the image to Tesseract if the user has included dependencies (listed below) and if the user opts to include these preprocessing steps.
Language used for OCR
Tesseract language code (e.g. eng, fra).
NO_OCRAUTONO_OCROCR_ONLYOCR_AND_TEXT_EXTRACTIONOCR strategy
Requires Tesseract and language packs. Default is NO_OCR; use OCR_AND_TEXT_EXTRACTION to merge OCR and text extraction.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
store booleanstring
trueStore parsed payload to internal storage
When true (default), writes the parsed Ion file to internal storage and returns its URI; when false, emits the result inline.
Outputs
result
Parsed result with extracted text and metadata
io.kestra.plugin.tika.Parse-Parsed
uri string
uriURI of the extracted content in Kestra's internal storage