Temporarily unavailable

We are restoring this capability. Until then calls usually fail or return no results; failed calls and empty results are not charged.

POST

API health

24h health
Temporarily unavailable
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Temporarily unavailable

Last 24 hours

Last 30 days

Work out an Instagram account's engagement from its latest posts, by username. posts (3 to 60; the default is 24) sets how many of the latest posts to count, pinned posts included. One object comes back: follower_count, sample_size, period_start and period_end, posts_per_week, average and median likes and interactions (likes plus comments), average comments and views, engagement_rate in percent, media_mix, post counts by hour and by weekday in UTC, and the 3 posts with the most interactions in top_posts. A post whose author hid the like count counts as 0 likes. It describes a recent sample, not the account's whole history.

Send POST https://api.everyinfra.com/api/v1/social with platform set to instagram and action set to engagement. Price $0.56 per 1,000 requests ($0.000556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

#
Please help me write a data collection script with the EveryInfra Instagram Engagement statistics endpoint (instagram/engagement).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to instagram and action to engagement, and put the parameters inside params.
- Required parameters:
  - username: Identifies an Instagram account handle without the @ symbol or as a full profile URL. Used by profile, persona, user_posts, and reels to fetch account data, and by engagement to work out one account's engagement.
- Optional parameters:
  - posts: How many of the account's latest posts engagement counts: an integer from 3 to 60, 24 if left out. Pinned posts are counted; the latest are taken by post time.
- Returns one object. Main fields: username, display_name, url, follower_count, is_verified, sample_size ((engagement) Number of posts actually c…), period_start ((engagement) Publish time of the earlie…), period_end ((engagement) Publish time of the latest…), posts_per_week ((engagement) Average number of posts pe…), avg_like_count ((engagement) Average likes per post), avg_comment_count ((engagement) Average comments per post), avg_view_count ((engagement) Average views per post); 21 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=instagram.
- Example request body:
{
  "platform": "instagram",
  "action": "engagement",
  "params": {
    "username": "nasa"
  }
}
- Price: $0.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesinstagramPlatform identifier, fixed value.
actionbodystringYesengagementCapability identifier, fixed value.
usernamebody.paramsstringYes-Identifies an Instagram account handle without the @ symbol or as a full profile URL. Used by profile, persona, user_posts, and reels to fetch account data, and by engagement to work out one account's engagement. The followers action returns only total follower counts, whereas followers_list and following_list return account lists.
postsbody.paramsintegerNo-How many of the account's latest posts engagement counts: an integer from 3 to 60, 24 if left out. Pinned posts are counted; the latest are taken by post time.

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "instagram",
  "action": "engagement",
  "params": {
    "username": "nasa"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

#
No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.
json
{  "id": "req_…",  "platform": "instagram",  "action": "engagement",  "results": {    "username": …,    "display_name": …,    "url": …,    "follower_count": …,    "is_verified": …,    "sample_size": …,    "period_start": …,    "period_end": …,    "posts_per_week": …,    "avg_like_count": …,    "avg_comment_count": …,    "avg_view_count": …,    "median_like_count": …,    "avg_interactions": …,    "median_interactions": …,    "engagement_rate": …,    "media_mix": …,    "posts_by_hour_utc": …,    "top_hours_utc": …,    "posts_by_weekday_utc": …,    "top_posts": …,    "platform": …  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.

FieldMeaning
usernameUsername (@handle).
display_nameDisplay name; can differ from username.
urlLink to the record on the platform.
follower_countFollowers. null means not disclosed, not 0.
is_verifiedWhether the platform verified the account. null means it cannot be determined.
sample_size(engagement) Number of posts actually counted.
period_start(engagement) Publish time of the earliest counted post, ISO 8601, UTC.
period_end(engagement) Publish time of the latest counted post, ISO 8601, UTC.
posts_per_week(engagement) Average number of posts per week over this period.
avg_like_count(engagement) Average likes per post. Posts whose author hid the like count count as 0.
avg_comment_count(engagement) Average comments per post.
avg_view_count(engagement) Average views per post; image posts have no view count.
median_like_count(engagement) Median likes per post.
avg_interactions(engagement) Average interactions per post (likes + comments).
median_interactions(engagement) Median interactions per post (likes + comments).
engagement_rate(engagement) Engagement rate in %: average interactions per post ÷ follower_count × 100. 0.0118 means 0.0118%.
media_mix(engagement) Number of posts of each type, as an object: image, carousel, reel (Reels).
posts_by_hour_utc(engagement) Number of posts by hour of posting (UTC): 24 numbers, the first is for hour 0.
top_hours_utc(engagement) The hours (0 to 23, UTC) with the most posts, most first.
posts_by_weekday_utc(engagement) Number of posts by day of the week (UTC): 7 numbers, in the order Sunday, Monday, ... Saturday.
top_posts(engagement) The 3 posts with the most interactions; each has url, text (the first 140 characters of the caption), posted_at, interactions (likes + comments), like_count, comment_count and view_count (absent for image posts).
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

Google Analytics needs consent. Privacy