What is Algolia

Algolia empowers modern developers to build world class search and discovery experiences without any DevOps.
Libraries with every major language and framework make it easy to enrich your users' experiences. 

API-first search and discovery for your PHP applications

Utilize the Algolia open-source PHP API client to index your data, configure your search, add analytics and much more.  

Algolia is an API-First Search and Discovery platform that empowers builders to compose experiences at scale. Explore Algolia

Get started

INSTALL (GET A FREE ACCOUNT HERE.)


        
          
            

composer require algolia/algoliasearch-client-php

INDEX


        
          
            

$res = $index->saveObjects(
  [
    [
      'objectID'  => 'myID1',
      'firstname' => 'Jimmie',
      'lastname'  => 'Barninger'
    ],
    [
      'objectID'  => 'myID2',
      'firstname' => 'Warren',
      'lastname'  => 'Speach'
    ]
  ]
);

SEARCH


        
          
            

$index = $client->initIndex('contacts');

// without search parameters
$res = $index->search('query string');

// with search parameters
$res = $index->search('query string', [
  'attributesToRetrieve' => [
    'firstname',
    'lastname',
  ],
  'hitsPerPage' => 50
]);

Enable anyone to build great Search & Discovery