Jun 23, 2025
Run a Composition
Runs a query on a single composition and returns matching results.
Usage
Required ACL:
search
Copy
1
2
3
4
5
6
7
8
9
10
use Algolia\AlgoliaSearch\Api\CompositionClient;
$client = CompositionClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY');
$response = $client->search(
'foo',
['params' => ['query' => 'batman',
],
],
);
Did you find this page helpful?