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

# Query Prompts

> Search and filter prompts

Query prompts with search, filtering, and pagination options.

## Request Body

<ParamField body="search" type="string" required>
  Search term to filter prompts by name
</ParamField>

<ParamField body="tagsFilter" type="string[]" required>
  Array of tags to filter by. Empty array returns all prompts.
</ParamField>

<ParamField body="page" type="number" required>
  Page number for pagination (0-indexed)
</ParamField>

<ParamField body="pageSize" type="number" required>
  Number of results per page
</ParamField>

## Response

<ResponseField name="data" type="array">
  Array of prompt objects

  <Expandable title="Prompt Object">
    <ResponseField name="id" type="string">
      The unique identifier for the prompt
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the prompt template
    </ResponseField>

    <ResponseField name="tags" type="string[]">
      Array of tags associated with the prompt
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the prompt was created
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="error" type="string | null">
  Error message if the request failed, null otherwise
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.helicone.ai/v1/prompt-2025/query \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "search": "customer",
      "tagsFilter": ["support"],
      "page": 0,
      "pageSize": 10
    }'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://api.helicone.ai/v1/prompt-2025/query', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      search: 'customer',
      tagsFilter: ['support'],
      page: 0,
      pageSize: 10,
    }),
  });

  const result = await response.json();
  ```

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

  response = requests.post(
      'https://api.helicone.ai/v1/prompt-2025/query',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json',
      },
      json={
          'search': 'customer',
          'tagsFilter': ['support'],
          'page': 0,
          'pageSize': 10,
      },
  )

  result = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "data": [
      {
        "id": "prompt_abc123xyz",
        "name": "Customer Support Agent",
        "tags": ["support", "customer-service"],
        "created_at": "2024-03-10T12:00:00Z"
      },
      {
        "id": "prompt_def456uvw",
        "name": "Customer Feedback Analyzer",
        "tags": ["support", "analytics"],
        "created_at": "2024-03-09T10:30:00Z"
      }
    ],
    "error": null
  }
  ```

  ```json 500 Error theme={null}
  {
    "data": null,
    "error": "Failed to query prompts"
  }
  ```
</ResponseExample>

## Pagination

Use the `page` and `pageSize` parameters to paginate through results:

* Page 1: `page: 0`
* Page 2: `page: 1`
* Page 3: `page: 2`

Recommended `pageSize` values: 10, 25, 50, or 100

## Filtering

### Search by Name

The `search` parameter filters prompts by name (case-insensitive, partial match).

### Filter by Tags

The `tagsFilter` parameter accepts an array of tags:

* Empty array `[]` returns all prompts
* Single tag `["support"]` returns prompts with that tag
* Multiple tags `["support", "customer-service"]` returns prompts with any of those tags
