> For the complete documentation index, see [llms.txt](https://docs.pex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pex.com/search/api-documentation/start-search-use-case.md).

# Start Search (Use Case Search)

#### Start Use-Case Search

```
POST https://search.pex.com/api/v1/search/start-search-use-case
```

Starts a Search lookup based on a predefined use case.

This is the recommended endpoint for most client integrations. Clients using this endpoint only need to choose a desired use case and the API will automatically determine the underlying fingerprint types, search types, and catalog configuration required for that workflow.

#### Request

<table><thead><tr><th>Field</th><th width="155.9375">Type</th><th width="149.19140625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>use_case</code></td><td>string</td><td>Yes</td><td>Predefined Search use case.</td></tr><tr><td><code>media_file</code></td><td>file</td><td>Yes</td><td>Media file to process.</td></tr></tbody></table>

#### Supported `use_case` Values

| Value                    | Description                                                                                                                                  |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `identify_music`         | Identify commercially distributed sound recordings within media to support detection and rights management workflows.                        |
| `classify_content`       | Segment content into music, speech, and silence, with additional acoustic categories to enable structured tagging and content management.    |
| `find_song_usage`        | Track where your sound recordings appear across commercial releases and music platforms to support rights monitoring and catalog protection. |
| `find_composition_usage` | Identify where your compositions are used across covers, live performances and derivative works to support publishing oversight.             |

#### `media_file` Info

Each search request requires a media file to be provided using the `media_file` field.

Endpoints that accept media files use `multipart/form-data`.

Supported formats generally include any media format supported by FFmpeg.

Please try to keep uploaded files under 100 MB.

#### Examples

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

```python
import requests

ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"
MEDIA_FILE_PATH = "./example.mp3"

headers = {
    "Authorization": f"Bearer {ACCESS_TOKEN}",
}

with open(MEDIA_FILE_PATH, "rb") as media_file:
    response = requests.post(
        "https://search.pex.com/api/v1/search/start-search-use-case",
        headers=headers,
        files={
            "media_file": media_file,
        },
        data={
            "use_case": "identify_music",
        },
    )

response.raise_for_status()

print(response.json())
```

{% endtab %}

{% tab title="Bash" %}

```bash
CLIENT_ID="YOUR_CLIENT_ID"
CLIENT_SECRET="YOUR_CLIENT_SECRET"
ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
MEDIA_FILE_PATH="./example.mp3"

curl -X POST "https://search.pex.com/api/v1/search/start-search-use-case" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -F "use_case=identify_music" \
  -F "media_file=@${MEDIA_FILE_PATH}"
```

{% endtab %}
{% endtabs %}

#### Response

A successful request returns one `lookup_id`.

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

```json
{
  "lookup_id": "123456789012345678"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.pex.com/search/api-documentation/start-search-use-case.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.
