> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Backend search with React InstantSearch

> Set up search on your backend with React InstantSearch.

<Note>
  This is the **React InstantSearch v7** documentation.
  If you're upgrading from v6, see the [upgrade guide](/doc/guides/building-search-ui/upgrade-guides/react/#migrate-from-react-instantsearch-v6-to-react-instantsearch-v7).
  If you were using React InstantSearch Hooks,
  this v7 documentation applies—just check for [necessary changes](/doc/guides/building-search-ui/upgrade-guides/react/#migrate-from-react-instantsearch-hooks-to-react-instantsearch-v7).
  To continue using v6, you can find the [archived documentation](https://algolia.com/old-docs/deprecated/instantsearch/react/v6/api-reference/instantsearch/).
</Note>

## Frontend versus backend search

You should use frontend search because:

* **It's faster**.
  Speed alone justifies the choice.
  Backend search requires two more trips between a user's browser and Algolia's servers.
  This decreases the effectiveness of Algolia's engine and infrastructure optimizations.

* **UI libraries aid development**.
  Algolia's UI libraries ([InstantSearch](/doc/guides/building-search-ui/getting-started/react) and [Autocomplete](/doc/ui-libraries/autocomplete/introduction/getting-started)) help build a frontend solution so that you can focus on configuring relevance and creating the best possible search experience.

* **It frees up your resources**.
  Algolia reduces the need for development and eliminates the requirement for additional server deployments and its associated infrastructure.

## Why backend search?

* Server-side pre-processing. Perhaps the most important reason for a backend solution is to make complex calculations or format your data before displaying the results.
* Real-time availability updates (like Airbnb)
* In some situations, SEO is easier to manage.

## How to implement backend search

You only need a few lines of code to send a query to Algolia and receive a response.
The response contains everything needed to build your UI.

You can perform backend search with either InstantSearch or one of the Algolia API clients.

### Backend InstantSearch

[Backend InstantSearch](/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/react) offers a good compromise.
You perform the search on your servers, carry out any required pre-processing,
and then send your results to InstantSearch's widgets.
This enables you to control the query and response but saves you the work of building a custom frontend.

### Backend search with an Algolia API client

This option requires a server-side solution and custom frontend development.
You manage all queries and responses, and you build the frontend UI.
You need to parse the API response, which includes:

* Results formatted for display, for example, full record content, embedded HTML, or image URLs
* Highlighting and snippeting
* Pagination

To learn more, see [Backend search with an API client](/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-search-with-an-api-client/react).
