> ## Documentation Index
> Fetch the complete documentation index at: https://test-62a57ffd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with the Brave Search API in minutes

## Introduction

This guide will walk you through everything you need to perform your first search using the Brave Search API. From creating your account to making your first API request, you'll be up and running in just a few minutes.

## Prerequisites

Before you begin, make sure you have:

* A valid email address for account registration
* A credit card for plan subscription (required also on free plans)
* Basic familiarity with making HTTP requests

## Step 1: Create Your Account

Visit the [Brave Search API Dashboard](https://brave.com/search/api/) to create your account:

1. Click on **Sign Up** or **Get Started**
2. Enter your email address and create a secure password
3. Verify your email address by clicking the confirmation link sent to your inbox
4. Complete your account profile

<Note>
  Account creation is free and only takes a minute. You won't be charged until
  you exceed the free tier limits.
</Note>

## Step 2: Subscribe to a Plan

Once your account is created, you'll need to subscribe to a plan to access the API:

1. Navigate to the **Plans** or **Subscription** section in your dashboard
2. Review the available plans and select one that fits your needs
3. Enter your credit card information

<Tip>
  **Free Plan Available**: We offer a free tier that includes generous monthly
  query limits. While a credit card is required to prevent fraud and abuse, you
  won't be charged unless you upgrade.
</Tip>

### Plan Options

Our plans are designed to scale with your needs:

* **Free Tier**: Perfect for testing and small projects (credit card required for verification)
* **Developer**: Ideal for production applications with moderate traffic
* **Professional**: For businesses with high-volume requirements
* **Enterprise**: Custom solutions with dedicated support and SLAs

## Step 3: Create an API Key

After subscribing to a plan, generate your API key:

1. Go to the **API Keys** section in your dashboard
2. Click on **Create New API Key**
3. Give your key a descriptive name (e.g., "Production App" or "Development")
4. Copy your API key and store it securely

<Warning>
  Your API key is confidential. Never share it publicly, commit it to version
  control, or expose it in client-side code. Treat it like a password.
</Warning>

## Step 4: Make Your First Search Request

Now you're ready to make your first search! The Brave Search API uses a simple REST architecture. All requests require your API key in the `X-Subscription-Token` header.

### Basic Web Search

Here's how to perform a basic web search:

<CodeGroup>
  ```bash cURL theme={null}
  curl -s --compressed "https://api.search.brave.com/res/v1/web/search?q=artificial+intelligence" \
    -H "Accept: application/json" \
    -H "Accept-Encoding: gzip" \
    -H "X-Subscription-Token: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.search.brave.com/res/v1/web/search"
  headers = {
      "Accept": "application/json",
      "Accept-Encoding": "gzip",
      "X-Subscription-Token": "YOUR_API_KEY"
  }
  params = {
      "q": "artificial intelligence"
  }

  response = requests.get(url, headers=headers, params=params)
  results = response.json()

  # Print the first search result
  if results.get("web", {}).get("results"):
      first_result = results["web"]["results"][0]
      print(f"Title: {first_result['title']}")
      print(f"URL: {first_result['url']}")
      print(f"Description: {first_result['description']}")
  ```

  ```javascript JavaScript (Node.js) theme={null}
  const axios = require("axios");

  const url = "https://api.search.brave.com/res/v1/web/search";
  const headers = {
    Accept: "application/json",
    "Accept-Encoding": "gzip",
    "X-Subscription-Token": "YOUR_API_KEY",
  };
  const params = {
    q: "artificial intelligence",
  };

  axios
    .get(url, { headers, params })
    .then((response) => {
      const results = response.data;

      // Print the first search result
      if (results.web?.results?.length > 0) {
        const firstResult = results.web.results[0];
        console.log(`Title: ${firstResult.title}`);
        console.log(`URL: ${firstResult.url}`);
        console.log(`Description: ${firstResult.description}`);
      }
    })
    .catch((error) => {
      console.error("Error:", error.response?.data || error.message);
    });
  ```

  ```javascript JavaScript (Fetch) theme={null}
  const url = new URL("https://api.search.brave.com/res/v1/web/search");
  url.searchParams.append("q", "artificial intelligence");

  fetch(url, {
    method: "GET",
    headers: {
      Accept: "application/json",
      "Accept-Encoding": "gzip",
      "X-Subscription-Token": "YOUR_API_KEY",
    },
  })
    .then((response) => response.json())
    .then((results) => {
      // Print the first search result
      if (results.web?.results?.length > 0) {
        const firstResult = results.web.results[0];
        console.log(`Title: ${firstResult.title}`);
        console.log(`URL: ${firstResult.url}`);
        console.log(`Description: ${firstResult.description}`);
      }
    })
    .catch((error) => console.error("Error:", error));
  ```
</CodeGroup>

### Understanding the Response

A successful search returns a JSON object with various result types:

```json theme={null}
{
  "type": "search",
  "query": {
    "original": "artificial intelligence"
  },
  "web": {
    "results": [
      {
        "title": "Artificial Intelligence - Overview",
        "url": "https://example.com/ai",
        "description": "Learn about artificial intelligence...",
        "age": "2024-10-08T10:30:00.000Z"
      }
    ]
  }
}
```

### Monitor Your Usage

Keep track of your API usage in the dashboard to:

* Stay within your plan limits
* Optimize your query patterns
* Plan for scaling needs

## Next Steps

Congratulations! You've made your first search with the Brave Search API. Here's what to explore next:

<CardGroup cols={2}>
  <Card title="Authentication Guide" icon="key" href="/guides/authentication">
    Learn more about securing your API requests
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore all available endpoints and parameters
  </Card>

  <Card title="Rate Limiting" icon="gauge" href="/guides/rate-limiting">
    Understand rate limits and how to optimize requests
  </Card>

  <Card title="API Versioning" icon="code-branch" href="/guides/versioning">
    Learn about API versions and backward compatibility
  </Card>
</CardGroup>

## Need Help?

If you run into any issues or have questions:

* Check our [API Documentation](/api-reference/introduction) for detailed endpoint information
* Review our [Security Guidelines](/resources/security) for best practices
* Contact our support team through the dashboard
