Integrate Meilisearch Cloud with Vercel
In this guide you will learn how to link a Meilisearch Cloud instance to your Vercel project.
Introducing our tools
What is Vercel?
Vercel is a cloud platform for building and deploying web applications. It works out of the box with most popular web development tools.
What is Meilisearch Cloud?
Meilisearch Cloud offers a managed search service that is scalable, reliable, and designed to meet the needs of all companies.
Integrate Meilisearch into your Vercel project
Create and deploy a Vercel project
From your Vercel dashboard, create a new project. You can create a project from a template, or import a Git repository.
Select your project, then click on Deploy. Once deployment is complete, go back to your project’s dashboard.
Add the Meilisearch integration
Go to the project settings tab and click on Integrations on the sidebar menu to the left of your screen.
Search for the Meilisearch integration in the search bar. Click on the Add integration button.
Select the Vercel account or team and the project you to which you want to add the integration. You may add the Meilisearch integration to one or more projects in this menu.
Click on Continue. Vercel will display a list with the permissions the integration needs to work properly. Review it, then click on Add Integration.
Set up Meilisearch Cloud
Vercel will redirect you to the Meilisearch Cloud page. Log in or create an account. New accounts enjoy a 14-day free trial period.
You can choose an existing project or create a new one. To create a new project, complete the form with the project name and region.
Once you click on Create project, you should see the following message: “Your Meilisearch + Vercel integration is one click away from being completed.” Click "Finish the Vercel integration setup". Meilisearch will then redirect you back to the Vercel integration page.
Understand and use Meilisearch API keys
Meilisearch creates two default API keys:
Default Search API Key and
Default Admin API Key.
Admin API key
Default Admin API Key, to control who can access or create new documents, indexes, and change index settings. Be careful with the admin key and avoid exposing it in public environments.
Search API key
Default Search API Key to access the search route. This is the one you want to use in your front end.
Both keys are automatically added to Vercel along with the Meilisearch URL.
The master key–which hasn’t been added to Vercel–grants users full control over an instance. You can find it in your project’s overview on your Meilisearch Cloud dashboard. Read more about Meilisearch security.
Review your project settings
Go back to your project settings and check the new Meilisearch environment variables:
When using Next.js, ensure you prefix your browser-facing environment variables with
NEXT_PUBLIC_. This makes them available to the browser side of your application.
Take advantage of the Meilisearch Cloud dashboard
Use the Meilisearch Cloud dashboard, to index documents and manage your project settings.
Resources and next steps
You are now ready to start searching!