v1.1.0 2024-01-07 19:08 UTC

This package is auto-updated.

Last update: 2024-04-16 13:01:15 UTC



swiftyper-php API documentation for PHP.


PHP 5.6.0+.


You can install the bindings via Composer. Run the following command:

composer require swiftyper/swiftyper-php

To use the bindings, use Composer's autoload:


Manual installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file.



Before you start using it, you need to set the API key which you can manage through your user account.

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.

$results = \Swiftyper\Business::query([
    'query'   => 'Google Slovakia',
    'country' => 'SK',


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');

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.