Search API Connector Documentation
Import MailerLite Data to Google Sheets
In this guide, we’ll walk through how to pull data from the MailerLite API directly into Google Sheets, using the API Connector add-on.
We'll first get an API token from MailerLite, and then set up a request to pull in metrics to your spreadsheet.
- Before You Begin
- Part 1: Get your MailerLite API Key
- Part 2: Pull MailerLite API Data into Sheets
- Part 3: Handle Pagination
- Part 4: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your MailerLite API Key
- Log in to MailerLite
- Navigate to Integrations
- Choose MailerLite API
- Click "Generate new token"
- Give it a name and save
- Your key will now be displayed. Copy it and keep it safe; we'll use it shortly.
Part 2: Pull MailerLite API Data into Sheets
You can access any of the endpoints and parameters listed in the API documentation. Here's an example request setup showing how to fetch campaign stats from your account. Substitute in your API key where it says
- Open up Google Sheets and click Extensions > API Connector > Open > Create request.
- In the request form enter the following:
- Request URL:
- Create a new tab and click Set current to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see MailerLite data populate your sheet.
- (Optional) By default, MailerLite returns a lot of fields you likely don't need. To simplify, open the field editor and filter out any fields you don't need in your report.
Part 3: Handle Pagination
By default, MailerLite limits the numbers of records per page, usually to 25. To get more, set the
limit parameter to 100. To get more than that, cycle through records using pagination handling:
- Page parameter:
- Run until: choose when to stop fetching data
Part 4: API Documentation
Official API documentation: https://developers.mailerlite.com/docs/