# Kaminari

> A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs

Source: https://talira.ai/catalog/kaminari-e66mmj05
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / pagination](https://talira.ai/categories/libraries/pagination), [languages / ruby / rails](https://talira.ai/categories/languages/ruby/rails)
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- API: yes[^2]
- Creator: Akira Matsuda (amatsuda)

Kaminari paginates Ruby web apps with chainable scopes: `User.order(:name).page(7).per(50)` returns an ordinary Active Record relation, and the `paginate` view helper renders page links from partial templates you can override or theme. It doesn't patch `Array`, `Hash` or `Object`, needs no configuration, and has adapters for Active Record, Mongoid and MongoMapper, for Action View, Sinatra and Grape, and for ERB, Haml and Slim templates. It can paginate plain arrays and results from an external API, skip the `COUNT` query on large tables with `without_count`, cap page sizes and page numbers per model, and translate its labels with I18n. Akira Matsuda created it in 2011.

## Links

- GitHub: https://github.com/kaminari/kaminari
- Docs: https://github.com/kaminari/kaminari/wiki

## Problems it solves

- split a long list of records into pages in my Rails app
- add numbered page links under a table without writing the offset math myself
- counting every row on a huge table makes each page of results load slowly
- paginate a Ruby array or rows from an external API with the same page links
- stop people from requesting 10,000 records on one page
- friendlier URLs like /posts/page/3 instead of ?page=3
- change the HTML of the page links to match our design
- show 'Displaying items 6 - 10 of 26 in total' above a list
- paginate Mongoid documents in a Sinatra or Grape API
- translate the Next and Previous labels on page links into other languages
- add rel next and prev link tags to paged listings
- set a different default page size for each model

## Features

- chainable page and per scopes on a plain relation
- paginate helper rendered from overridable partials, with themes
- without_count mode that skips the COUNT query
- paginate_array for arrays and external API results
- paginates_per, max_paginates_per and max_pages per model
- page_entries_info, link_to_next_page, link_to_prev_page and rel_next_prev_link_tags helpers
- I18n labels
- adapters for Active Record, Mongoid, MongoMapper, Action View, Sinatra and Grape
- ERB, Haml and Slim templates

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.28 out of 1.
Signals: backing 0.20, extensibility 0.20.

- created by Akira Matsuda (amatsuda)

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Pagy](https://talira.ai/catalog/pagy-qf6njkb4.md): Agnostic pagination in plain ruby

## Sources

[^1]: https://github.com/kaminari/kaminari/blob/master/MIT-LICENSE (checked 20 Nov 2026)
[^2]: https://github.com/kaminari/kaminari (checked 20 Nov 2026)
