# Grape

An opinionated framework for creating REST-like APIs in Ruby.

Repository: https://github.com/ruby-grape/grape
Canonical: https://ross.abutalabs.com/products/grape
Homepage: http://www.ruby-grape.org
Language: Ruby
License: MIT
License Family: permissive
Topics: grape, api, ruby, hacktoberfest
Last push: 2026-08-24T08:08:24+00:00
Link (homepage): http://www.ruby-grape.org

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 5875, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 10003, forks 1231 (observed 2026-08-28T04:10:39.199410+00:00)

## What it is
Grape is an opinionated Ruby framework for building REST-like APIs, running on Rack or alongside Rails and Sinatra. It provides a simple DSL with built-in support for versioning, multiple formats, content negotiation, and parameter validation, with a companion grape-swagger gem for API documentation.

## Use cases
- build a rest api in ruby
- create versioned json api endpoints
- add an api to an existing rails app
- mount a rack-based api microservice
- generate swagger docs for a ruby api
- validate and coerce api request parameters

## When to choose
- you need a dedicated REST API layer in Ruby with versioning and content negotiation
- you want to complement Rails or Sinatra with a lightweight API DSL
- you prefer declarative parameter validation and auto-generated Swagger docs

## When to avoid
- you are building a full web application with server-rendered views
- you need a framework outside the Ruby ecosystem
- you want a non-opinionated, unstructured API layer

## Facets
- artifact type: framework
- maturity: active
- function: api-framework, web-framework, routing, middleware, serialization
- domain: web-development, backend, apis
- platform: ruby
- tags: rest-api, dsl, rack, sinatra, rails, api-versioning, content-negotiation, swagger, web-server

## Member repositories
- ruby-grape/grape (main) score 77
- ruby-grape/grape-swagger (plugin) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:39.199410+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-29T17:20:00.834354+00:00, confidence not recorded.
  - readme: https://github.com/ruby-grape/grape (fetched 2026-08-28T04:10:39.199410+00:00, sha 6d9460997a07)
  - homepage: http://www.ruby-grape.org (fetched 2026-08-29T08:19:44.637767+00:00, sha d67b61028905)
- Data as of 2026-08-30T08:39:29.467469+00:00.
