algolia / algoliasearch-client-php
API powering the features of Algolia.
Installs: 24 934 550
Dependents: 107
Suggesters: 13
Security: 0
Stars: 673
Watchers: 88
Forks: 116
Open Issues: 17
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/psr7: ^2.0
- psr/http-message: ^1.1 || ^2.0
- psr/log: ^1.0 || ^2.0 || ^3.0
- psr/simple-cache: ^1.0 || ^2.0 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0 || ^3.5.0
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^11.0
- vlucas/phpdotenv: ^5.4
Suggests
- guzzlehttp/guzzle: If you prefer to use Guzzle HTTP client instead of the Http Client implementation provided by the package
- dev-main
- 4.9.2
- 4.9.1
- 4.9.0
- 4.8.1
- 4.8.0
- 4.7.0
- 4.6.4
- 4.6.3
- 4.6.2
- 4.6.1
- 4.6.0
- 4.5.0
- 4.4.4
- 4.4.3
- 4.4.2
- 4.4.1
- 4.4.0
- 4.3.5
- 4.3.4
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.2
- 4.0.1
- 4.0.0
- 4.0.0-beta.15
- 4.0.0-beta.14
- 4.0.0-beta.13
- 4.0.0-beta.12
- 4.0.0-beta.11
- 4.0.0-beta.10
- 4.0.0-beta.9
- 4.0.0-beta.8
- 4.0.0-beta.7
- 4.0.0-beta.6
- 4.0.0-beta.5
- 4.0.0-beta.4
- 4.0.0-beta.3
- 4.0.0-beta.2
- 4.0.0-beta.1
- 4.0.0-alpha.106
- 4.0.0-alpha.105
- 4.0.0-alpha.104
- 4.0.0-alpha.103
- 4.0.0-alpha.102
- 4.0.0-alpha.101
- 4.0.0-alpha.100
- 4.0.0-alpha.99
- 4.0.0-alpha.98
- 4.0.0-alpha.97
- 4.0.0-alpha.96
- 4.0.0-alpha.95
- 4.0.0-alpha.94
- 4.0.0-alpha.93
- 4.0.0-alpha.92
- 4.0.0-alpha.91
- 4.0.0-alpha.90
- 4.0.0-alpha.89
- 4.0.0-alpha.88
- 4.0.0-alpha.87
- 4.0.0-alpha.86
- 4.0.0-alpha.85
- 4.0.0-alpha.84
- 4.0.0-alpha.83
- 4.0.0-alpha.82
- 4.0.0-alpha.81
- 4.0.0-alpha.80
- 4.0.0-alpha.79
- 4.0.0-alpha.78
- 4.0.0-alpha.77
- 4.0.0-alpha.76
- 4.0.0-alpha.74
- 4.0.0-alpha.73
- 4.0.0-alpha.72
- 4.0.0-alpha.71
- 4.0.0-alpha.70
- 4.0.0-alpha.69
- 4.0.0-alpha.68
- 4.0.0-alpha.67
- 4.0.0-alpha.66
- 4.0.0-alpha.65
- 4.0.0-alpha.64
- 4.0.0-alpha.63
- 4.0.0-alpha.62
- 4.0.0-alpha.61
- 4.0.0-alpha.59
- 4.0.0-alpha.58
- 4.0.0-alpha.57
- 4.0.0-alpha.56
- 4.0.0-alpha.55
- 4.0.0-alpha.54
- 4.0.0-alpha.53
- 4.0.0-alpha.52
- 4.0.0-alpha.51
- 4.0.0-alpha.50
- 4.0.0-alpha.49
- 4.0.0-alpha.33
- 4.0.0-alpha.23
- 4.0.0-alpha.15
- 4.0.0-alpha.14
- 4.0.0-alpha.13
- 4.0.0-alpha.12
- 4.0.0-alpha.11
- 4.0.0-alpha.10
- 4.0.0-alpha.9
- 4.0.0-alpha.8
- 4.0.0-alpha.7
- 4.0.0-alpha.6
- 4.0.0-alpha.5
- 4.0.0-alpha.4
- 4.0.0-alpha.3
- 4.0.0-alpha.2
- v3.x-dev
- 3.4.1
- 3.4.0
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- v2.x-dev
- 2.8.0
- 2.7.3
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 2.0.0-RC
- 2.0.0-alpha.2
- 2.0.0-alpha.1
- 2.0.0-alpha
- 1.x-dev
- 1.28.1
- 1.28.0
- 1.27.0
- 1.26.1
- 1.26.0
- 1.25.1
- 1.25.0
- 1.24.0
- 1.23.1
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.12.0
- 1.11.0
- 1.10.3
- 1.10.2
- 1.10.1
- 1.10.0
- 1.9.4
- 1.9.3
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.8
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.1
- 1.2.2
- 1.2.0
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- dev-ci
- dev-fix/saveobjects-error-msg
- dev-feat/enable-gzip
- dev-backup/file-based-caching-strategy
This package is auto-updated.
Last update: 2024-11-20 10:29:55 UTC
README
The perfect starting point to integrate Algolia within your PHP project
Documentation • Laravel • Symfony • Community Forum • Stack Overflow • Report a bug • FAQ • Support
✨ Features
- Thin & minimal low-level HTTP client to interact with Algolia's API
- Supports php
^8.0
.
💡 Getting Started
First, install Algolia PHP API Client via the composer package manager:
composer require algolia/algoliasearch-client-php "^4.0"
You can now import the Algolia API client in your project and play with it.
use Algolia\AlgoliaSearch\Api\SearchClient; $client = SearchClient::create('<YOUR_APP_ID>', '<YOUR_API_KEY>'); // Add a new record to your Algolia index $response = $client->saveObject( '<YOUR_INDEX_NAME>', ['objectID' => 'id', 'test' => 'val', ], ); // play with the response var_dump($response); // Poll the task status to know when it has been indexed $client->waitForTask('<YOUR_INDEX_NAME>', $response['taskID']); // Fetch search results, with typo tolerance $response = $client->search( ['requests' => [ ['indexName' => '<YOUR_INDEX_NAME>', 'query' => '<YOUR_QUERY>', 'hitsPerPage' => 50, ], ], ], ); // play with the response var_dump($response);
For full documentation, visit the Algolia PHP API Client.
❓ Troubleshooting
Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client. You can also open a GitHub issue
Contributing
This repository hosts the code of the generated Algolia API client for PHP, if you'd like to contribute, head over to the main repository. You can also find contributing guides on our documentation website.
📄 License
The Algolia PHP API Client is an open-sourced software licensed under the MIT license.