Print

Print Request Metadata

The API Connector add-on for Google Sheets provides an option to include request URLs and request bodies in your sheet each time your data refreshes. To access, click on the Output options button and check the relevant boxes.

addmetadata-options

Contents

Before You Begin

If you haven’t already, click here to install the API Connector add-on from the Google Marketplace.

Why Add Request Metadata?

Printing request URLs and request bodies into your response sheet is useful in a few cases:

  1. Get metadata
  2. Convert preset to custom requests

Get metadata

For example, imagine you're fetching YouTube data for various search terms. YouTube's API sends back a list of statistics, but doesn't include the search term in their response. If you are searching for data on multiple search terms, adding in the request URL tells you which statistics correspond to which term.

Convert a preset request into a custom request

API Connector's preset API integrations are a convenient way to quickly pull data from many different APIs. However, for more advanced requests you may prefer to create your own custom request. Rather than starting totally from scratch, you can first run a preset request, check the request configuration, and modify it as needed.

To view the underlying API URL, tick the Add request URL box before running your request. This will print out the request URL, which can then be copied and pasted into a custom request. Similarly, tick the Add request body box to print out the request body.

Each Row Option

By default, request metadata will be printed on the first line of the data set (in either the first or second column, depending on whether or not you have enabled timestamps).

If you prefer to see the request metadata printed on every line, click the "Each row?" option to enable it.

Leave a Comment

Jump To