Method: queries.execute

Executes a query and returns when it is complete. This method can be used to run queries synchronously. This method is equivalent to a call to queries.start followed by a call to WaitOperation using the operation id that was returned by queries.start.

HTTP request


The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
  "spec": {
    object (QuerySpec)
  "destTable": string,
  "timeoutMs": string,
  "jobId": string

object (QuerySpec)

The query to execute.



Destination table for query results. Format: "project:dataset.table_name". Your Ads Data Hub service account must have edit permissions for the dataset. If "project:dataset" is not specified, it defaults to your Ads Data Hub shared dataset.


string (int64 format)

Time to wait for the operation to complete. Default value is 10 seconds. If the operation does not complete within this time, a cancel request is sent. An explicit value of 0 is ignored; the default value of 10 seconds is used instead.



A job id that you supply. You can use this id to refererence your job at operations/jobId. If you omit this field, an id is generated by the server. If you have an existing job with this id, the result is an error.

Response body

If successful, the response body will be empty.

Authorization Scopes

Requires one of the following OAuth scopes: