NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #2529 most downloaded on PyPI
A library that prepares raw documents for downstream ML tasks.
Latest stable
0.27.37
Last release 13 days ago
06 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
3 versions withdrawn
withdrawn after publishing
4 years old
249 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Allow model used for hi res pdf partition strategy to be chosen when called.
Adjust encoding recognition threshold value in detect_file_encoding
Fix KeyError when isd_to_elements doesn't find a type
Fix _output_filename for local connector, allowing single files to be written correctly to the disk
Fix for cases where an invalid encoding is extracted from an email header.
coordinates attribute of the element's metadata.metadata_filename parameter across all partition functionsconvert_to_datafame grabs all of the metadata fields.detect_file_encodingisd_to_elements doesn't find a type_output_filename for local connector, allowing single files to be written correctly to the diskcoordinates attribute of the element's metadata.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Adds include_metadata kwarg to partition_doc, partition_docx, partition_email, partition_epub, partition_json, partition_msg, partition_odt, partition
include_metadata kwarg to partition_doc, partition_docx, partition_email, partition_epub, partition_json, partition_msg, partition_odt, partition_org, partition_pdf, partition_ppt, partition_pptx, partition_rst, and partition_rtfinclude_metadata kwarg to partition_doc, partition_docx, partition_email, partition_epub, partition_json, partition_msg, partition_odt, partition_org, partition_pdf, partition_ppt, partition_pptx, partition_rst, and partition_rtfMore deterministic element ordering when using hi_res PDF parsing strategy (from unstructured-inference bump to 0.5.4)
hi_res PDF parsing strategy (from unstructured-inference bump to 0.5.4)partition_email and partition_msg will now process attachments if process_attachments=True
and a attachment partitioning functions is passed through with attachment_partitioner=partition.Adds a max_partition parameter to partition_text, partition_pdf, partition_email, partition_msg and partition_xml that sets a limit for the size of an
max_partition parameter to partition_text, partition_pdf, partition_email,
partition_msg and partition_xml that sets a limit for the size of an individual
document elements. Defaults to 1500 for everything except partition_xml, which has
a default value of None.hi_res model for pdfs and images is selectable via environment variable.------- as list items.partition_htmlImprovements to string check for leafs in partition_xml.
partition_xml.partition_org for processed Org Mode documents.Adds Google Cloud Service connector
parse_email for partition_eml so that unstructured-api passes the smoke testspartition_email now works if there is no message content"fast" strategy for partition_pdf so that it's able to recursivelyAdds functionality to replace the MIME encodings for eml files with one of the common encodings if a unicode error occurs
MIME encodings for eml files with one of the common encodings if a unicode error occursdetect_file_encodingeml fileshtml_assemble_articles kwarg to partition_html to enable users to capture
control whether content outside of <article> tags is captured when
<article> tags are present.xml attribute on element before looking for pagebreaks in partition_docx.Convert fast startegy to ocr_only for images
.docx and .doc when user or renderer
created page breaks are present.partition_docx to include headers and footers in the output.partition_tsv and associated tests. Make additional changes to detect_filetype.partition_via_api since we now require valid/empty api keysNone instead of 1 when page number is not present in the metadata.
A page number of None indicates that page numbers are not being tracked for the document
or that page numbers do not apply to the element in question..None.Adds functionality to sort elements in partition_pdf for fast strategy
partition_pdf for fast strategy--fast strategy on PDF documentspartition_rst for processed ReStructured Text documents.Allows passing kwargs to request data field for partition_via_api and partition_multiple_via_api
partition_via_api and partition_multiple_via_apidetect_filetype and partition.grpcio import issue on weaviate.schema.validate_schema for python 3.9 and 3.10detectron2 from source in DockerfileUpdate IngestDoc abstractions and add data source metadata in ElementMetadata
strategy parameter down from partition for partition_imagetext/plain MIME typeconvert_office_doc no longers prints file conversion info messages to stdout.partition_via_api reflects the actual filetype for the file processed in the API.Adds an optional encoding kwarg to elements_to_json and elements_from_json
elements_to_json and elements_from_jsonread_txt_file utility function to keep using spooled_to_bytes_io_if_needed for xmlread_txt_file utility function to handle file-like object from URLencoding from partition_pdfNone default for encodingtabulate explicitly to dependenciesmetadata.page_number of pptx filesAdd stage_for_weaviate to stage unstructured outputs for upload to Weaviate, along with a helper function for defining a class to use in Weaviate sche
stage_for_weaviate to stage unstructured outputs for upload to Weaviate, along with
a helper function for defining a class to use in Weaviate schemas.Installing detectron2 from source is no longer required when using the local-inference extra.
detectron2 from source is no longer required when using the local-inference extra..pptx parsing to include text in tables._add_element_metadata that caused all elements to have page_number=1
in the element metadata..log as a file extension for TXT files..eml) files if an error related to the encoding is raised and the user has not specified an encoding.replace_mime_encodingspartition_html when include_metadata=FalseValueError now raises if file_filename is not specified when you use partition_via_api
with a file-like object.Supports epub tests since pandoc is updated in base image
XLS support from auto partition
fast strategy for pdf now keeps element bounding box data
Add partition_csv for CSV files.
partition_csv for CSV files.Deprecate --s3-url in favor of --remote-url in CLI
--s3-url in favor of --remote-url in CLIfile_directory to metadatapage_name to metadata. Currently used for the sheet name in XLSX documents.--partition-strategy parameter to unstructured-ingest so that users can specify
partition strategy in CLI. For example, --partition-strategy fast.unstructured/file-utils/filetype.py to better utilise hashmap to return mime type.test_filetype.py.partition_xml for XML files.partition_xlsx for Microsoft Excel documents.hml filetype for partition as a variation of html filetype.pytesseract a function level import in partition_pdf so you can use the "fast"
or "hi_res" strategies if pytesseract is not installed. Also adds the
required_dependencies decorator for the "hi_res" and "ocr_only" strategies.filename is tracked in metadata for docx tables.Adds an "auto" strategy that chooses the partitioning strategy based on document characteristics and function kwargs. This is the new default strategy
"auto" strategy that chooses the partitioning strategy based on document
characteristics and function kwargs. This is the new default strategy for partition_pdf
and partition_image. Users can maintain existing behavior by explicitly setting
strategy="hi_res".get_date method to ElementMetadata for converting the datestring to a datetime object.filename attribute on ElementMetadata to remove the full filepath.partition_docx in docxfileutils/file_type check json and eml decode ignore errorpartition_email was updated to more flexibly handle deviations from the RFC-2822 standard.
The time in the metadata returns None if the time does not match RFC-2822 at all.Added support for SpooledTemporaryFile file argument.
Added an "ocr_only" strategy for partition_pdf. Refactored the strategy decision logic into its own module.
partition_pdf. Refactored the strategy decision
logic into its own module.Add an "ocr_only" strategy for partition_image.
partition_image.partition_multiple_via_api for partitioning multiple documents in a single REST
API call.stage_for_baseplate function to prepare outputs for ingestion into Baseplate.partition_odt for processing Open Office documents.partition_pdf fast strategy to group together text
in the same bounding box.Added logic to partition_pdf for detecting copy protected PDFs and falling back to the hi res strategy when necessary.
partition_pdf for detecting copy protected PDFs and falling back
to the hi res strategy when necessary.partition_via_api for partitioning documents through the hosted API.exceeds_cap_ratio handles empty (returns True instead of False)detect_filetype to properly detect JSONs when the MIME type is text/plain.Updated the table extraction parameter name to be more descriptive
Adds an ssl_verify kwarg to partition and partition_html to enable turning off SSL verification for HTTP requests. SSL verification is on by default.
ssl_verify kwarg to partition and partition_html to enable turning off
SSL verification for HTTP requests. SSL verification is on by default.partition_pdf and partition_image through
the ocr_language kwarg. ocr_language corresponds to the code for the language pack
in Tesseract. You will need to install the relevant Tesseract language pack to use a
given language.partition and partition_pdf..msg filesAllow headers to be passed into partition when url is used.
partition when url is used.bytes_string_to_string cleaning brick for bytes string output.exactly_one in partition_jsonNone in _read_xml._read_xml so that Markdown files with embedded HTML process correctly.partition_pdf and partition_text group broken paragraphs to avoid fragmented NarrativeText elements.Add OS mimetypes DB to docker image, mainly for unstructured-api compat.
partition_text to group together broken paragraphs.partition_rtf for processing rich text files.partition now accepts a url kwarg in addition to file and filename.replace_mime_encodings.partition_text to group together broken paragraphs.partition_rtf for processing rich text files.partition now accepts a url kwarg in addition to file and filename.replace_mime_encodings.Guard against null style attribute in docx document elements
Add sender, recipient, date, and subject to element metadata for emails
--download-only parameter to unstructured-ingestConvert file to str in helper split_by_paragraph for partition_text
split_by_paragraph for partition_textUpdate elements_to_json to return string when filename is not specified
elements_to_json to return string when filename is not specifiedelements_from_json may take a string instead of a filename with the text kwargdetect_filetype now does a final fallback to file extension.unstructured-ingest--max-docs parameter to unstructured-ingestpartition_msg for processing MSFT Outlook .msg files.convert_file_to_text now passes through the source_format and target_format kwargs.
Previously they were hard coded.text kwarg no longer raise an error if an empty
string is passed (and empty list of elements is returned instead).partition_json no longer fails if the input is an empty list.chunk_by_attention_window that caused the last word in segments to be cut-off
in some cases.stage_for_transformers now returns a list of elements, making it consistent with other
staging bricksRefactored codebase using exactly_one
exactly_onecontent_type and file_filename parameters to partition() to bypass file detection--flatten-metadata parameter to unstructured-ingest--fields-include parameter to unstructured-ingestFix problem with PDF partition (duplicated test)
contains_english_word(), used heavily in text processing, is 10x faster.--metadata-include and --metadata-exclude parameters to unstructured-ingestclean_non_ascii_chars to remove non-ascii characters from unicode stringpartition_pdf(..., strategy="fast")Start deprecation life cycle for unstructured-ingest --s3-url option, to be deprecated in favor of --remote-url.
FsspecConnector to easily integrate any existing fsspec filesystem as a connector.s3_connector.py to s3.py for readability and consistency with the
rest of the connectors.S3Connector relies on s3fs instead of on boto3, and it inherits
from FsspecConnector.UNSTRUCTURED_LANGUAGE_CHECKS environment variable to control whether or not language
specific checks like vocabulary and POS tagging are applied. Set to "true" for higher
resolution partitioning and "false" for faster processing.detect_filetype warning to include filename when provided.unstructured-ingest --s3-url option, to be deprecated in
favor of --remote-url.AzureBlobStorageConnector based on its fsspec implementation inheriting
from FsspecConnectorpartition_epub for partitioning e-books in EPUB3 format.message/rfc822 MIME type.auto.partition() can now load Unstructured ISD json documents.
auto.partition() can now load Unstructured ISD json documents.--wikipedia-auto-suggest argument to the ingest CLI to disable automatic redirection
to pages with similar names.encoding argument to the partition_(text/email/html) functions.unstructured-ingest now uses a default --download_dir of $HOME/.cache/unstructured/ingest rather than a "tmp-ingest-" dir in the working directory.
unstructured-ingest now uses a default --download_dir of $HOME/.cache/unstructured/ingest
rather than a "tmp-ingest-" dir in the working directory.setup_ubuntu.sh no longer fails in some contexts by interpreting
DEBIAN_FRONTEND=noninteractive as a commandunstructured-ingest no longer re-downloads files when --preserve-downloads
is used without --download-dir.Fixes an error causing JavaScript to appear in the output of partition_html sometimes.
partition_html sometimes.requires_dependencies decorator, including the error message
and how it was used, which had caused an error for unstructured-ingest --github-url ....Add requires_dependencies Python decorator to check dependencies are installed before instantiating a class or running a function
requires_dependencies Python decorator to check dependencies are installed before
instantiating a class or running a functionprocess_document file cleaning on failureNarrativeText
and FigureCaption elements to be represented as Text in HTML documents.Fallback to using file extensions for filetype detection if libmagic is not present
libmagic is not presentpartition_md partitioner.Added elements_to_json and elements_from_json for easier serialization/deserialization
elements_to_json and elements_from_json for easier serialization/deserializationconvert_to_dict, dict_to_elements and convert_to_csv are now aliases for functions
that use the ISD terminology.Automatically install nltk models in the tokenize module.
nltk models in the tokenize module.## 0.4.13 * Fixes unstructured-ingest cli.
Adds console_entrypoint for unstructured-ingest, other structure/doc updates related to ingest.
Adds partition_doc for partitioning Word documents in .doc format. Requires libreoffice.
partition_doc for partitioning Word documents in .doc format. Requires libreoffice.partition_ppt for partitioning PowerPoint documents in .ppt format. Requires libreoffice.Fixes ElementMetadata so that it's JSON serializable when the filename is a Path object.
ElementMetadata so that it's JSON serializable when the filename is a Path object.Added ingest modules and s3 connector
url=None for partition_pdf and partition_imageUNSTRUCTURED_LANGUAGE env var to "".Element objects now track metadataurl=None for partition_pdf and partition_imageUNSTRUCTURED_LANGUAGE env var to "".Element objects now track metadataModified XML and HTML parsers not to load comments.
Added the ability to pull an HTML document from a url in partition_html.
partition_html.partition for .pptx, .pdf, images, and .html files.to_dict method to document elements.replace_unicode_quotes.Loosen the default cap threshold to 0.5.
0.5.UNSTRUCTURED_NARRATIVE_TEXT_CAP_THRESHOLD environment variable for controlling
the cap ratio threshold.Text for HTML and plain text documents.Body Text styles no longer default to NarrativeText for Word documents. The style information
is insufficient to determine that the text is narrative.Address element for capturing elements that only contain an address.UserWarning when detectron is called.UNSTRUCTURED_TITLE_MAX_WORD_LENGTH
environment variable for controlling the max number of words in a title.partition_pptx to order the elements on the pageUpdated partition_pdf and partition_image to return unstructured Element objects
partition_pdf and partition_image to return unstructured Element objectscoordinates attribute to document objectsFigureCaption and CheckBox document elementsLayoutElement objectspartition_pptx for partitioning PowerPoint documentsAdds requests as a base dependency
requests as a base dependencyexceeds_cap_ratio so the function doesn't break with empty text_parse_received_data.detect_filetype to properly handle .doc, .xls, and .ppt.Added partition_image to process documents in an image format.
partition_image to process documents in an image format.partition_email with attachments for text/htmlAdded support for text files in the partition function
partition functionopencv-python for easier installation on LinuxAdded generic partition brick that detects the file type and routes a file to the appropriate partitioning brick.
partition brick that detects the file type and routes a file to the appropriate
partitioning brick.partition_html and partition_eml to support file-like objects in 'rb' mode.clean_ordered_bullets.extract_ordered_bullets.clean_ordered_bullets.extract_ordered_bullets.partition_docx for pre-processing Word Documents.parse_received_data and partition_headerpartition_textextract_ip_address, extract_ip_address_name, extract_mapi_id, extract_datetimetzImage element and function to find embedded images find_embedded_imagesget_directory_file_info for summarizing information about source documentsAdd support for local inference
partition_html that allows for processing div tags that have both text and child
elements.docx, .xlsx, and .jpg files.extract_attachment_info that extracts and decodes the attachment
of an email.Elements to a pandas dataframe.partition_email## 0.3.4 * Python-3.7 compat
Removes BasicConfig from logger configuration
partition_email partitioning brickreplace_mime_encodings cleaning brickspartition_email partitioning brickreplace_mime_encodings cleaning bricksEmailElement data structure to store email documentsAdded translate_text brick for translating text between languages
translate_text brick for translating text between languagesapply method to make it easier to apply cleaners to elementsAdded \_\_init.py\_\_ to partition
partitionOne column per quarter.