# Method: queries.run

- [HTTP request](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#body.request_body)
- [Response body](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#body.response_body)
- [Authorization scopes](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#body.aspect)
- [RunQueryRequest](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#RunQueryRequest)
  - [JSON representation](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#RunQueryRequest.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/bid-manager/reference/rest/v2/queries/run#try-it)

Runs an existing query to generate a report.

### HTTP request

`POST https://doubleclickbidmanager.googleapis.com/v2/queries/{queryId}:run`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `queryId` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. The ID of the query to run. |

### Query parameters

| Parameters ||
|---|---|
| `synchronous` | `boolean` Whether the query should be run synchronously. When `true`, the request won't return until the resulting report has finished running. This parameter is `false` by default. Setting this parameter to `true` is **not recommended**. |

### Request body

The request body contains an instance of `https://developers.google.com/bid-manager/reference/rest/v2/queries/run#RunQueryRequest`.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/bid-manager/reference/rest/v2/queries.reports#Report`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/doubleclickbidmanager`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## RunQueryRequest

Details specifying how to run a query.

| JSON representation |
|---|
| ``` { "dataRange": { object (`https://developers.google.com/bid-manager/reference/rest/v2/queries#DataRange`) } } ``` |

| Fields ||
|---|---|
| `dataRange` | ``object (`https://developers.google.com/bid-manager/reference/rest/v2/queries#DataRange`)`` The date range used by the query to generate the report. If unspecified, the query's original `https://developers.google.com/bid-manager/reference/rest/v2/queries#QueryMetadata.FIELDS.data_range` is used. |