Alteryx: Pagination — One Page Is Never Enough!

So, I learned Alteryx this week, and let me tell you, it was quite the experience!

There are a lot of features that make Alteryx an interesting tool to work with, but one that particularly caught my attention was its ability to retrieve data directly from an API.

By combining tools like Text Input, Formula, and Download, you can connect to an API and bring external data directly into your workflow.

Sounds simple enough, right?

Well, not quite.

You see, depending on the API you're working with, your first request might only return a fraction of the available data.

So what happens when you need the rest?

That's where pagination comes in!

What Is Pagination, Anyway?

Pagination is the process of retrieving data from an API across multiple pages rather than receiving everything in a single request.

Think of it like reading a book. Instead of having every page thrown at you at once, you work through the book one page at a time.

APIs use pagination to manage how much data is returned in each request, helping control response sizes and reduce the load on their systems.

For example, imagine an API contains 1,000 records but only allows you to retrieve 100 records per request.

That means your first request only gives you 10% of the available data.

To retrieve everything, you'll need to request all 10 pages.

And while you could manually change the page number in your URL ten times, who wants to do that?

We're using Alteryx. Let's automate it!

Step 1: Establishing Your API Connection

Before we can start retrieving multiple pages, we need to establish a connection to our API.

For this, we'll need a few things:

  • Base URL: The API endpoint we're requesting data from.
  • API Key: An authentication credential, if the API requires one.
  • User-Agent: A request header that identifies the application making the request, when required or recommended by the API.

We can start by using the Text Input tool to store our API URL.

Next, we'll connect it to the Download tool, which allows Alteryx to send an HTTP request to the API.

Depending on the API's requirements, you may also need to configure authentication and request headers.

Once everything is configured correctly, run the workflow and see what comes back!

Step 2: Parsing the JSON Response

Now that we've successfully connected to our API, let's take a look at the data.

You'll likely notice that the response is returned as JSON, with the contents stored in a single field.

Not exactly the most analysis-friendly format!

First, we can use the Select tool to keep the fields we need, particularly the DownloadData field containing the response body.

Next, we'll bring in the JSON Parse tool, found in the Developer tool category.

This tool helps break down the JSON response into fields that we can work with.

Here's something important to understand about JSON:

  • Curly braces { } represent objects containing key-value pairs.
  • Square brackets [ ] represent arrays containing lists of values.

Depending on how deeply nested your JSON response is, you may need additional parsing or transformation steps to extract the information you're looking for.

The goal is to turn that messy-looking JSON into something we can actually analyze.

Step 3: Figuring Out How Many Pages We Need

Now that we've explored our response, it's time to figure out how much data we're dealing with.

Some APIs provide metadata showing the total number of records available. If yours does, this information can help determine how many pages you'll need to request.

Let's say our API contains 1,250 records and returns 100 records per page.

We can calculate the number of pages using:

Total Pages = CEIL(Total Records / Records Per Page)

In our example:

CEIL(1,250 / 100) = 13 pages

Why round up?

Because even though the last page only contains 50 records, we still need to retrieve it!

In Alteryx, we can use the Formula tool to perform this calculation.

Now that we know how many pages we need, it's time to create them.

Step 4: Generating Our Page Numbers

Here's where things start getting interesting.

Instead of manually creating a URL for every page, we can use the Generate Rows tool to create a sequence of page numbers.

For our example, we'd generate values from 1 through 13.

Each row represents a page that we'll eventually request from the API.

This is an important step because we're turning what would normally be a repetitive manual process into something Alteryx can handle automatically.

[INSERT IMAGE: Generate Rows configuration and output showing page numbers]

Step 5: Building Dynamic URLs

Now we have our base URL and our newly generated page numbers.

The next step is bringing them together!

We can use a tool such as Append Fields to attach our base URL to each generated page number.

Then, using the Formula tool, we can create a new URL for every page.

For example, if our API uses a page parameter, the resulting URLs might look something like this:

https://api.example.com/records?page=1

https://api.example.com/records?page=2

https://api.example.com/records?page=3

And so on!

We can use a formula to construct the URL dynamically rather than typing each one individually.

For example:

[BaseURL] + "?page=" + ToString([PageNumber])

This example assumes our base URL doesn't already contain query parameters.

The result? A separate API request URL for every page we need to retrieve.

[INSERT IMAGE: Formula tool and output showing dynamically generated URLs]

Step 6: Downloading All Our Pages

We're almost there!

Now that we have our list of URLs, we can connect the results to another Download tool.

This time, instead of sending just one request, Alteryx can use the generated URLs to retrieve data from multiple pages.

Once the requests finish, we can parse the JSON responses, extract the records, and combine them into a single dataset.

And just like that, we've gone from retrieving one page of data to building a workflow capable of retrieving multiple pages automatically!

Of course, there are a few things to keep in mind.

Not every API handles pagination the same way. Some use page numbers, others use offsets, and some provide a cursor or link to the next page.

You'll also want to pay attention to API rate limits, failed requests, and whether all the expected records were returned.

After all, just because the workflow runs doesn't necessarily mean we've retrieved everything!

Final Thoughts

Learning Alteryx this week definitely came with its challenges, but working through pagination helped me better understand how APIs and automated data workflows operate.

What started as a simple attempt to download data turned into an opportunity to explore JSON parsing, dynamic URL generation, and workflow automation.

And that's one of the things I'm enjoying about learning new tools: discovering how different components can work together to solve a problem.

Pagination might seem complicated at first, but once you understand the logic behind it, the process starts to make a lot more sense.

Because when it comes to working with APIs, sometimes one page just isn't enough!

Author:
Michael Guillette
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2026 The Information Lab