## Find Files

`RetrievalFindPageResponse Beta.Retrieval.Find(RetrievalFindParamsparameters, CancellationTokencancellationToken = default)`

**post** `/api/v1/retrieval/files/find`

Search for files by name.

### Parameters

- `RetrievalFindParams parameters`

  - `required string indexID`

    Body param: ID of the index to search within.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? fileName`

    Body param: Exact file name to match.

  - `string? fileNameContains`

    Body param: Substring match on file name (case-insensitive).

  - `Long? pageSize`

    Body param: The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.

  - `string? pageToken`

    Body param: A page token, received from a previous list call. Provide this to retrieve the subsequent page.

### Returns

- `class RetrievalFindPageResponse:`

  Paginated file find results.

  - `required IReadOnlyList<RetrievalFindResponse> Items`

    The list of items.

    - `required string FileID`

      ID of the file.

    - `required string FileName`

      Display name of the file.

  - `string? NextPageToken`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `Long? TotalSize`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```csharp
RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };

var page = await client.Beta.Retrieval.Find(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### Response

```json
{
  "items": [
    {
      "file_id": "file_id",
      "file_name": "file_name"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```
