# HubVibe BigQuery SQL Query Executor

> HubVibe BigQuery SQL Query Executor is a paid API for AI agents from hubvibe-io.com, paid per call via x402, $0.5/call, status unknown (last checked 2026-10-02).

Executes a read-only BigQuery SQL SELECT query (including against Google public datasets) with a cost-bounding dry-run gate, returning results as JSON rows.

## Facts

- Endpoint: POST https://hubvibe-io.com/work/data/query?utm_source=zero.xyz
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hubvibe-bigquery-sql-query-executor-d0be6f20
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Yq7jeAv8GYNWXBXufgxVr

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hubvibe-bigquery-sql-query-executor-d0be6f20 -d '<json body>'
```

Example prompt: Run this BigQuery SQL for me: SELECT corpus, COUNT(*) as word_count FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus ORDER BY word_count DESC LIMIT 10 — keep the scan ceiling at 1 GiB so it doesn't get expensive.

## When to prefer this

Choose this endpoint when you need to run an ad-hoc or programmatic read-only SQL query against BigQuery — especially against Google's public datasets — and want automatic cost-bounding via a dry-run gate before any bytes are scanned. Prefer it over direct BigQuery API calls when you want a simple HTTP interface that returns JSON rows without managing GCP credentials yourself.

## Known failure modes

- Query exceeds max_scan_gib ceiling — refused before execution with a cost-limit error
- SQL syntax errors or invalid table references return a query parse/execution error
- Non-SELECT or mutating SQL (INSERT, UPDATE, DELETE) is rejected as not read-only
- Table or dataset does not exist or requester lacks access — permission denied error
- Network timeout if result set is extremely large
- Missing required `sql` field returns a validation error

## How this service works

BigQuery SQL: run a read-only SQL query, including against Google's public datasets (Wikipedia, GitHub, blockchains, weather, census and more), and get columns and rows back as JSON with the bytes processed. Every query is dry-run first and refused above the scan ceiling, so cost is bounded before it runs. Input: sql; optional max_scan_gib. Ask in plain English instead: data.question.

## Output

A JSON array of rows returned by the SQL query. Each row reflects the columns selected in the query. The response is bounded by the scan ceiling enforced via a dry-run preflight check — if the query would exceed the byte limit, it is refused before execution.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "sql": {
   "type": "string"
  },
  "language": {
   "type": "string",
   "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
   "maxLength": 35
  },
  "max_scan_gib": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "sql": "SELECT name, SUM(number) AS n FROM `bigquery-public-data.usa_names.usa_1910_2013` GROUP BY name ORDER BY n DESC LIMIT 5",
   "rows": [
    {
     "n": 4942431,
     "name": "James"
    }
   ],
   "columns": [
    "name",
    "n"
   ],
   "cache_hit": false,
   "row_count": 5,
   "truncated": false,
   "total_rows": 5,
   "gib_processed": 0.012
  },
  "status": "ok",
  "worker": "data.query",
  "price_usd": 0.5,
  "provenance": {
   "steps": [
    {
     "ms": 312,
     "ok": true,
     "step": "quote",
     "reason": "provider_timeout",
     "provider": "coinbase-advanced-trade-public"
    }
   ],
   "attempts": 1,
   "elapsed_ms": 340,
   "providers_used": [
    "coinbase-advanced-trade-public"
   ]
  },
  "receipt_id": "rcpt_9f1c2b3a4d5e6f70",
  "attribution": [
   {
    "url": "https://translate.google.com",
    "text": "Translated by Google"
   }
  ],
  "receipt_url": "/work/receipts/rcpt_9f1c2b3a4d5e6f70"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hubvibe-bigquery-sql-query-executor-d0be6f20/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hubvibe-io.com](https://www.zero.xyz/host/hubvibe-io.com/llms.txt)
