7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

PostgREST

Open source

A standalone server written in Haskell that turns any existing PostgreSQL database into a RESTful API, delegating validation and authorization to the database.

Open-source alternative to

postgrest.org
PostgREST homepage screenshot
GitHub stars
28k
Last commit
yesterday
Repository age
12 years
Version
v16.4
Licence
MIT
Self-hosted
Yes

About PostgREST

PostgREST is a web server that serves a fully RESTful API from an existing PostgreSQL database. The project claims it provides a cleaner, more standards-compliant and faster API than most teams would write by hand, because the database schema itself defines the endpoints.

The server is a Haskell program built on the Warp HTTP library, and it gets its speed from a compiled language with lightweight threads and from pushing as much work as possible into PostgreSQL. That covers building JSON responses directly in SQL, validating data, checking authorization, and counting and fetching rows or posting data in one command. The README cites subsecond response times at around two thousand requests per second on a small hosted instance, though results vary with setup.

To use it you install the binary for your platform or run the Docker image, then point it at your database. PostgREST is MIT licensed, with documentation at postgrest.org and sponsorship through Patreon. It suits developers who want an instant API layer over Postgres, including as a building block inside backend-as-a-service stacks.

Key features

  • REST API generated from a PostgreSQL schema
  • Compiled Haskell server using Warp
  • JSON serialization done inside the database
  • Authorization delegated to PostgreSQL
  • Docker image and platform binaries
  • Extensive online documentation

Good fit for

  • →Instant API for an existing Postgres database
  • →Backend for single-page and mobile apps
  • →Building blocks for backend-as-a-service platforms
Tags
postgresql
rest-api
haskell
database
api
automatic-api
backend
self-hosted

PostgREST: questions and answers

What is PostgREST used for?
PostgREST is a standalone server written in Haskell that turns any existing PostgreSQL database into a RESTful API, delegating validation and authorization to the database. It is a good fit for instant API for an existing Postgres database, backend for single-page and mobile apps, and building blocks for backend-as-a-service platforms.
Is PostgREST open source?
Yes. PostgREST is open source under the MIT licence. Its source code is on GitHub at PostgREST/postgrest and is written mainly in Haskell.
Is PostgREST free?
Yes. PostgREST is open source, so the software itself is free to use.
Can I self-host PostgREST?
Yes. PostgREST can be self-hosted on your own server or infrastructure; there is no official hosted version.
What is PostgREST an alternative to?
PostgREST is an open-source alternative to Xano. Other open-source alternatives to Xano include pREST, Nhost and Supabase.
Is PostgREST actively maintained?
Yes. The most recent commit to PostgREST was on 1 October 2026, and the latest release is v16.4, published on 24 September 2026. The project has 28k stars on GitHub.

Open-source alternatives to PostgREST

See all

SaaS alternatives to PostgREST

See all