Tools
Tables Query Export
Export BigQuery query results to CSV or Parquet and upload to GCS for download
Export query results to CSV or Parquet format with compression (gz or zstd). The query must be a single read-only statement: use tables_query to create or remove catalog tables. Always prefix tables with "catalog." (ex: catalog.crawl_pages_20251201). Give the user web_url. It works for users logged in to Botify with access to the project. To fetch the file from a program, use temporary_url. It needs no login and expires 15 minutes after the export.
Playground
Log in Log in to try this tool. The request uses your session.
query
required
BigQuery SQL query to execute (a single SELECT statement)
format
Export format: csv or parquet
compression
Compression type: gz or zstd
max_rows
Maximum number of rows to export (no limit if null)
bigquery_billing
Who pays BigQuery for the query. 'botify': Botify runs it, and the data it scans is charged in credits. 'organization': it runs in your organization's own GCP project, configured by Botify, which Google bills directly; a flat fee per query is charged in credits instead of the scan. 'auto': your organization's project when one is configured, else Botify.
Credits
Fixed cost per item requested, plus the data the query scans. Analytical queries are billed on how much data they read, not on how many rows come back, so a narrow filter over a large table can still scan the whole of it. Restricting the columns and the date range you ask for is what keeps this down. A query run in your organization's own cloud project (see bigquery_billing) has its scan billed by your cloud provider instead, and costs a flat fee per query here.
These usage SKUs can be charged on a call.
| SKU | Credits | Description |
|---|---|---|
| Tool call | 1 per request | Charged once per successful item, on top of any usage below. |
| Data scanned | 6,250 per TiB scanned | Analytical queries are billed on the volume of data the query reads, not on the rows it returns: a narrow filter over a large table can still scan the whole table. |
| Query billed to your cloud project | 4 per query | A flat fee per query run in your organization's own cloud project, in place of the charge on the data it scans. |
Schemas
item is what you send, config how the tool behaves,
and the response is what you get back.
Item
objectquery
string
required
BigQuery SQL query to execute (a single SELECT statement)
format
string
Export format: csv or parquet
compression
string
Compression type: gz or zstd
max_rows
integer | null
Maximum number of rows to export (no limit if null)
{
"query": "string",
"format": "csv",
"compression": "gz",
"max_rows": null
}
Configuration
objectbigquery_billing
string
Who pays BigQuery for the query. 'botify': Botify runs it, and the data it scans is charged in credits. 'organization': it runs in your organization's own GCP project, configured by Botify, which Google bills directly; a flat fee per query is charged in credits instead of the scan. 'auto': your organization's project when one is configured, else Botify.
{
"bigquery_billing": "auto"
}
Response
objectdownload_url
string
required
Original storage URL for the file
web_url
string
required
Download URL served by the Botify API. Open it in a browser while logged in to Botify with access to the project.
temporary_url
string | null
Download URL that needs no login, for a program that fetches the file. It expires 15 minutes after the export. Null when the URL could not be signed.
format
string
required
Export format used
compression
string
required
Compression type used
row_count
integer
required
Number of rows exported
{
"download_url": "string",
"web_url": "string",
"temporary_url": null,
"format": "string",
"compression": "string",
"row_count": 0
}
Endpoints
http://agents.botify.com/{organization}/{project}/tables_query_export/process
http://agents.botify.com/{organization}/{project}/tables_query_export/batch_process
http://agents.botify.com/{organization}/{project}/tables_query_export/async_process
http://agents.botify.com/{organization}/{project}/tables_query_export/async_batch_process
See running a long job in the background for the polling flow.
cURL
curl -X POST "http://agents.botify.com/{organization}/{project}/tables_query_export/process" \
-H "Authorization: Bearer $BOTIFY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"item": {
"query": "<query>"
}
}'
Over MCP
This tool is exposed as the MCP tool tables_query_export. An MCP client passes
organization, project and item as tool arguments.
Set up MCP →
Raw metadata
- GET /agents/tables_query_export — this page as JSON.
- /agents/tables_query_export/skill.md — Markdown for coding agents.