> This page is for Web API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://ibkrcampus.com/docs/llms.txt.

# Create a Flex Query

Returning to the Flex Queries page, we will now need to generate at least one Activity Flex Query or Trade Confirmation Flex Query.

![Highlighting the Activity Flex Query and Trade Confirmation Flex Query sections of the Flex Queries page.](/docs/_fern-img/921cd975f2b11b576168061b265eff08e363213d2c0641e9025835acff61a3b6.webp)

Next, click on the **Info** icon to the left of a Flex Query.

![Highlighting the Information button for a Flex Query.](/docs/_fern-img/1ca6d83741b5f44b6c115879299bd1d62e48b2f1bdf2f61d3a631b3951aceb75.webp)

From the info pop-over, capture the **Query ID** number listed at the top. This will be used when generating your report.

![Highlight of the Query ID for a specific Flex Query.](/docs/_fern-img/669c4c77342ed87c9f02d506077ea5a510f63e35ea1c43fcf0113f1890144c22.webp)