Articles on: FAQ

API: How to Use It — Step-by-Step Guide

API Testing in Postman
To run the test, use the collection:
Postman Collection for API

Usage Instructions:

Follow the link to the collection:
Postman

Import the collection into Postman.

Use your token from:
API → Access Tokens

Insert the token in Postman
Post create


Get show



To test the functionality, you can enter any demo account in the Dashboard section, so that the service doesn’t deduct report credits from your balance.
https://trendhero.io/app/dashboardDemo reports (at the very bottom of the page)

To begin, you need to request/create a report (POST create).
Make sure to use the following link:
https://api.trendhero.io/api/public/v1/reports?username=davidrobsonyoga
After the = sign, enter the desired influencer’s username.

Once you send the request, the Body section will display partial information about the influencer, which will update progressively as new data is retrieved.


To check the report status, search for status.
You’ll get two results — pay attention to the first one.
As shown in the screenshot:
status — collecting

Other possible statuses include:

recollecting — the service is generating the report again

ready — the report is ready

impossible — the account is private or the report couldn’t be generated

After sending the report request in Post create, be sure to save the "pk" field value.
This is the account_pk — the unique Instagram ID of the account.


Our service identifies the account using this parameter ( pk / account_pk).
This is important so that when receiving a callback, you’ll know which account the notification is related to.

"account_pk": 72018706099 / "pk": 72018706099 = "username": "model.gen.mgmt"


P.S. If you send a request and receive the message:
"error": "You already have the latest version"


It means the report was previously requested.
In that case, simply go to the GET Show section to retrieve the ready report.

What happens after you send a report request?

Once you request the report, the service needs some time to generate it.
The speed depends on the account size and how up-to-date the data is:

If the report is already in the database, it will be generated instantly.

If the account hasn’t been checked before or was checked a long time ago, and has a large audience (e.g., 1 million followers), the analysis can take 2 to 4 hours.

For smaller accounts (under 10,000 followers), the report is typically generated within 30–60 minutes.

How do you know the report is ready?

Once the report is generated, the service will send you a callback.
To receive callback notifications, go to the
API – Access Tokens section and specify your Webhook URL — the address where you want to receive notifications.



Sample callback you’ll receive from the service:

{
  "report_type": "overall_report",
  "notification_type": "report_ready",
  "account_pk": 209749858,
  "version": "1601367830"
}


Explanation:
account_pk — the unique Instagram account identifier (Instagram ID).

Get Show Section

To get report data, use the following link:
https://api.trendhero.io/api/public/v1/reports/davidrobsonyoga
Replace davidrobsonyoga with the influencer’s username after the last /

Here’s what report data looks like.
The number of rows depends on the account and how long it’s been in the database.
For large, long-standing accounts, there can be up to 20,000 rows.



Common Cases & Errors



Get Show Section

"error": "Wrong token"

"error": "Wrong token"




You’ve entered your token incorrectly.
Go to API – Access Tokens,
check whether you copied and pasted the token correctly.

The Body section contains too little information (e.g., only up to 1000 rows).
Report status — preview.
You didn’t request this report via Post create.


Open the Post create section and first send a request to generate a report for the desired account.

Updated on: 13/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!