API Bridge

Two Minute Reports' API Bridge connector lets you access and analyze your data directly in Google Sheets or Looker Studio. Build custom reports, monitor key metrics, and make data-driven decisions - all without writing any code.
What you can report on
- Data from any REST API endpoint
- Custom JSON or CSV data sources
- Internal business metrics and KPIs
- Third-party platform data not natively supported by TMR
- Combine external data with other connectors in one report
Prerequisites
- The API endpoint URL you want to connect to
- Authentication credentials for the API (API key, Bearer token, or Basic Auth)
- Knowledge of the JSON response structure you want to query
How to create a connection
- Go to https://hub.twominutereports.com/connections
- Click New Connection to create a connection
- Select API Bridge from the list of available connectors

- Name the connection and authorize with your account credentials

After creating a connection:
- Enable the accounts you want to use from the available options

Important: Only enabled accounts can fetch data and count toward your plan usage. You can enable or disable accounts at any time in the hub to manage your plan usage efficiently.
Advanced features
JMESPath
By default, API Bridge returns the entire JSON response from the API. Use JMESPath to extract only the fields you need and keep your reports clean.
JMESPath is a query language for JSON. You enter a JMESPath expression in the JMESPath field when configuring your query config.
Selecting a field from an object:
# JSON: {"name": "Roberts", "age": 25, "profession": "teaching"}
name # → "Roberts"
Selecting nested data:
# JSON: {"skills": {"primary-skill": "Cyber Security", "secondary-skill": "Web Development"}}
skills.primary-skill # → "Cyber Security"
Selecting from an array:
# JSON: {"people": [{"firstName": "James"}, {"firstName": "Jacob"}, {"firstName": "Jayden"}]}
people[*].firstName # → ["James", "Jacob", "Jayden"]

For more expressions, see the official JMESPath documentation.
Output formats
When your API returns nested JSON, choose how API Bridge should flatten it into columns and rows.
Grid format — creates a new row for each nested item and copies the parent fields down. Use this when each nested object represents a separate record.


Flat format — creates a new column for each nested field. Use this when you want a single wide row with all fields spread across columns.


Pagination
API Bridge supports two pagination methods for APIs that split results across multiple pages.
Page parameter — specify the page parameter name and the start/end page numbers. API Bridge fetches all pages in sequence and combines the results. The parameter name varies by API (page, count, p, etc.) — check your API's documentation.


Offset-Limit — for APIs that use an offset and a limit per request:
- Offset — number of records to skip before selecting
- Limit — number of records to fetch per request
Specify the offset parameter name, starting offset value, limit parameter name, limit value, and the total number of records to fetch.

Dynamic Bearer Token
If your API uses short-lived bearer tokens that expire and require manual regeneration, use the Dynamic Bearer Token option. It automatically calls a token endpoint you specify before each data fetch, generates a fresh token, and uses it in the request — no manual updates needed.
How to set it up:
- In your data source, set Authorization to Dynamic Bearer Token
- Enter the Token Authentication URL — the suffix URL of your API's auth endpoint (e.g.
/auth/token) - Enter the Access token name — the field name in the auth response that contains the token (e.g.
access_token) - Add any required headers (e.g. an API key header)


TMR will call the auth endpoint automatically on each refresh and use the returned token to fetch your data.
Spreadsheet formulas in queries
In Google Sheets, you can use cell references inside your API Bridge Suffix URL or request body. This lets you drive query parameters dynamically from values in your spreadsheet — without editing the query config each time.
Wrap any cell reference with triple plus signs (+++) on both sides to tell TMR it's a formula, not part of the URL.
Single cell reference:
+++Sheet1!A2+++
For example, with this data in your sheet:

Setting the Suffix URL to /users/+++Sheet1!A3+++ fetches the user whose ID is in cell A3:


Cell references also work in the Body field for POST and PUT requests:

Cell range reference:
+++Sheet1!A3:A6+++
TMR makes one request per row in the range and combines the results. For example, with a range of values:

Setting /users?id=+++Sheet1!A3:A6+++ runs four requests, one per row:


Multiple columns:
/users?gender=+++Sheet1!D2:D5+++&status=+++Sheet1!E2:E5+++
TMR runs one request per row, combining values from both columns in each request.
Range references also work in the POST body:

+++Sheet1!A2+++ is correct; +++A2+++ is not.How to get API Bridge data into your reports
To pull API Bridge data into Google Sheets:
- In the TMR sidebar, go to Data Queries and click Add
- Select the accounts you want to analyze (can select multiple)
- Choose your metrics and dimensions from available options
- Select the date range for your analysis
- Configure sorting and filtering options as needed
- Click Run Query to populate the data into Google Sheets


To pull API Bridge data into Looker Studio:
- Click Open in Looker Studio, then click + Create Report.

- A query config panel will appear. Do one of the following:

Creating a new query config: Enter a name, select the accounts you want to include from the dropdown, then click Save.

- Choose Create report from scratch to build a custom report, or select one of the pre-built templates to get started quickly.

- In the Looker Studio connector panel, select your team and choose the required query config from the dropdown. Click Connect in the top-right corner.

- You'll land on the Looker Studio dashboard. Drag and drop the available API Bridge metrics and dimensions onto your canvas to start analyzing your data.
