Skip to content

Netlify

Netlify sites, deploys, builds, DNS, TLS, env var names, hooks and team as SQL tables

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/netlify/index.md to help me query Netlify with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Compare deployment failures across projects

Set the lower timestamp bound to the deployment period you want to analyze.

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT project, count(*) FILTER (WHERE state = 'error') AS failed,
  count(*) AS total
FROM netlify.main.deployments
WHERE created_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY project
ORDER BY failed DESC

Quick start

Choose where to run Netlify, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'netlify' AS netlify (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-netlify'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

netlify credentials

Netlify personal access token or OAuth token, plus an optional API base URL

Get these credentials β†’
secret.sql
CREATE SECRET netlify (
    TYPE netlify,
    token    '<NETLIFY_TOKEN>',  -- secret
    base_url '<base_url>'
);
Credential fields and requirements β†’

4. Run a query

query.sql
SELECT project, count(*) FILTER (WHERE state = 'error') AS failed,
  count(*) AS total
FROM netlify.main.deployments
WHERE created_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY project
ORDER BY failed DESC
More example queries β†’
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'netlify' AS netlify (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Netlify sites, deploys, builds, forms, functions, DNS, TLS certificates, environment variable names, hooks, members and audit log as SQL, read-only from the Netlify API.

Catalog

Everything netlify exposes once attached β€” read straight from the worker's released build.

netlify 2 schemas
main 18 tables Β· 3 functions

Netlify sites, deploys, builds, forms, functions, DNS, TLS, configuration and team data.

Schema examples (12)
Examples (12)

Plan and site quota usage per account

SELECT slug, type_name, sites_used, sites_included
FROM netlify.main.accounts
ORDER BY slug;

Sites with a custom domain that do not force HTTPS

SELECT name, custom_domain, ssl, force_ssl
FROM netlify.main.sites
WHERE custom_domain IS NOT NULL AND NOT force_ssl
ORDER BY name;

Sites per git provider

SELECT repo_provider, count(*) AS sites
FROM netlify.main.sites
GROUP BY repo_provider
ORDER BY sites DESC;

Projects per git provider (same query works on vercel.main.projects)

SELECT repo_provider, count(*) AS projects
FROM netlify.main.projects
GROUP BY repo_provider
ORDER BY projects DESC;
8 more examples

Domain aliases per site

SELECT project, domain
FROM netlify.main.domains
WHERE kind = 'alias'
ORDER BY project, domain;

Failed vs total deploys per site since a date (paging stops at the date)

SELECT project, count(*) FILTER (WHERE state = 'error') AS failed,
  count(*) AS total
FROM netlify.main.deployments
WHERE created_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY project
ORDER BY failed DESC;

Average production build time per site (environment and state pushed down)

SELECT project, avg(build_duration_seconds) AS avg_build_s
FROM netlify.main.deployments
WHERE environment = 'production' AND state = 'ready'
GROUP BY project
ORDER BY avg_build_s DESC;

Failed builds per site

SELECT site, count(*) FILTER (WHERE error IS NOT NULL) AS failed,
  count(*) AS builds
FROM netlify.main.builds
GROUP BY site
ORDER BY failed DESC;

Build-minute usage against the plan per account

SELECT account_slug, minutes_current, included_minutes,
  round(100.0 * minutes_current / included_minutes, 1) AS pct_used
FROM netlify.main.build_stats
ORDER BY pct_used DESC;

Forms by number of submissions

SELECT site, name, submission_count
FROM netlify.main.forms
ORDER BY submission_count DESC;

Deployed functions per runtime

SELECT runtime, count(DISTINCT name) AS functions
FROM netlify.main.functions
GROUP BY runtime
ORDER BY functions DESC;

Nameservers and record counts per zone

SELECT name, dns_servers, record_count
FROM netlify.main.dns_zones
ORDER BY name;
Tables
accounts 1 example14 cols

Netlify accounts (teams) the token belongs to, with plan and seat usage

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
idnot null VARCHAR
Account id.
slug VARCHAR
Account slug (app.netlify.com/teams/<slug>).
name VARCHAR
Account display name.
created_at TIMESTAMP WITH TIME ZONE
When the account was created.
type VARCHAR
Account type id.
type_name VARCHAR
Plan name, e.g. Starter, Pro, Business, Enterprise.
sites_included INTEGER
Sites included in the plan.
sites_used INTEGER
Sites in use.
collaborators_included INTEGER
Collaborator seats included in the plan.
collaborators_used INTEGER
Collaborator seats in use.
owner_ids VARCHAR[]
User ids of the account owners.
roles_allowed VARCHAR[]
Member roles the plan allows (Owner, Collaborator, Developer, …).
updated_at TIMESTAMP WITH TIME ZONE
When the account last changed.
ConstraintsPRIMARY KEY (id)
Example

Plan and site quota usage per account

SELECT slug, type_name, sites_used, sites_included
FROM netlify.main.accounts
ORDER BY slug;
Link
audit_events 1 example11 cols

Audit log events of every Netlify account (plans that expose it), newest first

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
account_idnot null VARCHAR
Account (team) id.
account_slugnot null VARCHAR
Account (team) slug.
idnot null VARCHAR
Event id.
timestamp TIMESTAMP WITH TIME ZONE
When it happened.
action VARCHAR
What happened, e.g. site.created, member.invited.
actor_id VARCHAR
User id of the actor.
actor_name VARCHAR
Name of the actor.
actor_email VARCHAR
Email of the actor.
log_type VARCHAR
Audit stream the event belongs to, e.g. audit or security.
payload JSON
Event details beyond the columns above, as JSON.
ConstraintsPRIMARY KEY (id)
Example

Who did what since a date

SELECT actor_name, action, count(*) AS events
FROM netlify.main.audit_events
WHERE timestamp >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY ALL
ORDER BY events DESC;
Link
build_hooks 1 example8 cols

Build hooks (incoming deploy triggers) of every Netlify site; the secret URL is reduced to its host

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
idnot null VARCHAR
Build hook id.
title VARCHAR
Hook title.
branch VARCHAR
Branch the hook builds.
url_host VARCHAR
Host of the hook URL (the full URL is a secret and is never exposed).
created_at TIMESTAMP WITH TIME ZONE
When the hook was created.
ConstraintsPRIMARY KEY (id)
Example

Build hooks per site

SELECT site, title, branch
FROM netlify.main.build_hooks
ORDER BY site, title;
Link
build_stats 1 example15 cols

Build concurrency and build minutes per Netlify account

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
account_idnot null VARCHAR
Account (team) id.
account_slugnot null VARCHAR
Account (team) slug.
active_builds INTEGER
Number of builds running now.
pending_concurrency INTEGER
Number of builds waiting for a concurrency slot.
enqueued INTEGER
Number of builds in the queue.
build_count INTEGER
Number of builds in the current billing period.
minutes_current INTEGER
Build minutes (minutes) used in the current billing period.
minutes_current_average_sec INTEGER
Average build duration in seconds this period.
minutes_previous INTEGER
Build minutes (minutes) used in the previous billing period.
included_minutes INTEGER
Build minutes (minutes) included in the plan.
included_minutes_with_packs INTEGER
Build minutes (minutes) included in the plan plus add-on packs.
period_start TIMESTAMP WITH TIME ZONE
Start of the billing period.
period_end TIMESTAMP WITH TIME ZONE
End of the billing period.
minutes_updated_at TIMESTAMP WITH TIME ZONE
When the minutes counters were last updated.
ConstraintsPRIMARY KEY (account_id)
Example

Build-minute usage against the plan per account

SELECT account_slug, minutes_current, included_minutes,
  round(100.0 * minutes_current / included_minutes, 1) AS pct_used
FROM netlify.main.build_stats
ORDER BY pct_used DESC;
Link
builds 1 example9 cols

Netlify builds of every site, newest first, with done flag and error

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
idnot null VARCHAR
Build id.
deploy_id VARCHAR
The deploy the build produced.
sha VARCHAR
Git commit SHA built.
done BOOLEAN
Whether the build has finished.
error VARCHAR
Build error, if it failed (untrusted build output).
created_at TIMESTAMP WITH TIME ZONE
When the build was created.
ConstraintsPRIMARY KEY (id)
Example

Failed builds per site

SELECT site, count(*) FILTER (WHERE error IS NOT NULL) AS failed,
  count(*) AS builds
FROM netlify.main.builds
GROUP BY site
ORDER BY failed DESC;
Link
deployments 2 examples32 cols

Netlify deploys of every site (shared web-deploy vocabulary) with filters pushed into the deploys API

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
idnot null VARCHAR
Deploy id.
project VARCHAR
Site name.
environmentnot null VARCHAR
production or preview (shared vocabulary; Netlify context production vs the rest).
state VARCHAR
Normalized state: queued, building, ready, error or canceled.
raw_state VARCHAR
Netlify state: new, pending_review, accepted, enqueued, building, uploading, processing, ready, error, rejected …
branch VARCHAR
Git branch the deploy was built from.
commit_sha VARCHAR
Git commit SHA (commit_ref).
commit_message VARCHAR
Commit message / deploy title (untrusted, author-supplied text).
creator VARCHAR
Committer name, when Netlify reports one.
created_at TIMESTAMP WITH TIME ZONE
When the deploy was created (queued).
building_at TIMESTAMP WITH TIME ZONE
Build start, derived as ready_at (or end) βˆ’ deploy_time; NULL until the deploy ends.
ready_at TIMESTAMP WITH TIME ZONE
When the deploy became ready (published_at, else updated_at of a ready deploy).
build_duration_seconds DOUBLE
Netlify deploy_time in seconds.
url VARCHAR
Unique deploy URL (https://<id>--<site>.netlify.app).
inspector_url VARCHAR
Netlify app page of the deploy.
project_id VARCHAR
Site id.
context VARCHAR
Raw deploy context: production, deploy-preview, branch-deploy, dev …
build_id VARCHAR
Id of the build that produced the deploy (see builds.id).
creator_id VARCHAR
User id that created the deploy.
error_message VARCHAR
Error message of a failed deploy (untrusted build output).
commit_url VARCHAR
URL of the commit.
review_id BIGINT
Pull/merge request number of a deploy preview.
review_url VARCHAR
URL of the pull/merge request.
draft BOOLEAN
Whether this is a draft deploy (CLI --draft).
skipped BOOLEAN
Whether the build was skipped (e.g. an ignore command).
locked BOOLEAN
Whether auto-publishing is locked to this deploy.
manual_deploy BOOLEAN
Whether it was a manual (CLI / drag-and-drop) deploy.
published_at TIMESTAMP WITH TIME ZONE
When it was published to production, if it was.
updated_at TIMESTAMP WITH TIME ZONE
When the deploy last changed state.
framework VARCHAR
Framework detected, e.g. astro, next, hugo.
functions_region VARCHAR
Functions region (airport code).
ConstraintsPRIMARY KEY (id)
Examples (2)

Failed vs total deploys per site since a date (paging stops at the date)

SELECT project, count(*) FILTER (WHERE state = 'error') AS failed,
  count(*) AS total
FROM netlify.main.deployments
WHERE created_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY project
ORDER BY failed DESC;

Average production build time per site (environment and state pushed down)

SELECT project, avg(build_duration_seconds) AS avg_build_s
FROM netlify.main.deployments
WHERE environment = 'production' AND state = 'ready'
GROUP BY project
ORDER BY avg_build_s DESC;
Link
dns_records 1 example14 cols

Records of every Netlify DNS zone

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
domainnot null VARCHAR
The zone (domain).
idnot null VARCHAR
Record id.
name VARCHAR
Record name relative to the zone ('' = apex).
type VARCHAR
Record type: A, AAAA, ALIAS, CAA, CNAME, MX, NS, SPF, SRV, TXT, NETLIFY, NETLIFYv6.
value VARCHAR
Record value.
ttl INTEGER
TTL in seconds.
mx_priority INTEGER
MX / SRV preference number (lower = preferred).
zone_idnot null VARCHAR
Id of the DNS zone the record belongs to (see dns_zones.id).
hostname VARCHAR
Fully qualified record name.
flag INTEGER
CAA record flag byte (0 = non-critical, 128 = critical).
tag VARCHAR
CAA tag (issue, issuewild, iodef).
managed BOOLEAN
Whether Netlify manages the record (e.g. the site's NETLIFY record).
site_id VARCHAR
Site the record points at, for NETLIFY records.
ConstraintsPRIMARY KEY (zone_id, id)
Example

Record types per zone

SELECT domain, type, count(*) AS records
FROM netlify.main.dns_records
GROUP BY ALL
ORDER BY domain, type;
Link
dns_zones 1 example15 cols

Netlify DNS zones with nameservers, linked site and record counts

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
idnot null VARCHAR
Zone id.
name VARCHAR
Zone (domain) name.
account_id VARCHAR
Owning account id.
account_slug VARCHAR
Owning account slug.
account_name VARCHAR
Owning account name.
site_id VARCHAR
Site the zone is linked to.
dns_servers VARCHAR[]
Netlify nameservers for the zone.
supported_record_types VARCHAR[]
Record types the zone accepts.
errors VARCHAR[]
Configuration errors reported for the zone.
ipv6_enabled BOOLEAN
Whether IPv6 (AAAA) answers are enabled.
dedicated BOOLEAN
Whether the zone uses dedicated nameservers.
record_count INTEGER
Number of records in the zone.
created_at TIMESTAMP WITH TIME ZONE
When the zone was created.
updated_at TIMESTAMP WITH TIME ZONE
When the zone last changed.
ConstraintsPRIMARY KEY (id)
Example

Nameservers and record counts per zone

SELECT name, dns_servers, record_count
FROM netlify.main.dns_zones
ORDER BY name;
Link
domains 1 example8 cols

Hostnames each Netlify site answers on: netlify.app subdomain, custom domain and aliases

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
project VARCHAR
Site name.
project_idnot null VARCHAR
Site id.
domainnot null VARCHAR
The hostname.
kind VARCHAR
netlify_subdomain, primary, alias, branch_deploy or deploy_preview.
site_ssl BOOLEAN
Whether the site has HTTPS provisioned.
force_ssl BOOLEAN
Whether HTTP is redirected to HTTPS.
managed_dns BOOLEAN
Whether the site's domain uses Netlify DNS.
ConstraintsPRIMARY KEY (project_id, domain)
Example

Domain aliases per site

SELECT project, domain
FROM netlify.main.domains
WHERE kind = 'alias'
ORDER BY project, domain;
Link
env_var_names 2 examples13 cols

Environment variable NAMES of each Netlify site with scopes and contexts (values are never read out)

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
projectnot null VARCHAR
Site name.
project_idnot null VARCHAR
Site id.
keynot null VARCHAR
Variable name.
targets VARCHAR[]
Environments it has values for: production, preview, development.
type VARCHAR
secret (only readable by code running on Netlify) or plain.
git_branch VARCHAR
Branch of a branch-specific value, if any.
updated_at TIMESTAMP WITH TIME ZONE
When a value last changed.
scopes VARCHAR[]
Where it is available: builds, functions, runtime, post-processing.
contexts VARCHAR[]
Raw deploy contexts that have a value.
is_secret BOOLEAN
Whether the variable is marked secret.
value_count INTEGER
Number of context-specific values (the values themselves are never read out).
updated_by VARCHAR
User id that last changed it.
ConstraintsPRIMARY KEY (project_id, key)
Examples (2)

Variables with no production value

SELECT project, key
FROM netlify.main.env_var_names
WHERE NOT list_contains(targets, 'production')
ORDER BY project, key;

Variable names defined on several sites

SELECT key, count(DISTINCT project) AS sites
FROM netlify.main.env_var_names
GROUP BY key
HAVING count(DISTINCT project) > 1
ORDER BY sites DESC;
Link
forms 1 example9 cols

Netlify Forms of every site with their fields and submission counts

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
idnot null VARCHAR
Form id.
name VARCHAR
Form name (the form's name attribute).
paths VARCHAR[]
Pages the form appears on.
submission_count BIGINT
Number of verified submissions.
fields STRUCT("name" VARCHAR, "type" VARCHAR)[]
Form fields: name and type.
created_at TIMESTAMP WITH TIME ZONE
When the form was first detected.
ConstraintsPRIMARY KEY (id)
Example

Forms by number of submissions

SELECT site, name, submission_count
FROM netlify.main.forms
ORDER BY submission_count DESC;
Link
functions 1 example13 cols

Netlify Functions deployed on every site, per deploy and branch

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
deploy_idnot null VARCHAR
Deploy the functions belong to.
branch VARCHAR
Branch of that deploy.
provider VARCHAR
Function provider, e.g. lambda.
log_type VARCHAR
Where the function logs go, e.g. netlify.
deployed_at TIMESTAMP WITH TIME ZONE
When the function group was deployed.
namenot null VARCHAR
Function name.
runtime VARCHAR
Runtime: js, go, rs …
sha VARCHAR
Content digest of the function bundle.
function_id VARCHAR
Netlify's identifier of this function bundle.
size_bytes BIGINT
Bundle size in bytes.
ConstraintsPRIMARY KEY (site_id, deploy_id, name)
Example

Deployed functions per runtime

SELECT runtime, count(DISTINCT name) AS functions
FROM netlify.main.functions
GROUP BY runtime
ORDER BY functions DESC;
Link
hooks 1 example11 cols

Deploy and form notifications (outgoing webhooks, email, Slack) of every Netlify site; URLs reduced to host

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
idnot null VARCHAR
Hook id.
type VARCHAR
Notification type: url, email, slack, github_commit_status …
event VARCHAR
Event that fires it: deploy_created, deploy_failed, submission_created …
disabled BOOLEAN
Whether the hook is disabled.
form_id VARCHAR
Form the hook is limited to, if any.
target_host VARCHAR
Host of the target URL (the full URL is never exposed).
created_at TIMESTAMP WITH TIME ZONE
When the hook was created.
updated_at TIMESTAMP WITH TIME ZONE
When it last changed.
ConstraintsPRIMARY KEY (id)
Example

Active notifications and where they go

SELECT site, event, type, target_host
FROM netlify.main.hooks
WHERE NOT disabled
ORDER BY site, event;
Link
projects 1 example16 cols

Netlify sites in the shared web-deploy projects vocabulary (UNION with vgi-vercel)

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
idnot null VARCHAR
Site id (UUID).
name VARCHAR
Site name.
framework VARCHAR
Framework of the published deploy, e.g. astro, next, hugo.
repo VARCHAR
owner/name of the linked git repository.
repo_provider VARCHAR
Linked git provider: github, gitlab, bitbucket or azure_devops.
production_branch VARCHAR
Branch whose pushes deploy to production.
created_at TIMESTAMP WITH TIME ZONE
When the site was created.
updated_at TIMESTAMP WITH TIME ZONE
When the site settings last changed.
account_id VARCHAR
Owning account (team) id.
root_directory VARCHAR
Base directory of the build (NULL = repo root).
build_command VARCHAR
Command Netlify runs to build the site, e.g. npm run build.
output_directory VARCHAR
Publish directory.
serverless_function_region VARCHAR
Default functions region (airport code).
production_url VARCHAR
Production URL (https).
production_deployment_id VARCHAR
Id of the published production deploy.
ConstraintsPRIMARY KEY (id)
Example

Projects per git provider (same query works on vercel.main.projects)

SELECT repo_provider, count(*) AS projects
FROM netlify.main.projects
GROUP BY repo_provider
ORDER BY projects DESC;
Link
sites 2 examples40 cols

Netlify sites with repository, build settings, custom domain, SSL and published deploy

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
idnot null VARCHAR
Site id (UUID).
name VARCHAR
Site name (<name>.netlify.app).
account_id VARCHAR
Owning account id.
account_slug VARCHAR
Owning account slug.
account_name VARCHAR
Owning account name.
state VARCHAR
Site state, e.g. current.
plan VARCHAR
Site plan.
url VARCHAR
Primary URL (http).
ssl_url VARCHAR
Primary HTTPS URL.
admin_url VARCHAR
Netlify app page of the site.
custom_domain VARCHAR
Primary custom domain (NULL = only the netlify.app subdomain).
domain_aliases VARCHAR[]
Additional domains (aliases) served by the site.
branch_deploy_custom_domain VARCHAR
Custom domain for branch deploys.
deploy_preview_custom_domain VARCHAR
Custom domain for deploy previews.
ssl BOOLEAN
Whether HTTPS (a TLS certificate) is provisioned.
force_ssl BOOLEAN
Whether HTTP is redirected to HTTPS.
managed_dns BOOLEAN
Whether the domain uses Netlify DNS.
created_at TIMESTAMP WITH TIME ZONE
When the site was created.
updated_at TIMESTAMP WITH TIME ZONE
When the site settings last changed.
repo VARCHAR
owner/name of the linked repository.
repo_provider VARCHAR
Git provider: github, gitlab, bitbucket or azure_devops.
repo_url VARCHAR
URL of the linked repository.
production_branch VARCHAR
Branch that deploys to production.
base_dir VARCHAR
Base directory of the build (monorepos).
build_command VARCHAR
Build command (netlify.toml may override it).
publish_dir VARCHAR
Publish directory.
functions_dir VARCHAR
Functions directory.
stop_builds BOOLEAN
True when automatic builds are stopped.
private_logs BOOLEAN
Whether deploy logs are private to team members.
public_repo BOOLEAN
Whether the linked repository is public.
allowed_branches VARCHAR[]
Branches allowed to build branch deploys.
build_image VARCHAR
Build image, e.g. noble or focal.
functions_region VARCHAR
Default functions region (airport code).
password_protected BOOLEAN
Whether the site is password protected (the password itself is never read).
prevent_non_git_prod_deploys BOOLEAN
Whether production deploys must come from git.
published_deploy_id VARCHAR
Id of the deploy currently published to production.
published_deploy_state VARCHAR
State of the published deploy.
published_at TIMESTAMP WITH TIME ZONE
When the published deploy went live.
framework VARCHAR
Framework detected in the published deploy, e.g. astro, next, hugo.
ConstraintsPRIMARY KEY (id)
Examples (2)

Sites with a custom domain that do not force HTTPS

SELECT name, custom_domain, ssl, force_ssl
FROM netlify.main.sites
WHERE custom_domain IS NOT NULL AND NOT force_ssl
ORDER BY name;

Sites per git provider

SELECT repo_provider, count(*) AS sites
FROM netlify.main.sites
GROUP BY repo_provider
ORDER BY sites DESC;
Link
split_tests 1 example11 cols

Split tests (traffic splits between branches) of every Netlify site

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
idnot null VARCHAR
Split test id.
name VARCHAR
Split test name.
path VARCHAR
Path the split applies to.
active BOOLEAN
Whether the split is running.
branches STRUCT(branch VARCHAR, percentage DOUBLE)[]
Branches and the share of traffic each receives (percent).
created_at TIMESTAMP WITH TIME ZONE
When it was created.
updated_at TIMESTAMP WITH TIME ZONE
When it last changed.
unpublished_at TIMESTAMP WITH TIME ZONE
When it was stopped, if it was.
ConstraintsPRIMARY KEY (id)
Example

Traffic share per branch of running split tests

SELECT site, name, b.branch, b.percentage
FROM netlify.main.split_tests,
     unnest(branches) AS u(b)
WHERE active
ORDER BY site, b.percentage DESC;
Link
ssl_certificates 1 example8 cols

TLS certificate of every Netlify site: state, covered domains and expiry

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
sitenot null VARCHAR
Site name (<name>.netlify.app).
site_idnot null VARCHAR
Site id (UUID).
state VARCHAR
Certificate state, e.g. issued, pending, custom.
domains VARCHAR[]
Domains the certificate covers.
created_at TIMESTAMP WITH TIME ZONE
When it was issued.
updated_at TIMESTAMP WITH TIME ZONE
When it was last renewed or changed.
expires_at TIMESTAMP WITH TIME ZONE
When it expires.
ConstraintsPRIMARY KEY (site_id)
Example

Certificates in order of expiry

SELECT site, state, expires_at
FROM netlify.main.ssl_certificates
ORDER BY expires_at;
Link
team_members 1 example8 cols

Members of every Netlify account (team) with their roles

Columns
platformnot null VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
team_idnot null VARCHAR
Account (team) id.
user_idnot null VARCHAR
Netlify user id of the member.
username VARCHAR
Always NULL on Netlify (shared vocabulary column).
email VARCHAR
Email address.
name VARCHAR
Full name.
role VARCHAR
Owner, Collaborator, Developer, Billing Admin, Reviewer …
account_slugnot null VARCHAR
Account (team) slug.
ConstraintsPRIMARY KEY (team_id, user_id)
Example

Members per role per account

SELECT account_slug, role, count(*) AS members
FROM netlify.main.team_members
GROUP BY ALL
ORDER BY account_slug, members DESC;
Link
Table functions
build_logs (deployment_id VARCHAR) 1 example

The deploy summary messages and error of one Netlify deploy, as log rows

Arguments
deployment_id VARCHAR
Deploy id whose summary messages and error to read.
Returns columns
platform VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
deployment_id VARCHAR
The deploy the line belongs to.
line INTEGER
1-based position of the row.
created_at TIMESTAMP WITH TIME ZONE
When the deploy last changed (Netlify does not timestamp summary messages).
type VARCHAR
info, warning or error.
text VARCHAR
Message text (UNTRUSTED build output).
step VARCHAR
Message title, or 'deploy' for the error row.
step_type VARCHAR
summary or error.
entrypoint VARCHAR
Always NULL on Netlify (shared vocabulary column).
event_id VARCHAR
Always NULL on Netlify (shared vocabulary column).
Example

Warnings and the error of a failed deploy

SELECT line, type, step, text
FROM netlify.main.build_logs('6650a1b2c3d4e5f6a7b8c902')
WHERE type IN ('warning', 'error')
ORDER BY line;
Link
deploy (deployment_id VARCHAR) 1 example

One Netlify deploy in detail: summary messages, functions and schedules

Arguments
deployment_id VARCHAR
Deploy id (24 hex characters), as in deployments.id.
Returns columns
platform VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
id VARCHAR
Deploy id.
project VARCHAR
Site name.
environment VARCHAR
production or preview (shared vocabulary; Netlify context production vs the rest).
state VARCHAR
Normalized state: queued, building, ready, error or canceled.
raw_state VARCHAR
Netlify state: new, pending_review, accepted, enqueued, building, uploading, processing, ready, error, rejected …
branch VARCHAR
Git branch the deploy was built from.
commit_sha VARCHAR
Git commit SHA (commit_ref).
commit_message VARCHAR
Commit message / deploy title (untrusted, author-supplied text).
creator VARCHAR
Committer name, when Netlify reports one.
created_at TIMESTAMP WITH TIME ZONE
When the deploy was created (queued).
building_at TIMESTAMP WITH TIME ZONE
Build start, derived as ready_at (or end) βˆ’ deploy_time; NULL until the deploy ends.
ready_at TIMESTAMP WITH TIME ZONE
When the deploy became ready (published_at, else updated_at of a ready deploy).
build_duration_seconds DOUBLE
Netlify deploy_time in seconds.
url VARCHAR
Unique deploy URL (https://<id>--<site>.netlify.app).
inspector_url VARCHAR
Netlify app page of the deploy.
project_id VARCHAR
Site id.
context VARCHAR
Raw deploy context: production, deploy-preview, branch-deploy, dev …
error_message VARCHAR
Error message of a failed deploy (untrusted build output).
review_id BIGINT
Pull/merge request number of a deploy preview.
published_at TIMESTAMP WITH TIME ZONE
When it was published to production, if it was.
summary_status VARCHAR
Deploy summary status (ready, error …).
summary_messages STRUCT of 3 fields[]
Deploy summary messages (UNTRUSTED text).
STRUCT[] 3 fields
  • typeVARCHAR
  • titleVARCHAR
  • descriptionVARCHAR
function_count INTEGER
Number of functions in the deploy.
function_names VARCHAR[]
Names of the deploy's functions.
functions STRUCT(name VARCHAR, runtime VARCHAR, id VARCHAR)[]
The deploy's functions: name, runtime, id.
function_schedules STRUCT(name VARCHAR, cron VARCHAR)[]
Scheduled functions and their cron expressions.
edge_function_count INTEGER
Number of edge functions declared in the deploy.
Example

Functions shipped in one deploy

SELECT id, state, function_count, function_names
FROM netlify.main.deploy('6650a1b2c3d4e5f6a7b8c901');
Link
form_submissions (form_id VARCHAR, include_contents := BOOLEAN) 1 example

Submissions of one Netlify form: metadata by default, contents (PII) only on request

Positional arguments
form_id VARCHAR
Form id, as in forms.id.
Named arguments
include_contents := BOOLEAN
Also return the submitted contents (personal data). Default false: metadata only. Β· default false
Returns columns
platform VARCHAR
Always 'netlify' (shared web-deploy vocabulary).
form_id VARCHAR
The form.
id VARCHAR
Submission id.
number INTEGER
Submission number within the form.
created_at TIMESTAMP WITH TIME ZONE
When it was submitted.
site_url VARCHAR
URL of the site it was submitted on.
email VARCHAR
Submitter email (PII; NULL unless include_contents).
name VARCHAR
Submitter name (PII; NULL unless include_contents).
first_name VARCHAR
First name (PII; NULL unless include_contents).
last_name VARCHAR
Last name (PII; NULL unless include_contents).
company VARCHAR
Company (NULL unless include_contents).
summary VARCHAR
Submission summary (PII; NULL unless include_contents).
body VARCHAR
Message body (PII, untrusted; NULL unless include_contents).
data JSON
All submitted fields as JSON (PII, untrusted; NULL unless include_contents).
Example

Submissions per day for one form (metadata only, no PII)

SELECT date_trunc('day', created_at) AS day, count(*) AS submissions
FROM netlify.main.form_submissions('5f1e0c0ffee0000000000001')
GROUP BY day
ORDER BY day;
Link
unified 1 table

Netlify deploys in the cross-orchestrator unified runs shape.

Schema examples (1)
Example

Run outcomes per site since a date, ready to UNION with other orchestrators

SELECT pipeline, status, count(*) AS runs
FROM netlify.unified.runs
WHERE queued_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY ALL
ORDER BY pipeline, status;
Tables
runs 1 example11 cols

Netlify deploys as orchestrator runs (UNION ALL with Vercel, Airflow, Dagster, GitHub Actions …)

Columns
orchestratornot null VARCHAR
Always 'netlify'.
run_idnot null VARCHAR
Deploy id.
pipeline VARCHAR
Site name.
statusnot null VARCHAR
queued, running, success, failed, cancelled or skipped.
raw_status VARCHAR
Netlify deploy state.
trigger VARCHAR
event (git push / pull request), manual (CLI, drag-and-drop) or other.
queued_at TIMESTAMP WITH TIME ZONE
When the deploy was created.
started_at TIMESTAMP WITH TIME ZONE
Build start (derived: end βˆ’ deploy_time).
ended_at TIMESTAMP WITH TIME ZONE
When it became ready or failed.
duration_seconds DOUBLE
Netlify deploy_time in seconds.
url VARCHAR
Netlify app page of the deploy.
ConstraintsPRIMARY KEY (run_id)
Example

Run outcomes per site since a date, ready to UNION with other orchestrators

SELECT pipeline, status, count(*) AS runs
FROM netlify.unified.runs
WHERE queued_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY ALL
ORDER BY pipeline, status;
Link

Credentials

The secret type netlify declares, as reported by the worker itself.

netlify

How to get these credentials

Netlify personal access token or OAuth token, plus an optional API base URL

secret.sql
CREATE SECRET netlify (
    TYPE netlify,
    token    '<NETLIFY_TOKEN>',  -- secret
    base_url '<base_url>'
);
Key Type Required Description
token secret VARCHAR β€” Netlify personal access token (User settings > Applications > Personal access tokens) or OAuth access token; sent as a bearer token.
base_url VARCHAR β€” API base URL; default https://api.netlify.com/api/v1 (http:// is accepted only for 127.0.0.1/localhost).

The worker doesn't mark which keys are required.

Create the secret in the same session, after attaching netlify β€” the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

deployments_columns β€” The deployments columns (binds only; create a netlify secret and drop LIMIT 0 for rows)

SELECT project, environment, state, branch, created_at
FROM netlify.main.deployments
LIMIT 0;

Uses deployments

runs_columns β€” The unified.runs columns (binds only; create a netlify secret and drop LIMIT 0 for rows)

SELECT orchestrator, run_id, pipeline, status, queued_at
FROM netlify.unified.runs
LIMIT 0;

Uses runs

Plan and site quota usage per account

SELECT slug, type_name, sites_used, sites_included
FROM netlify.main.accounts
ORDER BY slug

Uses accounts

Sites with a custom domain that do not force HTTPS

SELECT name, custom_domain, ssl, force_ssl
FROM netlify.main.sites
WHERE custom_domain IS NOT NULL AND NOT force_ssl
ORDER BY name

Uses sites

Projects per git provider (same query works on vercel.main.projects)

SELECT repo_provider, count(*) AS projects
FROM netlify.main.projects
GROUP BY repo_provider
ORDER BY projects DESC

Uses projects

Domain aliases per site

SELECT project, domain
FROM netlify.main.domains
WHERE kind = 'alias'
ORDER BY project, domain

Uses domains

20 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • Which Netlify deploys failed? List the site and deploy id.
  • What is the average production build time per Netlify site?
  • Which sites have a custom domain but do not force HTTPS?
  • Which site's TLS certificate expires first, and when?
  • How many environment variables does each site define?
  • Which Netlify form has the most submissions?

Netlify is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.