Combine external datasource with Algolia's records

Is there a way to combine an external data source with Algolia. For instance, I would like to combine Yelp search api results with Algolia results, so if I search for a business, I get Algolia results + missing businesses from the Yelp API.
The reason this is complicated is that the data resides on Algolia and search is done against Algolia’s server directly, not my own server. Combining data on my end is then not really possible.
Is it possible to achieve? Do you have a use case that shows some kind of implementation of such a case?

Hi there!

Algolia searches only in what is indexed by our servers, so we cannot really returns results coming from external datasources on our side.

Nonetheless, on a front end implementation it could be possible to mix our results with those from another API, like the Yelp API, by sending the query to the two APIs:

  1. user enters a query
  2. The query is sent to Algolia, like a regular search
  3. The same query is also sent to the Yelp API
  4. Depending on the result of both queries the front-end decides if the business is missing or not, but this is up to the development team

Downside is that it requires indeed a bit of development on your side. It could be done for example with the searchFunction hook from instantsearch: https://www.algolia.com/doc/api-reference/widgets/instantsearch/js/#widget-param-searchfunction

Hope it helps!

Thanks Thomas. Indeed, already implemented this on my cloud function.