# Search account

<mark style="color:green;">`GET`</mark>  `/api/v2/directory/accounts/search`

This endpoint facilitates the search of an account using various lookup values, such as business and legal name representations, or first name and last name representations, or the email. If the provided lookup value does not match any account record, the endpoint will return no results.

Query Parameters

<table><thead><tr><th width="214">Name</th><th>Type</th><th width="345">Description</th><th>Required</th></tr></thead><tbody><tr><td><code>search_term</code></td><td>string</td><td>The parameter 'search_term' is used to search for either, <mark style="color:orange;"><code>business_name</code></mark> or <mark style="color:orange;"><code>legal_name</code></mark>, <mark style="color:orange;"><code>first_name</code></mark> or <mark style="color:orange;"><code>last_name</code></mark>, or <mark style="color:orange;"><code>email</code></mark>.</td><td>True</td></tr><tr><td><code>account_category</code></td><td>string</td><td>The category of the account. Either <mark style="color:orange;"><code>customer</code></mark> or <mark style="color:orange;"><code>recipient</code></mark>. When category is not specified, all categories are searched.</td><td></td></tr><tr><td><code>account_type</code></td><td>string</td><td>The type of the account. Either <mark style="color:orange;"><code>individual</code></mark> or <mark style="color:orange;"><code>entity</code></mark>. When type is not specified, all types are searched.</td><td></td></tr></tbody></table>

Response

{% tabs %}
{% tab title="200" %}

```json
{
    "status": "success",
    "data": [
        {
            "reference_id": "account0001",
            "account_type": "Individual",
            "name": "Devin Booker",
            "account_category": "recipient",
            "email": "devin@example.com",
            "created": "2024-03-19T10:56:56+00:00",
            "last_modified": "2024-05-02T13:00:30+00:00"
        },
        {
            "reference_id": "account0002",
            "account_type": "Entity",
            "name": "Crypto Legal",
            "account_category": "customer",
            "email": "crypto.legal@example.com",
            "created": "2024-09-05T13:58:19+00:00",
            "last_modified": "2024-09-05T13:58:19+00:00"
        },
        {
            "reference_id": "account0003",
            "account_type": "Individual",
            "name": "Clovis Mraz",
            "account_category": "customer",
            "email": "clovis@example.com",
            "created": "2024-05-03T05:04:00+00:00",
            "last_modified": "2024-05-03T05:04:00+00:00"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# 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.ospree.io/ospree-api/accounts-directory/search-account.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.
