Search API Connector Documentation


Multi-Query Requests

This advanced feature of the API Connector add-on for Google Sheets enables you to stack multiple request URLs (or POST bodies) together and run them one after the other as a unified block. API Connector will cycle through the requests and print out the results one after another in a single sheet.

This is a paid feature, please install API Connector for a free trial or upgrade to access.

For more robust pagination handling, try the pagination function.


Before you Begin

Click here to install the API Connector add-on from the Google Marketplace.

Why Use the Multi-Query Function?

Multi-query requests are commonly used to account for simple API pagination, in which an API limits the number of records returned in each response and requires you to make multiple requests to retrieve the full set of data. There are a few common methods of pagination that can be managed via multi-query requests:

  1. page parameters
    Page 1:
    Page 2:
  2. offset-based pagination
    Page 1:
    Page 2:
  3. page directory pagination
    Page 1:
    Page 2:

Multi-query requests can also be used to query the same (or similar) API endpoint multiple times, e.g. for different company IDs, different stock symbols, different time periods, etc. They are useful for chaining together API requests, where you first grab one set of values and then plug them into a second set of API calls.

Example 1: List URLs in the URL input box

To run multiple requests, list your URLs on separate lines. When you Run the request, each subsequent response will be appended to the first empty row.

Example 2: Reference Cells

You can reference cells in the input box (info). Again, make sure each separate request is on a new line, to ensure API Connector recognizes it as a new request:

Example 3: Reference a Range of Cells

As a shorthand method, instead of referencing cells one by one, you can reference them as a range, like this:

As shown in the screenshots above, when you reference a cell, you can reference the entire URL or part of the URL.

Example 4: Multiple Request Bodies

While the above will work for cycling through a list of GET requests, POST requests usually require different POST bodies. To cycle through a list of POST requests, you can enter multiple request bodies into the POST body input box. Tick the “Multiple request bodies” checkbox and then separate each POST body with the text delimiter :::BREAK::: (the word BREAK surrounded by three colons on each side). This will tell API Connector that a new request body has started.

If you place your POST bodies into cells, you can combine the multi-POST body feature with cell references, such that your POST body looks something like this:


When you enable this feature, API Connector will automatically run through your list of POST bodies, sending each POST body to the same request URL and printing out each response consecutively into the same sheet.


  • When you stack requests, response data from each query will be sent to a single sheet, with each subsequent request appended to the first empty row.
  • When running multiple queries, a 1.5 second delay is automatically inserted between requests to avoid rate limits.
Previous ImportAPI Custom Function
Next Pagination Handling

9 thoughts on “Multi-Query Requests”

  1. Love the API add-on… just purchased premium.

    I do have a quick question on having the API work around URL’s that come back invalid. I have a long set of Twitter usersname’s that I’m pulling back data on…. and every so often a user will close their account and their username becomes invalid. It then throws back an error in that larger batch and I’m required to fish through 100’s of usernames to find the invalid username.

    Can I have the script bypass an invalid username?

    • Thank you for your purchase, I am glad you like API Connector.

      You’ve raised a good point, API Connector stops running when there’s an error, which is inconvenient when you’d prefer it to keep going. What about using API Connector’s custom function ImportAPI() as a workaround? Basically you can list out all your usernames in one column, and then copy down the formula that calls the Twitter API. Unlike running multiple queries in a single request, it will run each request individually.

      To do this you first save an API request in API Connector. Let’s say it’s named “User”, then you can call that request through ImportAPI like this:

      • Update – I’ve modified the logic so API Connector will now keep running through a request list even when it hits an error. In those cases, it will just skip that request and print out an error notification into the Status area at the bottom.

  2. Hi Ana, thank you for the informative guides to you very useful API Connector tool.

    Could you advise how to pull 2 API References using your custom IMPORTAPI() Function as I have found this to be very well suited to my requirements.

    Can you add 2 (or more) URLS separated by a space, comma, ; or maybe |? (I’ve tried all these and don’t think they are the right way!)

    Thanks again

    • Thank you for the comment! Sorry, multi-query requests can only be run through the standard sidebar method as shown above, ImportAPI() doesn’t have this feature. However you can “zip” through a list of URLs by listing them out on subsequent rows in your sheet, you can see an example of that in this article (check the section called “Example Referencing Multiple Cells”).


Leave a Reply to Ana Cancel reply

Table of Contents