Skip to main content
GET
/
ad_reports
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const adReport = await client.adReports.retrieve({
  from: '2023-12-01T05:00:00.401Z',
  to: '2023-12-01T05:00:00.401Z',
});

console.log(adReport.daily);
{
  "summary": {
    "clicks": 42,
    "impressions": 42,
    "reach": 42,
    "spend": 6.9,
    "spend_currency": "usd",
    "ctr": 6.9,
    "cpc": 6.9,
    "cpm": 6.9,
    "frequency": 6.9,
    "result_count": 42,
    "result_label_key": "app_installs",
    "result_label_override": "<string>",
    "cost_per_result": 6.9,
    "roas": 6.9
  },
  "daily": [
    {
      "stat_date": "2023-12-01T05:00:00.401Z",
      "spend": 6.9,
      "spend_currency": "usd",
      "impressions": 42,
      "clicks": 42,
      "reach": 42,
      "result_count": 42,
      "result_label_key": "app_installs",
      "result_label_override": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.whop.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

Query Parameters

ad_campaign_id
string | null

The unique identifier of an ad campaign. Mutually exclusive with adGroupId and adId.

ad_group_id
string | null

The unique identifier of an ad group. Mutually exclusive with adCampaignId and adId.

ad_id
string | null

The unique identifier of an ad. Mutually exclusive with adCampaignId and adGroupId.

currency
string | null

ISO 4217 currency code to report spend in. Defaults to the company's ads reporting currency.

from
string<date-time>
required

Inclusive start of the reporting window.

Example:

"2023-12-01T05:00:00.401Z"

include_daily
boolean | null

When true, includes a per-day breakdown alongside the summary.

to
string<date-time>
required

Inclusive end of the reporting window.

Example:

"2023-12-01T05:00:00.401Z"

Response

A successful response

An ads performance report. Returns a summary; daily breakdown is included when includeDaily is true.

summary
object
required

Aggregate totals and rates over the date range.

daily
object[] | null
required

Per-day breakdown over the date range, ordered ascending. Null when includeDaily is false.