Using the Analytics API
This page walks through the process of fetching data from the Analytics API as a Hootsuite customer, looking to ingest their data into an ETL pipeline.
Create a new appβ
To access Hootsuite APIs, an app must be used. An app developer can install and use their own app without review; thus, for single-customer integrations, it is strongly recommended to create your app under the Hootsuite member account with which you will access the API.
- Sign-in to Hootsuite as the appropriate member, and then navigate to the Hootsuite Dev Portal. If this is the first time the member account has accessed this page, a developer review will be required.
- Create a new app. This app will only be visible to this member account.
- In the Security section, under the Rest API tab, enable βοΈ the
analytics:readscope, and click Save.

- Copy the Client ID and Client secret values from the Rest API tab, these will be needed in the next section.
- Return to the Hootsuite App Directory , search for your app, and Install it.

- Navigate to your Developer Profile , and copy your Member ID for the next section.
Authenticationβ
For single-customer use, the member_app grant is the simplest authentication method to use. It requires the member to have the app installed.
Your app will make a request equivalent to this curl request to obtain an access_token. The Authorization header is created using your apps' Client ID and Client Secret as the username/password for Basic authorization. The member_id parameter is the Member ID value obtained previously.
curl --location 'https://platform.hootsuite.com/oauth2/token' \
--header 'Authorization: Basic β«οΈβ«οΈβ«οΈβ«οΈβ«οΈ' \
--form 'grant_type="member_app"' \
--form 'member_id="π΅π΅π΅π΅π΅"' \
--form 'scope="analytics:read"'
Save the access_token in the response for the next step. Note that this token will expire in 1 hour, so you will need to obtain a new token periodically.
Social Profilesβ
The Analytics API requires a list of Social Profile IDs to query data on.
The list of social profiles available to the access_token can be fetched via the Retrieve social profiles API. Bucket the profile IDs by network type. Not all network types are currently supported by the analytics API, the accepted types are documented here.
The API further only allows 10 social profile IDs to be provided at a time. If more than 10 IDs need to be requested, these will need to be processed in batches of 10.
If fetching data for multiple organizations, the profile IDs can be correlated with the organization by first fetching the list of organizations available to the user via theRetrieve authenticated member's organizations API , and then the Social Profile IDs belonging to each organization via the Retrieve org memberβs social profiles API.
Post and Profile Dataβ
To retrieve social posts and their associated metrics, use the List Posts Analytics API . To retrieve daily social profile metrics, use the List Profile Analytics API .
The networks to request data for must be specified sequentially in both cases, see the Networks Reference. The returned metrics are described in the Metrics Reference.
Limitations:
- At most 10 Social Profile IDs may be provided in a single call. If requesting data for more than 10 Social Profiles, you must make requests in batches.
- Not all Social Profile types returned via the Retrieve social profiles API are supported for analytics requests.
- Only data up to 2 years prior may be requested.
- At most 100 results may be returned per call to the API, configurable via the
limitparameter. A pagination cursor will be returned if more results are available.
Ad model Terminologyβ
Below is our unified ads model and compared to Facebook/Meta and Twitter/X.
| Unified Model | Facebook/Meta | Twitter/X |
|---|---|---|
| Campaign | Campaign | Campaign |
| Ad Set | Ad Set | Ad Group |
| Ad | Ad | Ad |
In API paths, collections are named campaigns, adsets, and ads.
Ad accountsβ
Paid analytics APIs are scoped to ad accounts, not organic social profiles.
Each request must include filters.adAccounts: an array of up to 10 entries. Each entry must include:
adAccountIdβ Hootsuite ad account ID from Retrieve ad accountsorganizationIdβ organization that owns that ad account
Group accounts by organizationId when building batches. If you need more than 10 ad accounts, split work into multiple requests (batches of 10).
Supported networks for paid analytics are selected with the adAccountType query parameter: FACEBOOK or TWITTER. Set datatype to PAID.
Campaigns, ad sets, and adsβ
Entity metadataβ
Use List Paid:
POST /v1/analytics/paid/{adEntityCollection}
Set {adEntityCollection} to campaigns, adsets, or ads.
- Query:
adaccountType,datatype=PAID, optionallimit(default 10, maximum 100), optionalcursor - Body:
filterswith requiredadAccounts; optionalreportingPeriodandlastModified(each uses atimespanwithsince/untildates, inclusive)
Daily metricsβ
Use List Paid metrics:
POST /v1/analytics/paid/{adEntityCollection}/metrics
Same path values, query parameters, and filter shape as the entity list API. Responses contain daily metric rows for the selected collection level.
Limitations:
- Twitter/X (legal): Entity payloads for Twitter/X are restricted. Responses emphasize platform-native identifiers (
externalCampaignId,externalAdsetId,externalAdId,externalAdAccountId, etc.). Do not expect the same descriptive fields (names, objectives, status, and similar) that Facebook returns. - Ad accounts per request: At most 10 objects in
filters.adAccounts. Use batched requests for larger sets. - History: The start of
reportingPeriod(andlastModified, when used) cannot be more than two years in the past. IfreportingPeriodis omitted, the default range starts one year ago through now. - Page size: At most 100 records per response, via
limit. When more data exists,metadata.collectionInfo.next(andprev) provide cursor values for the next request; pass the cursor as thecursorquery parameter and omit other pagination parameters as documented for cursor-based calls.