Delv
Tavily
Getting Started Guide

How to Use Tavily

A practical guide to get you up and running with Tavily. Written by Delv Editorial, Delv Team.

Getting started with Tavily

In this guide, you'll learn how to set up Tavily and make your first API call to retrieve web data optimised for AI applications. You’ll be able to integrate real-time web information into your projects quickly and efficiently.

Step 1: Sign up and set up

  1. Go to tavily.com.
  2. Click on the “Get Started Free” button on the homepage.
  3. Fill in your details to create an account. You’ll receive a confirmation email; click the link to verify your account.
  4. Log in to your Tavily dashboard. Here, you can find your API key under the “API Keys” section.

Step 2: Your first API call

  1. Open your preferred API testing tool (like Postman or curl).
  2. Set the request type to GET.
  3. Enter the following URL in the request field: https://api.tavily.com/search.
  4. In the headers, add a new key: Authorization with the value Bearer YOUR_API_KEY (replace YOUR_API_KEY with the key you obtained in Step 1).
  5. In the query parameters, add:
- query: Your search term (e.g., latest AI trends).
  1. Click on “Send” to execute the request. You should receive a JSON response with relevant web data.

Step 3: Get better results

  • To refine your search, consider using additional query parameters, such as:
- max_results: Define the maximum number of results you want (e.g., 10). - language: Specify a language code (e.g., en for English).
  • Experiment with different search terms and parameters to see how the results change. This will help you understand what yields the best data for your needs.

Pro tip

Use the “Test API” feature in your Tavily dashboard to experiment with different queries and see the responses directly in the interface without needing any external tools. This can save you time while developing.

Common mistake to avoid

Avoid hardcoding your API key directly into your code. Instead, store it in environment variables or a secure configuration file to prevent unauthorised access.