Servant provides a type-level domain-specific language (DSL) in Haskell for describing web APIs. From a single API specification, developers can derive server implementations, client libraries, documentation, and more—ensuring consistency and type safety across the stack. We have a tutorial that introduces the core features of servant. After this article, you should be able to write your first server web services, learning the rest from the haddocks' examples. The core documentation can be found here. Other blog posts, videos, and slides can be found on the website. The core documentation can be found here. Other blog posts, videos and slides can be found on the website.

Features

  • Defines APIs at the type level for compile-time consistency
  • Derives server handlers, clients (Haskell and other languages), and docs from the same spec
  • Extensible with custom combinators and interpretations
  • Ensures request/response marshalling matches Haskell types
  • Used in production by companies like GitHub, Klarna, and IOHK (Cardano)
  • Supports static documentation generation and mocking via API descriptions

Project Samples

Project Activity

See All Activity >

Categories

Libraries

Follow Servant

Servant Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Servant!

Additional Project Details

Programming Language

Haskell

Related Categories

Haskell Libraries

Registered

2025-09-04