helgesverre/extractor
Extractor is a Laravel package that uses OpenAI to pull structured data out of images, PDFs, emails, Word docs, and web pages. Define fields, get arrays or Spatie data objects back—no custom parsing logic needed.
Full changelog: https://github.com/HelgeSverre/extractor/compare/v0.5.0...v0.5.1
GPT_5_4, GPT_5_4_PRO, GPT_5_3, GPT_5_2, GPT_5_2_PRO, GPT_5_1, GPT_5, GPT_5_PRO, GPT_5_MINI, GPT_5_NANOGPT_4_1, GPT_4_1_MINI, GPT_4_1_NANOO4_MINI, O3, O3_MINI, O3_PRO, O1, O1_PROmax_completion_tokens used instead of max_tokens, temperature omitted automaticallyGPT_4O, GPT_4O_MINI (cleaner naming, old aliases deprecated)EXTRACTOR_MODEL env var (defaults to gpt-4o-mini)ImageContent detail parameter for OpenAI vision API (low, high, auto)response_format sent with all requests for reliable structured outputopenai-php/laravel constraint to support v0.10.2 through v0.19+gpt-3.5-turbo-1106 to gpt-4o-mini$model, $maxTokens, $temperature parameters are now nullable with config fallback chainsTEXT_DAVINCI_*, GPT_3_*, GPT_4_VISION, etc.)isCompletionModel(), isJsonModeCompatibleModel(), isHybridModel(), isOhOne() methodsSee UPGRADING.md for a full migration guide.
All model families verified against the live OpenAI API:
| Model | Status |
|---|---|
| gpt-4o, gpt-4o-mini | ✅ |
| gpt-5, gpt-5-mini, gpt-5-nano | ✅ |
| gpt-5.1, gpt-5.2, gpt-5.4 | ✅ |
| gpt-5-mini (vision) | ✅ |
| o3-mini, o4-mini, o1 | ✅ |
declare(strict_types=1) to all source files for improved type safetytest-laravel-install.sh)json_last_error_msg() for better debuggingFactory::fromMime() rescue fallbacks to use lazy evaluation (closures)==) to strict equality (===) in ImageContentextractor_*Extractor::prompt() to explicitly call ->render() on View objectsEngine.php for vision model errorsFactory::fromMime() fallback handlingFull Changelog: https://github.com/HelgeSverre/extractor/compare/v0.3.0...v0.4.0
Word.php loader implementationFull Changelog: https://github.com/HelgeSverre/extractor/compare/v0.2.2...v0.3.0
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.2.1...v0.2.2
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.2.0...v0.2.1
Fix booboo
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.3...v0.2.0
Updated dependancies and changed stuff in the readme.
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.2...v0.1.3
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.1...v0.1.2
smalot/pdfparser from v2.9.0 to ^2.10Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.1.0...v0.1.1
Add support for Laravel 11
prinsfrank/standards from dependancies, it was not used.| Package Name | Old Version | New Version |
|---|---|---|
| league/flysystem-aws-s3-v3 | ^3.16 | ^3.22.0 |
| openai-php/laravel | ^0.7.0 | ^v0.8.1 |
| smalot/pdfparser | * | v2.8.0 |
| spatie/laravel-data | ^3.9 | ^3.11.0 |
| spatie/laravel-package-tools | ^1.14.0 | ^1.16.2 |
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.10...v0.0.11
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.9...v0.0.10
textract_version and textract_secret in config/extractor.php.Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.8...v0.0.9
fromMime($mime, $content in HelgeSverre\Extractor\Text\Factory::classFull Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.7...v0.0.8
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.6...v0.0.7
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.5...v0.0.6
gpt-3.5-turbo-1106 as the default model.Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.4...v0.0.5
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.3...v0.0.4
Full Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.2...v0.0.3
$outputKey in builtin promptFull Changelog: https://github.com/HelgeSverre/extractor/compare/v0.0.1...v0.0.2
Pre-release.
How can I help you explore Laravel packages today?