always-open / oxylabs-api
Package to integrate with Oxylabs APIs
Requires
- php: ~8.3.1|~8.4.1
- ext-dom: *
- ext-libxml: *
- always-open/laravel-request-logger: ^3.0
- illuminate/contracts: ~10.0||~11.0||~12.0
- spatie/laravel-data: ~4.16
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ~10.0||~9.0||~8.22
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.8.8
- v0.8.7
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.5
- v0.7.4
- v0.7.3
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.0
- v0.5.12
- v0.5.11
- v0.5.10
- v0.5.9
- v0.5.8
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.29
- v0.3.28
- v0.3.27
- v0.3.26
- v0.3.25
- v0.3.24
- v0.3.23
- v0.3.22
- v0.3.21
- v0.3.20
- v0.3.19
- v0.3.18
- v0.3.17
- v0.3.16
- v0.3.15
- v0.3.14
- v0.3.13
- v0.3.12
- v0.3.11
- v0.3.10
- v0.3.9
- v0.3.8
- v0.3.7
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-fix/FLUX-511-content-hydration
This package is auto-updated.
Last update: 2026-09-09 13:52:57 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
composer require always-open/oxylabs-api
You can publish and run the migrations with:
php artisan vendor:publish --tag="oxylabs-api-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="oxylabs-api-config"
This is the contents of the published config file:
return [
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="oxylabs-api-views"
Usage
$oxylabsApi = new AlwaysOpen\OxylabsApi(); echo $oxylabsApi->echoPhrase('Hello, AlwaysOpen!');
Parse status
parse_status_code is a field of a response the Oxylabs parser actually produced, not of every
Oxylabs response. When the parser never ran - bot-check / CAPTCHA / error-page classes, unsupported
page types, raw type=html retrievals - Oxylabs omits the key entirely. The content DTOs therefore
type it as ?int, and getParseStatusCode() distinguishes three states:
| state | parse_status_code |
hasParseStatus() |
getParseStatusCode() |
|---|---|---|---|
| vendor reported a status we model | e.g. 12000 |
true |
that case, e.g. ParseStatus::SUCCESS |
| vendor reported a status we do not model yet | e.g. 12001 |
true |
ParseStatus::UNKNOWN |
| vendor reported no status at all | null |
false |
ParseStatus::NOT_REPORTED |
ParseStatus::NOT_REPORTED is a local sentinel (0) deliberately outside the vendor's 120xx
numbering space - it is never a code Oxylabs sent.
A NOT_REPORTED status means every other field on that content object is untrustworthy. Guard on
$content->success() or $content->hasParseStatus(), never on instanceof (now satisfied by an
all-null object) and never on empty() (always false for an object).
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.