# PostgREST/postgrest

REST API for any Postgres database

Repository: https://github.com/PostgREST/postgrest
Canonical: https://ross.abutalabs.com/products/postgrest
Homepage: https://postgrest.org
Language: Haskell
License: MIT
License Family: permissive
Topics: haskell, database, rest, postgresql, server, postgrest, automatic-api, postgres, api, http, pg, pgsql, sql
Last push: 2026-08-27T00:28:01+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 4465, "days_push": 7, "days_rel": 12, "gap_med": 12.0, "n_releases_24m": 39}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 27629, forks 1228 (observed 2026-08-28T04:11:47.927383+00:00)

## What it is
PostgREST is a standalone web server that automatically exposes any existing PostgreSQL database as a fully RESTful HTTP API. Written in Haskell, it introspects the database schema and serves standards-compliant endpoints with filtering, pagination, and authentication support.

## Use cases
- expose a postgres database as a rest api without writing backend code
- automatically generate an api from database tables
- build a crud api for an existing postgres schema
- replace a hand-written backend with a database-driven api
- serve json api endpoints with filtering and pagination from sql
- quickly prototype an api backed by postgres

## When to choose
- you have a well-designed PostgreSQL schema and want a REST API immediately
- you want to avoid writing and maintaining boilerplate CRUD backend code
- you need a fast, standards-compliant API layer over Postgres
- you prefer database-level authorization (roles, RLS) over application logic

## When to avoid
- you need complex custom business logic beyond what SQL functions can express
- you use a database other than PostgreSQL
- you need a GraphQL API rather than REST
- your API contract must diverge significantly from your database schema

## Facets
- artifact type: service
- maturity: stable
- function: http-server, api-framework, database, routing, auth
- domain: databases, apis, backend, web-development, self-hosted
- platform: windows, self-hosted
- tags: postgresql, rest-api, automatic-api, haskell, database-to-api, linux, macos, docker, web-server

## Member repositories
- PostgREST/postgrest (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:47.927383+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:54:30.594541+00:00, confidence not recorded.
  - readme: https://github.com/PostgREST/postgrest (fetched 2026-08-28T04:11:47.927383+00:00, sha a3cd6412a21a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
