PHPackages                             foxentry/php-api-client - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. foxentry/php-api-client

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

foxentry/php-api-client
=======================

Foxentry.com PHP API client

v3.0.0(1w ago)643.6k↓23.2%2MITPHPPHP &gt;=8.1CI passing

Since Sep 22Pushed 1w ago3 watchersCompare

[ Source](https://github.com/Foxentry/php-sdk)[ Packagist](https://packagist.org/packages/foxentry/php-api-client)[ RSS](/packages/foxentry-php-api-client/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (14)Versions (12)Used By (0)

Foxentry PHP API Client library Documentation
=============================================

[](#foxentry-php-api-client-library-documentation)

Introduction
------------

[](#introduction)

The Foxentry PHP API Client library enables seamless integration of various data validation features into your applications. Whether you require validation for phone numbers, addresses, emails, or other data types, this library offers a user-friendly interface to interact with the Foxentry API. For more comprehensive information about Foxentry, please visit [foxentry.com](https://foxentry.com/)

If you have questions or need further assistance, reach out to us at

Requirements
------------

[](#requirements)

To use the Foxentry API client, you need the following:

- [A Foxentry account](https://app.foxentry.com/registration)
- An Application project created with a generated API key
- PHP version 8.1 or higher

Installation
------------

[](#installation)

To begin using the Foxentry PHP API Client library, follow these installation steps:

### With Composer

[](#with-composer)

1. Install the library using Composer:

```
composer require foxentry/php-api-client
```

2. Include the Composer autoloader in your PHP script:

```
require_once 'vendor/autoload.php';
```

### Without Composer

[](#without-composer)

1. Download the library and add it to your project.
2. Include the file **vendor/autoload.php** in your PHP script.

```
include_once "foxentry-php-client/vendor/autoload.php"
```

Getting started
---------------

[](#getting-started)

To initiate the usage of the Foxentry PHP API Client library, create an instance of the API client with your API key. This instance allows you to access various resources (e.g., phone, location, email, etc.) and call their methods to access the Foxentry API's functionalities.

### Full example of e-mail validation

[](#full-example-of-e-mail-validation)

```
// Require the autoloader file to load necessary dependencies from the "vendor" directory.
require "vendor/autoload.php";

// Import the Foxentry\ApiClient class, making it available for use in this script.
use Foxentry\ApiClient;

/*
Create a new instance of the ApiClient class and provide your API key.
The API key can be generated in the Foxentry administration under Settings > API Keys section.
*/
$api = new ApiClient();
$api->setAuth("[YOUR API KEY]");

// Set custom parameters for the email validation request.
$response = $api->email()
    ->setCustomId("CustomRequestID") // Sets a custom request ID.
    ->setClientIP("127.0.0.1") // Sets the client IP address.
    ->includeRequestDetails() // Returns the request in API response
    ->setClientCountry("CZ") // Sets the client country code.
    ->setOptions([
        "acceptDisposableEmails" => false // Disables acceptance of disposable emails.
    ])
    ->validate("info@foxentry.cz"); // Sends request to Foxentry API and performs email validation.

// Displays the result of email validation.
echo $response->getResult()->isValid ? "E-mail is Valid" : "E-mail is invalid";
```

APIClient class
---------------

[](#apiclient-class)

The APIClient class is the main class responsible for communication with the API.

It offers the following methods:

MethodParametersDescriptionsetAuth`API key`Sets API key, that will be used in requestssetApiVersion`version number`Sets specific API version, that will be usedTo access various resources from this class, simply provide the resource name, and you will be able to access the resource's methods, e.g., `$api->email()->search($query)`, `$api->company()->get($query)`, etc.

Resources
---------

[](#resources)

The API client provides various resources, each with its own related methods listed below. You can click on the methods to navigate to the [API documentation](https://foxentry.dev/), where you can explore all request inputs, options, and more.

ResourceMethodsCompany[validate](https://foxentry.dev/reference/validatecompanydata)
[search](https://foxentry.dev/reference/companysearch)
[get](https://foxentry.dev/reference/getcompanydata)Email[validate](https://foxentry.dev/reference/validateemail)
[search](https://foxentry.dev/reference/emailsearch)Location[validate](https://foxentry.dev/reference/locationvalidation)
[search](https://foxentry.dev/reference/locationsearch)
[get](https://foxentry.dev/reference/locationget)
 [localization](https://foxentry.dev/reference/locationlocalization)Name[validate](https://foxentry.dev/reference/namevalidation)Phone[validate](https://foxentry.dev/reference/validatephonenumber)In each method, you **must specify query parameters** according to the specific endpoint in the [API documentation](https://foxentry.dev/).

To specify options, use the method **setOptions(\[\])**

To specify the client, use the methods **setClientIP($ip)**, **setClientCountry($country)** or **setClientLocation($lat, $lon)**.

Response class
--------------

[](#response-class)

Response class is returned with every request providing methods below:

MethodParametersDescriptiongetStatus`None`Returns status code of the responsegetResponse`None`Returns full response from the APIgetRequest`None`Returns informations about the sent requestgetResult`None`Returns result object from the responsegetResultCorrected`None`Returns corrected results from the responsegetSuggestions`None`Returns suggestions from the responsegetErrors`None`Returns errors from the responsegetHeaders`None`Returns request headers from the responsegetRateLimit`None`Returns request rate limit for the APIgetRateLimitPeriod`None`Returns reset period of request rate limitgetRateLimitRemaining`None`Returns remaining rate of requestsgetDailyCreditsLeft`None`Returns remaining daily creditsgetDailyCreditsLimit`None`Returns daily credits limitgetApiVersion`None`Returns API version used in the requestTesting
-------

[](#testing)

The library includes unit tests to ensure its functionality and provide examples of how the library can be used. You can run the unit tests using PHPUnit. Don't forget to set your API key for these tests by creating the phpunit.xml file.

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance98

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~111 days

Recently: every ~166 days

Total

10

Last Release

9d ago

Major Versions

v2.3.3 → v3.0.02026-06-25

PHP version history (3 changes)v2.0.0PHP &gt;=7.4

v2.3.2PHP &gt;=8.2

v2.3.3PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bae6bcf665869b341aadd823c1ca5358cb1d8971af2de767d133782f8d583de?d=identicon)[foxentrycom](/maintainers/foxentrycom)

---

Top Contributors

[![Pryx](https://avatars.githubusercontent.com/u/5222912?v=4)](https://github.com/Pryx "Pryx (23 commits)")[![tomasmrazko](https://avatars.githubusercontent.com/u/16528296?v=4)](https://github.com/tomasmrazko "tomasmrazko (2 commits)")[![MartinPrivoznik](https://avatars.githubusercontent.com/u/46354689?v=4)](https://github.com/MartinPrivoznik "MartinPrivoznik (1 commits)")

---

Tags

foxentryphpsdkvalidationFoxentryFoxentry.com

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/foxentry-php-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/foxentry-php-api-client/health.svg)](https://phpackages.com/packages/foxentry-php-api-client)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M45](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
