Agentic Platform
Documentation API reference Tools Skills

Tools

Tables Query Export

tables_query_export MCP

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

POST
item
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)

config
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

object
Properties
query string required

BigQuery SQL query to execute (a single SELECT statement)

format string

Export format: csv or parquet

Values: csv parquet

Default: "csv"

compression string

Compression type: gz or zstd

Values: gz zstd

Default: "gz"

max_rows integer | null

Maximum number of rows to export (no limit if null)

Default: null

Example
{
  "query": "string",
  "format": "csv",
  "compression": "gz",
  "max_rows": null
}

Configuration

object
Properties
bigquery_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.

Values: auto botify organization

Default: "auto"

Example
{
  "bigquery_billing": "auto"
}

Response

object
Properties
download_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.

Default: null

format string required

Export format used

compression string required

Compression type used

row_count integer required

Number of rows exported

Example
{
  "download_url": "string",
  "web_url": "string",
  "temporary_url": null,
  "format": "string",
  "compression": "string",
  "row_count": 0
}

Endpoints

POST http://agents.botify.com/{organization}/{project}/tables_query_export/process
POST http://agents.botify.com/{organization}/{project}/tables_query_export/batch_process
POST http://agents.botify.com/{organization}/{project}/tables_query_export/async_process
POST 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