---
title: Filter by IDs
slug: graph/docs/filter-by-ids
docTags: 
createdAt: 2026-07-30T20:30:19.772Z
---

:::hint{type="info"}
**Note**
Optimizely Graph .NET Source SDK is optimized for CMS 12. Learn more about the [C# SDK for CMS 13](https://docs.developers.optimizely.com/content-management-system/v13.0.0-CMS/docs/overview-of-c-sharp-sdk).
:::

Use the `Ids` method to retrieve documents by GUID. The method accepts an array of GUID values.

```csharp
var query = queryBuilder
    .ForType<MyDocument>()
    .Ids("guid1", "guid2")
    .ToQuery()
    .BuildQueries();

var content = (await query.GetResultAsync<MyDocument>()).Content;
```
