# How to get TrueClicks data using the REST API

Following the instructions below, you can load TrueClicks data through REST API.

# Prerequisites

Before using the API, ensure you have a TrueClicks data connector key:

1. Log in to [TrueClicks](https://app.trueclicks.com/) and navigate to the *[Reporting](https://app.trueclicks.com/reporting)* page

2. Scroll down to the **Data Connector** section

3. Enter a key of your choice, and click the *Create New Key*

![](https://downloads.intercomcdn.com/i/o/luqxap7o/1418968872/580fcd62d0688653cdc49ff2df17/image.png?expires=1796069700&amp;signature=541e3f4a87a359c3d85dcdadd7e397463a8faa3695bc42c96af874dd7df5203f&amp;req=dSQmHsB4lYlYW%2FMW1HO4zUNKgXYA9W6qpEvUBF525ATkQzbnGohs9DqANBEE%0AE8j4Bk0TWvrPQvjSngU%3D%0A)

This process generates a **Username** and **Token**, which you’ll use later, for example, when integrating with Google Sheets, Looker Studio, or through REST API.

![](https://downloads.intercomcdn.com/i/o/luqxap7o/1418968868/678ac72f1e7916c603c92a7875f9/image.png?expires=1796069700&amp;signature=3a0c6103583c7aa0ebee41b210f4ea2d10b38460e764c3fdf013f3db0cdc9b26&amp;req=dSQmHsB4lYlZUfMW1HO4zcpuC4owgsnTMszLyPBtD69L1gfDr9OgExBAZhcM%0At%2FcWtvnr4y8haaOM3fU%3D%0A)

## Accessing data with the REST API

TrueClicks data is available through our REST API. Every endpoint is a standard HTTPS GET request that returns JSON, so you can pull data into a spreadsheet, a BI tool, or your own scripts.

**Example:**

- Url: <https://data.trueclicks.com/api/v3/audit-account-result>

- Steps:

  - Open the URL in your browser

  - Enter your **data connector username** and **token** (as the password) in the credentials pop-up

  - Retrieve account-level aggregated results for all your accounts in JSON format

## Available data sets in REST API

You can access the following datasets via REST API:

| **Data set**                           | **URL**                                                              | **Description**
​                                                                                                                                                                                                                                                                       |
| -------------------------------------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Accounts**                           | <https://data.trueclicks.com/api/v3/account>                         | The connected ad accounts in your environment, with their ID, name, and platform. Use the account ID here to filter the other endpoints.<br>*Optional parameters:* `accountIdsFilter`                                                                                                     |
| **Account-level results (current)**    | <https://data.trueclicks.com/api/v3/audit-account-result>            | The latest audit and monitoring results aggregated per account, including the TrueClicks score, issue counts, and audit findings.
​
*Optional parameters:* `accountIdsFilter`                                                                                                         |
| **Account-level results (historical)** | <https://data.trueclicks.com/api/v3/audit-account-result-historical> | The same account-level results, with weekly history going back up to 1 year.
​
*Optional parameters:* `accountIdsFilter`                                                                                                                                                              |
| **Check-level results (current)**      | <https://data.trueclicks.com/api/v3/audit-rule-result>               | The latest score or value for every individual audit and monitoring check, per account. Includes how much fixing each check would raise the account's TrueClicks score.
​<br>*Optional parameters:* `accountIdsFilter`                                                                  |
| **Check output table**                 | <https://data.trueclicks.com/api/v3/audit-rule-output-table>         | The detailed rows behind a single check for one account (the entities the check flagged). Get the ruleKey from the check-level results endpoint above.<br>*Required parameters:* `accountId, ruleKey`                                                                                     |
| **Performance monitoring alerts**      | <https://data.trueclicks.com/api/v3/perfmon-alert>                   | Currently triggered performance alerts. Each row is a metric that breached its threshold or fluctuation limit in the latest run of an active alert definition, with the current and previous values, the change, and the campaigns involved.<br>*Optional parameters:* `accountIdsFilter` |
| **Performance alert output table**     | <https://data.trueclicks.com/api/v3/perfmon-alert-output-table>      | The per-campaign metric rows behind a triggered performance alert. Get perfmonId and perfmonDefinitionMetricId from the performance monitoring alerts endpoint above.<br>*Required parameters:* `accountId, perfmonId, perfmonDefinitionMetricId`                                         |
| **Target and budget pacing (current)** | <https://data.trueclicks.com/api/v3/target-pacing>                   | Target and budget pacers that are currently running, with their pacing and efficiency status.<br>*Optional parameters:* `accountIdsFilter`                                                                                                                                                |
| **Target and budget pacing (all)**     | <https://data.trueclicks.com/api/v3/target-pacing-all>               | All target and budget pacers, including finished and future scheduled periods.<br>Optional parameters: `accountIdsFilter`                                                                                                                                                                 |
| **Users**                              | <https://data.trueclicks.com/api/v3/user>                            | Active users and pending invitations.                                                                                                                                                                                                                                                     |
| **Users' My Accounts**                 | <https://data.trueclicks.com/api/v3/user-my-accounts>                | One row per user for each account they've picked as a My Account. A personal preference list, not an access-permission list.<br>*Optional parameters:* `accountIdsFilter`                                                                                                                 |
| **Tasks**                              | <https://data.trueclicks.com/api/v3/task>                            | All target and budget pacers, including finished and future scheduled periods.<br>*Optional parameters:* accountIdsFilter                                                                                                                                                                 |
| **Account labels**                     | <https://data.trueclicks.com/api/v3/account-label>                   | The labels applied to your accounts, for grouping and filtering.<br>*Optional parameters:* `accountIdsFilter`                                                                                                                                                                             |

## Filtering results by account

Add *accountIdsFilter* to limit results to specific accounts. Repeat the parameter for each account you want, and leave it off to return all accounts you have access to.

**Example:**

- URL: <https://data.trueclicks.com/api/v3/audit-account-result?accountIdsFilter=111,222>

- Steps:

  1. Replace the `accountId=111,222` in the URL with your actual account IDs (visible in the TrueClicks interface URL)

  2. Open the updated URL in your browser

  3. If prompted, enter your **data connector username** and **token** as the credentials

  4. Retrieve the output table in JSON format for the specified account and check

## Check-level output table results

![](https://downloads.intercomcdn.com/i/o/luqxap7o/1418999960/52d0737c566997d019f7fb76783b/image.png?expires=1796069700&amp;signature=e66d5d26ea7b012c8d6b0d71c25a00ed3818015df1b40e5e7121ff303af86f3b&amp;req=dSQmHsB3lIhZWfMW1HO4zX%2B9Sef6q7xePWX0W6WC9HflBd2RZk0MnKeghYjq%0AX6lEbwQgQ%2BOCu6lezQQ%3D%0A)

Some checks have table outputs with extra detail rows. Use the check output table endpoint (audit-rule-output-table) to retrieve those.

**Example:**

- URL: <https://data.trueclicks.com/api/v3/rule-output-table?accountId=123&ruleKey=Error_UseOfBmm>

- Steps:

  1. Replace the `accountId=123` in the URL with your actual account ID (visible in the TrueClicks interface URL)

  2. Open the updated URL in your browser

  3. If prompted, enter your **data connector username** and **token** as the credentials

  4. Retrieve the output table in JSON format for the specified account and check

### Key Parameters:

- *accountId* - your account’s unique ID, found in the TrueClicks interface URL
​

  ![](https://downloads.intercomcdn.com/i/o/luqxap7o/1419005495/8c51496af7b0bae0593b00fd363f/image.png?expires=1796069700&amp;signature=7a4e74fb71168c5904d470855d8afe163099db1a9ba555e4b8ddb7fc427da00a&amp;req=dSQmH8l%2BmIVWXPMW1HO4zUArdJ0z6xn7Hoj3Rr1m%2BTivBMrhOmbee5yXjaXU%0AN5ap%0A)

- `ruleKey`: The internal key for TrueClicks checks

-  *ruleKey* parameter - there are 2 ways you can retrieve the internal key for TrueClicks checks:

  - Retrieve this from the REST API endpoint for check-level data (field: ruleKey).

  - Alternatively, convert the check name in the TrueClicks UI to camel-case format.
Example: `urgent-broken-asset-url` → `Urgent_BrokenAssetUrl`.
​

    ![](https://downloads.intercomcdn.com/i/o/luqxap7o/1419011271/89883b62c42f6b050b4cb2964b81/image.png?expires=1796069700&amp;signature=018eafb3f263261a4460e320a78307ca91b12f9c92d41edc1570deed9089a4c1&amp;req=dSQmH8l%2FnINYWPMW1HO4zenR6OIGYnJ4RC%2FkmLjYYxYA6Fs4sCXFil0HWqf0%0Ajfbq%0A)

# OpenAPI specification (for developers)

If you're building an integration, the full API is described in a machine-readable OpenAPI specification. It lists every endpoint, its parameters, and its response schemas, so you can import it into your API client or code generator instead of wiring requests up by hand.

Specification URL:

<https://data.trueclicks.com/swagger/api/swagger.json>

Import it into a tool like Postman or an OpenAPI code generator to scaffold requests automatically. Authenticate with your data connector username and token over HTTP Basic auth, the same credentials used for the endpoints above.