PHPackages                             helgesverre/extractor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. helgesverre/extractor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

helgesverre/extractor
=====================

AI-Powered Data Extraction for your Laravel application.

v0.5.0(2mo ago)22128.0k—8.7%22MITHTMLPHP ^8.3

Since Dec 2Pushed 2mo ago9 watchersCompare

[ Source](https://github.com/HelgeSverre/extractor)[ Packagist](https://packagist.org/packages/helgesverre/extractor)[ Docs](https://github.com/helgesverre/extractor)[ RSS](/packages/helgesverre-extractor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (34)Versions (24)Used By (0)

[![](art/header.png)](art/header.png)

Extractor: AI-Powered Data Extraction Library for Laravel.
==========================================================

[](#extractor-ai-powered-data-extraction-library-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3a6caa51a80f857d8984cbc8a8e4fc2eec2f8bba4a469364059953f70e5ee4c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656c67657376657272652f657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/3a6caa51a80f857d8984cbc8a8e4fc2eec2f8bba4a469364059953f70e5ee4c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656c67657376657272652f657874726163746f722e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/dedb797153b0db9189555bcefe0986743e1fdf6abc7d59429df8e01aeab086db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68656c67657376657272652f657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/dedb797153b0db9189555bcefe0986743e1fdf6abc7d59429df8e01aeab086db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68656c67657376657272652f657874726163746f722e7376673f7374796c653d666c61742d737175617265)

Effortlessly extract structured data from various sources, including images, PDFs, and emails, using OpenAI within your Laravel application.

Features
--------

[](#features)

- A convenient wrapper around OpenAI Chat and Completion endpoints.
- Supports multiple input formats such as Plain Text, PDF, Rtf, Images, Word documents and Web content.
- Includes a flexible Field Extractor that can extract any arbitrary data without writing custom logic.
- Can return a regular array or a [Spatie/data](https://spatie.be/docs/laravel-data/v3/introduction) object.
- Integrates with [Textract](https://aws.amazon.com/textract/) for OCR functionality.
- Uses [JSON Mode](https://platform.openai.com/docs/guides/text-generation/json-mode) for reliable structured output.

Example
-------

[](#example)

[![](art/example.png)](art/example.png)

Example code```
