Access the Google BigQuery API with managed OAuth authentication. Run SQL queries, manage datasets and tables, and analyze data at scale.
Reference
List Projects
List all projects accessible to the authenticated user.
GET /google-bigquery/bigquery/v2/projectsResponse:
{
"kind": "bigquery#projectList",
"projects": [
{
"id": "my-project-123",
"numericId": "822245862053",
"projectReference": {
"projectId": "my-project-123"
},
"friendlyName": "My Project"
}
],
"totalItems": 1
}List Datasets
GET /google-bigquery/bigquery/v2/projects/{projectId}/datasetsQuery Parameters:
maxResults- Maximum number of results to returnpageToken- Token for paginationall- Include hidden datasets if true
Get Dataset
GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}Create Dataset
POST /google-bigquery/bigquery/v2/projects/{projectId}/datasets
Content-Type: application/json
{
"datasetReference": {
"datasetId": "my_dataset",
"projectId": "{projectId}"
},
"description": "My dataset description",
"location": "US"
}Response:
{
"kind": "bigquery#dataset",
"id": "my-project:my_dataset",
"datasetReference": {
"datasetId": "my_dataset",
"projectId": "my-project"
},
"location": "US",
"creationTime": "1771059780773"
}Update Dataset (PATCH)
PATCH /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}
Content-Type: application/json
{
"description": "Updated description"
}Delete Dataset
DELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}Query Parameters:
deleteContents- If true, delete all tables in the dataset (default: false)
List Tables
GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tablesQuery Parameters:
maxResults- Maximum number of results to returnpageToken- Token for pagination
Get Table
GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}Create Table
POST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables
Content-Type: application/json
{
"tableReference": {
"projectId": "{projectId}",
"datasetId": "{datasetId}",
"tableId": "my_table"
},
"schema": {
"fields": [
{"name": "id", "type": "INTEGER", "mode": "REQUIRED"},
{"name": "name", "type": "STRING", "mode": "NULLABLE"},
{"name": "created_at", "type": "TIMESTAMP", "mode": "NULLABLE"}
]
}
}Response:
{
"kind": "bigquery#table",
"id": "my-project:my_dataset.my_table",
"tableReference": {
"projectId": "my-project",
"datasetId": "my_dataset",
"tableId": "my_table"
},
"schema": {
"fields": [
{"name": "id", "type": "INTEGER", "mode": "REQUIRED"},
{"name": "name", "type": "STRING", "mode": "NULLABLE"},
{"name": "created_at", "type": "TIMESTAMP", "mode": "NULLABLE"}
]
},
"numRows": "0",
"type": "TABLE"
}Update Table (PATCH)
PATCH /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}
Content-Type: application/json
{
"description": "Updated table description"
}Delete Table
DELETE /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}List Table Data
Retrieve rows from a table.
GET /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/dataQuery Parameters:
maxResults- Maximum number of results to returnpageToken- Token for paginationstartIndex- Zero-based index of the starting row
Response:
{
"kind": "bigquery#tableDataList",
"totalRows": "100",
"rows": [
{
"f": [
{"v": "1"},
{"v": "Alice"},
{"v": "1.7710597807E9"}
]
}
],
"pageToken": "..."
}Insert Table Data (Streaming)
Insert rows into a table using streaming insert. Note: Requires BigQuery paid tier.
POST /google-bigquery/bigquery/v2/projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll
Content-Type: application/json
{
"rows": [
{"json": {"id": 1, "name": "Alice"}},
{"json": {"id": 2, "name": "Bob"}}
]
}Run Query (Synchronous)
Execute a SQL query and return results directly.
POST /google-bigquery/bigquery/v2/projects/{projectId}/queries
Content-Type: application/json
{
"query": "SELECT * FROM `my_dataset.my_table` LIMIT 10",
"useLegacySql": false,
"maxResults": 100
}Response:
{
"kind": "bigquery#queryResponse",
"schema": {
"fields": [
{"name": "id", "type": "INTEGER"},
{"name": "name", "type": "STRING"}
]
},
"jobReference": {
"projectId": "my-project",
"jobId": "job_abc123",
"location": "US"
},
"totalRows": "2",
"rows": [
{"f": [{"v": "1"}, {"v": "Alice"}]},
{"f": [{"v": "2"}, {"v": "Bob"}]}
],
"jobComplete": true,
"totalBytesProcessed": "1024"
}Query Parameters:
useLegacySql- Use legacy SQL syntax (default: false for GoogleSQL)maxResults- Maximum results per pagetimeoutMs- Query timeout in milliseconds
Create Job (Asynchronous)
Submit a job for asynchronous execution.
POST /google-bigquery/bigquery/v2/projects/{projectId}/jobs
Content-Type: application/json
{
"configuration": {
"query": {
"query": "SELECT * FROM `my_dataset.my_table`",
"useLegacySql": false,
"destinationTable": {
"projectId": "{projectId}",
"datasetId": "{datasetId}",
"tableId": "results_table"
},
"writeDisposition": "WRITE_TRUNCATE"
}
}
}List Jobs
GET /google-bigquery/bigquery/v2/projects/{projectId}/jobsQuery Parameters:
maxResults- Maximum number of results to returnpageToken- Token for paginationstateFilter- Filter by job state:done,pending,runningprojection-fullorminimal
Response:
{
"kind": "bigquery#jobList",
"jobs": [
{
"id": "my-project:US.job_abc123",
"jobReference": {
"projectId": "my-project",
"jobId": "job_abc123",
"location": "US"
},
"state": "DONE",
"statistics": {
"creationTime": "1771059781456",
"startTime": "1771059782203",
"endTime": "1771059782324"
}
}
]
}Get Job
GET /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}Query Parameters:
location- Job location (e.g., "US", "EU")
Get Query Results
Retrieve results from a completed query job.
GET /google-bigquery/bigquery/v2/projects/{projectId}/queries/{jobId}Query Parameters:
location- Job locationmaxResults- Maximum results per pagepageToken- Token for paginationstartIndex- Zero-based starting row
Cancel Job
POST /google-bigquery/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancelQuery Parameters:
location- Job location