Claimable Postgres
No account needed, 72h ephemeral Postgres
npm install get-db
Or right here
Read our docs
Join the Open Source Program
create-database.ts
import { instantPostgres } from 'get-db';

export async function createDatabase() {
  const {
    databaseUrl,
    poolerUrl,
    claimUrl
  } = await instantPostgres({
    seed: {
      type: 'sql-script',
      path: './init.sql',
    }
  });

  return({ databaseUrl, poolerUrl , claimUrl });
}

API Reference

Create a new ephemeral Postgres database. Pass a ref to identify the source.

curl -X POST https://pg.new/api/v1/database \
  -H "Content-Type: application/json" \
  -d '{"ref": "my-app"}'
FieldTypeDescription
statusstringDatabase status (UNCLAIMED, CLAIMING, or CLAIMED)
neon_project_idstringThe Neon project identifier
connection_stringstringPostgreSQL connection URI
claim_urlstringURL to claim the database
expires_atstringISO 8601 expiration timestamp

Same postgres as these cool companies

Frequently Asked Questions