# BigQuery Integration for Email Validation

URL: https://email-validation.org/integrations/bigquery/
Updated: 2026-11-29

> Documentation index: https://email-validation.org/llms.txt

Two BigQuery remote functions return the status of each address, or its reason, action and suggested correction as JSON, from a plain query. Behind them is a small Cloud Run function in your own Google Cloud project, with the key in Secret Manager.

[Read the full setup guide](https://email-validation.org/docs/guides/bigquery/) [Get an API key](https://email-validation.org/signin/)

- Status: Setup guide
- One zip: the Cloud Run function and the SQL

**SQL** after the setup

BigQuery query

```text
SELECT email, `PROJECT_ID.DATASET_ID.validate_email`(email) AS status
FROM `PROJECT_ID.DATASET_ID.customers`;
```

## At a glance.

- **Status**: **Setup guide.** Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- **For**: Data teams who keep customer or lead addresses in BigQuery and want each one’s status in a table they can join, filter and send on.
- **You need**: A Google Cloud project with BigQuery, Cloud Run and Secret Manager, the `gcloud` and `bq` tools, and an [API key](https://email-validation.org/app/api-keys/) made for it, with a [daily credit cap](https://email-validation.org/docs/authentication/#limits), used only for this function.
- **Costs**: 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org and, in a bulk list, repeats of an address (charged once).
- **Full guide**: [Read the full setup guide](https://email-validation.org/docs/guides/bigquery/)

## Typical uses.

- **Clean a customer table**: Check each distinct address once (BigQuery may resend a batch, so usually once) into a results table, then join to it from every query, view or dashboard that needs the status.
- **Check new addresses on a schedule**: Run the check-once script as a scheduled query: it picks only addresses with no status yet, so each run spends credits on new rows only (usually once each).
- **Filter what you send on**: Keep addresses that cannot receive mail and throwaway inboxes out of the audiences you export to other tools.

## Set it up. 4 steps.

The short version of the [full setup guide](https://email-validation.org/docs/guides/bigquery/), which stays the reference when a step does not match what you see.

1. **Download the zip and make a key**: Download the zip from the guide, create an API key with only Validate addresses and a daily credit cap, and put it in Secret Manager.
2. **Deploy the function**: Run `gcloud run deploy` with `--source=function` and authentication required, so only callers you allow can reach it.
3. **Connect BigQuery**: Create a BigQuery connection and give only its service account the Cloud Run Invoker role on the function.
4. **Create the functions and check once**: Run `sql/create_functions.sql`, whose last statement checks free test addresses, then `sql/check_new_addresses.sql` to fill the results table.

## Good to know.

- It has not run in a real Google Cloud project yet: it was built from Google’s documentation and tested against stand-ins.
- Every non-NULL row a query passes to the functions is checked each time the query runs; the same address twice in one batch is checked once. BigQuery never caches a remote function’s results, so a view or a dashboard tile that calls them checks again on every read.
- A row that could not be checked gets NULL and an error code in the details, never an invented status. A refused key fails the query with a message that never contains the key.
- The function logs counts, statuses and error codes only: never an address, the key or the BigQuery user who ran the query.
- Set `EV_REGION=eu` on the function for our [EU host](https://email-validation.org/docs/eu-data-residency/): the same key works on both.

## Related

- [The full BigQuery setup guide](https://email-validation.org/docs/guides/bigquery/)
- [Every setup step with its command](https://email-validation.org/docs/guides/bigquery/#setup)
- [Check each address once](https://email-validation.org/docs/guides/bigquery/#check-once)
- [The same functions for Snowflake](https://email-validation.org/docs/guides/snowflake/)
- [Django integration](https://email-validation.org/integrations/django/)
- [Laravel integration](https://email-validation.org/integrations/laravel/)
- [Postman integration](https://email-validation.org/integrations/postman/)
- [Rails integration](https://email-validation.org/integrations/rails/)
- [All integrations](https://email-validation.org/integrations/)
