PHPackages                             swiftyper/swiftyper-php - 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. [API Development](/categories/api)
4. /
5. swiftyper/swiftyper-php

ActiveLibrary[API Development](/categories/api)

swiftyper/swiftyper-php
=======================

swiftyper PHP Library

v1.1.2(1y ago)02.1k—0%1MITPHPPHP &gt;=5.6.0

Since May 15Pushed 1mo agoCompare

[ Source](https://github.com/swiftyper-sk/swiftyper-php)[ Packagist](https://packagist.org/packages/swiftyper/swiftyper-php)[ Docs](https://swiftyper.sk/)[ RSS](/packages/swiftyper-swiftyper-php/feed)WikiDiscussions main Synced today

READMEChangelog (9)DependenciesVersions (10)Used By (1)

Swiftyper PHP
=============

[](#swiftyper-php)

Documentation
-------------

[](#documentation)

[`swiftyper-php` API documentation](https://developers.swiftyper.sk/docs/api/php) for PHP.

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

[](#requirements)

PHP 5.6.0+.

Composer
--------

[](#composer)

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```
composer require swiftyper/swiftyper-php
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

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

Manual installation
-------------------

[](#manual-installation)

If you do not wish to use Composer, you can download the [latest release](https://github.com/swiftyper-sk/swiftyper-php/releases). Then, to use the bindings, include the `init.php` file.

```
require_once('/path/to/swiftyper-php/init.php');
```

Usage
-----

[](#usage)

Before you start using it, you need to set the API key which you can manage through your [user account](https://manage.swiftyper.sk/dashboard).

**API keys are unlimited by default.** Unlimited keys are not safe because they can be used by anyone and from anywhere. For production applications, we recommend setting API key restrictions as they help prevent unauthorized use and exhaustion of quotas. Restrictions determine which websites or IP addresses can use the API key.

```
\Swiftyper\Swiftyper::setApiKey('API_KEY_OF_SWIFTYPER_BUSINESS');
$results = \Swiftyper\Business::query([
    'query'   => 'Google Slovakia',
    'country' => 'SK',
]);

var_dump($results->toArray());
```

### Accessing the Response of a Request

[](#accessing-the-response-of-a-request)

You can get the data from the API response on any object through the `getLastResponse()` method.

```
$business = \Swiftyper\Business::detail('sk_WbilvhDEDokFTWk0FbNjeQ');
var_dump($business->getLastResponse());
```

### Configuring Automatic Retries

[](#configuring-automatic-retries)

It is possible to configure the library to retry a certain number of times in case of a request failure. This is useful when you want to make sure that a request is successfully processed even in case of a network failure.

```
\Swiftyper\Swiftyper::setMaxNetworkRetries(2);
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance69

Regular maintenance activity

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~166 days

Recently: every ~228 days

Total

9

Last Release

440d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dd2a282ad197d4dc306ad1fc38c4873f3763f91cbe099b0af74e3dc4cac558a?d=identicon)[swiftyper](/maintainers/swiftyper)

---

Top Contributors

[![richardDobron](https://avatars.githubusercontent.com/u/33115305?v=4)](https://github.com/richardDobron "richardDobron (21 commits)")

---

Tags

apiapiswiftyper

### Embed Badge

![Health badge](/badges/swiftyper-swiftyper-php/health.svg)

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

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22778.7k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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