---
title: "Paginating API Calls in Google Apps Script"
author: "Brian Bennett"
date: 2021-03-21T16:25:39+00:00
modified: 2021-03-21T16:28:05+00:00
canonical_url: https://pulse.appsscript.info/p/2021/03/paginating-api-calls-in-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2021/03/paginating-api-calls-in-google-apps-script.md
categories:
  - "Beginner"
  - "Solutions"
tags:
  - "blog.ohheybrian.com"
featured_image: https://pulse.appsscript.info/files/2021/03/brandi-redd-6H9H-tYPUQQ-unsplash-1024x683-1.jpg
description: "Pagination can be tricky. This post has a video and sample script to help you abstract the process of working with paginated API responses in Apps Script."
---

# Paginating API Calls in Google Apps Script

![Paginating API Calls in Google Apps Script](https://pulse.appsscript.info/files/2021/03/brandi-redd-6H9H-tYPUQQ-unsplash-1024x683-1.jpg)

> The featured image is by Brandi Redd on Unsplash
> One of my favorite things about Google Apps Script is that I can get information from an API and write it directly to a shared document or spreadsheet…It’s not uncommon for these requests to come back in paginated form. Meaning, if your request has 100 responses, they’ll come in batches of *n* size instead of all at once.

Pagination can be tricky. This post has a video and sample script to help you abstract the process of working with paginated API responses in Apps Script.

Source: *[Paginating API Calls in Google Apps Script*](https://blog.ohheybrian.com/2021/03/paginating-api-calls-in-google-apps-script/)

---

*Published by [Brian Bennett](https://pulse.appsscript.info/p/author/brianbennett/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2021/03/paginating-api-calls-in-google-apps-script/](https://pulse.appsscript.info/p/2021/03/paginating-api-calls-in-google-apps-script/)*
