# Search

Verida’s **Search** APIs let you perform powerful keyword-based searches across multiple data sources. Each search endpoint uses the specified **credit** amount per call.

***

#### 1. Chat Thread Search

* **HTTP Method & Endpoint**: `GET /search/chat-threads`
* **Summary**: Search through **all chat threads** for matching keywords.
* **Credit Usage**: **2 credits**
* **Scope:** `api:search-chat-threads`
* **Example**:

  ```bash
  curl -X GET "https://api.verida.ai/api/rest/v1/search/chat-threads?keywords=urgent" \
       -H "Authorization: Bearer YOUR_AUTH_TOKEN"
  ```
* **Full Documentation**:\
  Search: Chat Threads

***

#### 2. Datastore Search

* **HTTP Method & Endpoint**: `GET /search/ds` or `POST /search/ds`
* **Summary**: Perform a keyword search across **a specific datastore**.
* **Credit Usage**: **1 credit**
* **Scope:** `api:search-ds`
* **Example**:

  ```bash
  # Using GET
  curl -X GET "https://api.verida.ai/api/rest/v1/search/ds?keywords=invoice&datastore=social-email" \
       -H "Authorization: Bearer YOUR_AUTH_TOKEN"
  ```
* **Full Documentation**:\
  Search: Datastore

***

#### 3. Universal Search

* **HTTP Method & Endpoint**: `GET /search/universal`
* **Summary**: Perform a keyword search **across all user data** (datastores, databases, etc.) the user has granted access to.
* **Credit Usage**: **2 credits**
* **Scope:** `api:search-universal`
* **Example**:

  ```bash
  curl -X GET "https://api.verida.ai/api/rest/v1/search/universal?keywords=meeting+agenda" \
       -H "Authorization: Bearer YOUR_AUTH_TOKEN"
  ```
* **Full Documentation**:\
  Search: Universal

## Vector database?

As an AI developer you may be asking, does Verida offer a Vector Database over user data?

We currently don't, because from our testing Vector Databases require more resources to create than a traditional high performance keyword index and produces sub-par results when working with user data.

We are happy to re-assess this if there's a use case that specifically requires a Vector Database.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verida.ai/data-apis/api-endpoints/search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
