Back to Features
Feature

Built-in Pagination

Page through millions of rows without breaking a sweat.

Every csv-api endpoint is paginated by default. Set the page number, set the page size, and get back the rows plus everything you need to render a 'Page 4 of 217' control.

What it does

Pagination on csv-api is offset-based and built into every records endpoint. Pass page and per_page query parameters to control which slice of data you get back. Each response includes a meta object with the current page, page size, total row count, and total page count — exactly what you need to render pagination controls in any frontend framework.

How it works

  1. 1

    Pass page and per_page

    ?page=2&per_page=50 returns rows 51 through 100. The default page size is 25 if you don't specify one.

  2. 2

    Read the meta object

    Every response includes meta.total (total matching rows), meta.page, meta.per_page, and meta.total_pages. No second 'count' query needed.

  3. 3

    Combine with filters

    Pagination respects any filters you apply. If you filter to 47 rows and request per_page=10, you get five pages back.

See it in action

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://csv-api.com/api/v1/datasets/d_a8f3bc91/records?page=3&per_page=25"

{
  "data": [ /* 25 rows here */ ],
  "meta": {
    "total": 1247,
    "page": 3,
    "per_page": 25,
    "total_pages": 50
  }
}

Why it matters

  • No client-side row limits

    Stop loading entire CSVs into the browser. Page through them as needed and your frontend stays fast even when datasets grow.

  • All the metadata you need

    Render 'Showing 51-100 of 1,234' or 'Page 3 of 25' from a single API response. No second request to count rows.

  • Configurable page sizes

    Choose any page size that suits your UI — small for tables, larger for infinite scroll, anywhere in between.

The problem it solves

When your CSV has 50,000 rows, fetching all of them on every page load is wasteful at best and broken at worst. Pagination lets you fetch only what's on screen and trust the meta object to handle the rest.

Common use cases

  • Tables and grids that need stable, scrollable views of large datasets

  • Infinite scroll feeds powered by a single CSV upload

  • Admin dashboards that show 'most recent N records' from a constantly changing dataset

  • Mobile clients where bandwidth and memory matter

Try Built-in Pagination for yourself

Create a free csv-api account, upload a file, and see your API live in under a minute.

We use essential cookies to keep you logged in. No tracking or analytics. Privacy policy