Neon API logo

Neon API

Neon API

未知免费developer-tools

Neon 是 serverless Postgres:storage 和 compute 分离、scale-to-zero(不用时不收费)、DB branching、Postgres 100% 兼容。

适合什么时候用

scale-to-zero(5 分钟不用自动停 compute,0 费用)

先注意什么

scale-to-zero cold start(新连接 1-3 秒)

第一步先查

neon.tech 注册 + 创建项目拿 connection string。直接用任何 Postgres client:psql postgresql://user:pass@host/db

认证
api_key
CORS
?
HTTPS
注册
?
协议
REST, PostgreSQL
计费
freemium

可用率 · 30 天窗口

日常巡检数据收集后将在此处显示。
01

关于这个 API

Neon 是 2021 年创办的 serverless Postgres 数据库公司,团队多是前 Postgres 核心开发者。差异化技术:把 storage 和 compute 完全分离——storage 在 S3 (基于自研 file system),compute 是无状态 PG 实例。这种架构让两个魔法成真:(1) Scale-to-zero——不用时 compute 自动停,0 费用,下次连接 1-3 秒启动;(2) DB branching——每个 branch 是 storage 的 copy-on-write,几秒创建几个 GB 数据的"副本"。这两个特性让 Neon 完美适合 Vercel / Netlify / Cloudflare Workers 这种 serverless 部署+预览部署的场景——每个 PR 一个 staging DB,merge 后自动销毁。Vercel Postgres 后端就是 Neon。免费 tier 慷慨(10 projects),是个人项目 / hobby 的 Postgres 首选。

02

你可以做什么

  • 1Serverless 应用 backend(不连接时不付费)
  • 2Vercel / Cloudflare Workers + Postgres
  • 3preview deployment 每个 branch 一个 DB
  • 4间歇性 workload (cron jobs)
03

优劣对比

优点

  • scale-to-zero(5 分钟不用自动停 compute,0 费用)
  • DB branching(每个 git branch 自己的 DB copy 几秒创建)
  • Postgres 100% 兼容(任何 PG 工具直接用)
  • 免费 tier 慷慨(10 projects + 3GB storage)

注意事项

  • scale-to-zero cold start(新连接 1-3 秒)
  • 某些 Postgres extension 不支持
  • 相对年轻(2021 创办)
04

示例请求

通用模板 — 实际 endpoint 请查阅文档替换 <endpoint>。
curl https://neon.tech/<endpoint> \
  -H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.
05

快速开始

neon.tech 注册 + 创建项目拿 connection string。直接用任何 Postgres client:psql postgresql://user:pass@host/db

06

常见问题

Neon vs Supabase 怎么选?+

只要 Postgres + serverless 架构:Neon(更轻)。要 BaaS 全栈(auth + storage 等):Supabase。

cold start 影响生产吗?+

idle 5 分钟后才停。频繁访问的生产应用 connection 一直 warm。

07

技术细节

CORS: ?HTTPS: Yes注册: ?开源: No
认证方式
api_key
计费
freemium
速率限制
默认 100 req/分;账户级别
协议
REST, PostgreSQL
SDK
javascript, python, go, rust
08

标签