{"uid":"cap_fZ8TYnKKVVasjeR9UCZbB","slug":"hubvibe-bigquery-anomaly-detection-68b58f94","name":"HubVibe BigQuery Anomaly Detection","description":"Anomaly detection on a time series: score recent periods against history with BigQuery AI.DETECT_ANOMALIES (TimesFM). Give one table and its latest periods are scored against its own history, or a history and a target table. Returns every checked row with bounds, anomaly flag and probability, plus the anomaly count. Input: history_table, target_table, timestamp_col, data_col; optional target_last, threshold, id_cols.","url":"https://hubvibe-io.com/work/data/anomalies?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"id_cols":{"type":"array","items":{"type":"string"}},"data_col":{"type":"string"},"language":{"type":"string","pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$","maxLength":35},"target_last":{"type":"integer","maximum":366,"minimum":1},"max_scan_gib":{"type":"number"},"target_table":{"type":"string"},"history_table":{"type":"string"},"timestamp_col":{"type":"string"},"anomaly_prob_threshold":{"type":"number"}}},"responseSchema":{"type":"json","example":{"result":{"mode":"split_by_time","rows":[{"date":"2023-03-20","is_anomaly":"false","state_name":"Texas","confirmed_cases":"8631000","anomaly_probability":"0.12"}],"columns":["state_name","date","confirmed_cases","is_anomaly","lower_bound","upper_bound","anomaly_probability"],"data_col":"confirmed_cases","row_count":10,"target_table":"bigquery-public-data.covid19_nyt.us_states","anomaly_count":2,"gib_processed":0.012,"history_table":"bigquery-public-data.covid19_nyt.us_states","timestamp_col":"date","target_periods":30,"anomaly_prob_threshold":0.95},"status":"ok","worker":"data.anomalies","price_usd":10,"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"10","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$10/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"10","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"10","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_922eASGmJ9XAFf0JIMqDR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"10","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects anomalies in a BigQuery time series table by comparing it against a history table using Google's AI.DETECT_ANOMALIES (TimesFM) model.","exampleAgentPrompt":"Check my BigQuery table `myproject.analytics.recent_traffic` for anomalies by comparing it to `myproject.analytics.historical_traffic`, using `event_timestamp` as the timestamp column, `page_views` as the value column, and flag anything with an anomaly probability above 0.97.","exampleUseCases":[{"title":"E-commerce revenue spike detection","prompt":"Scan my BigQuery table `shop.sales.daily_revenue_2024` for anomalies against the historical baseline in `shop.sales.daily_revenue_2023` — use `sale_date` as the timestamp and `total_revenue` as the value column, and flag anything above 0.95 anomaly probability."},{"title":"IoT sensor fault monitoring","prompt":"Run anomaly detection on my sensor readings table `iot.prod.temperature_readings` compared to `iot.prod.temperature_history`, with `reading_ts` as the timestamp, `temp_celsius` as the value, grouping by `sensor_id`, and flag readings with anomaly probability over 0.99."},{"title":"Website traffic anomaly audit","prompt":"Check `analytics.web.hourly_sessions_this_month` for unusual traffic patterns against `analytics.web.hourly_sessions_last_year` — timestamp column is `hour_start`, value column is `session_count`, and use a 0.9 anomaly probability threshold."}],"resultDescription":"Returns rows from the target table that are flagged as anomalous, along with their anomaly probability scores as computed by Google's TimesFM model via BigQuery AI.DETECT_ANOMALIES. Results may be segmented per series if ID columns are specified.","failureModes":["Invalid or inaccessible BigQuery table reference (project.dataset.table format required)","Mismatched timestamp or value column names between target and history tables","Anomaly probability threshold outside 0.5–0.999 range","max_scan_gib exceeded causing query abort","Tables with insufficient historical data for TimesFM to produce reliable anomaly scores","Payment failure or insufficient USDC balance ($10 per call)"],"whenToPreferThis":"Choose this endpoint when you have time series data already stored in BigQuery and want to leverage Google's pretrained TimesFM model for anomaly detection without building your own ML pipeline. It is ideal when you have a clear historical baseline table and a recent target table with matching schema. Prefer this over generic anomaly detection APIs when your data volume justifies BigQuery-scale processing and you want probabilistic anomaly scores with configurable thresholds.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:40:40.497Z","isFirstParty":false,"canonicalSlug":"hubvibe-bigquery-anomaly-detection-68b58f94"}