Search API Connector Documentation
Run Multiple Requests
Multi-query requests let you stack multiple requests together and run them one after the other as a unified block. When you run a multi-query request, API Connector will cycle through the requests and print out the results one after another in a single sheet.
There are two ways to run multi-query requests:
- Run requests for a list of URLs, e.g. if you want to
GETdata from the same API endpoint for each campaign ID in a list
- Run requests for a list of request bodies, e.g. if you want to update inventory levels by sending a
POSTrequest for each product in a list
- Before you begin
- Run requests for a list of URLs
- Run requests for a list of request bodies
- Use cell values in requests
Before you begin
Click here to install the API Connector add-on from the Google Marketplace.
Run requests for a list of URLs
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. In this example, 3 requests to the iTunes API were run in a row, with just the "term" parameter changed for each one.
Run requests for a list of request bodies
In some cases, you may want to cycle through a list of
PATCH requests, sending a different request body for each API call while the request URL stays the same.
Multiple request bodies should be entered one by one, with each request body separated by the word
:::BREAK::: and the "Multiple request bodies" option ticked.
Use cell values in requests
Instead of directly entering values into the request input fields, you can instead reference values from the cells in your sheet: Use Cell Values in Requests
- When you run multiple requests, a 2 second delay is automatically inserted between requests to avoid rate limits.
- To easily identify where each request starts, tick the "Add request URL" or "Add timestamp" boxes under Output options (leave the "Each row?" option unticked). This will print out the URL and/or timestamp at the start of each new request.