NAV Navbar
shell

Introduction

Welcome to the IGBlade API! You can use our API to access IGBlade API endpoints, which can get information on Instagram accounts in our database.

Authentication

The IGBlade API uses personal access tokens to allow access to the API. You can create an access token at the bottom of your settings page.

The API expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer YOUR_API_TOKEN

Accounts

Get profile

curl "https://igblade.com/api/v3/<platform>/accounts/<username>" \
     -H 'Authorization: Bearer YOUR_API_KEY_HERE'

The above command returns JSON structured like this:

{
  "id": 12,
  "parent_id": null,
  "ig_id": "173560420",
  "platform": "instagram",
  "name": "Cristiano Ronaldo",
  "username": "cristiano",
  "is_active": true,
  "is_restricted": false,
  "profile_picture": "https:\/\/instagram.fotp3-2.fna.fbcdn.net\/v\/t51.2885-19\/s320x320\/67310557_649773548849427_4130659181743046656_n.jpg?_nc_ht=instagram.fotp3-2.fna.fbcdn.net&_nc_ohc=QvYXTsQ8RGkAX-XGQSZ&edm=AAWvnRQBAAAA&ccb=7-4&oh=b5653b1336995f6db79eb14dd8793433&oe=61072463&_nc_sid=e7738c",
  "created_at": "2018-04-19 22:39:48",
  "updated_at": "2021-07-28 08:41:13",
  "locked_at": null,
  "last_stat_at": "2021-07-28 08:41:13",
  "last_stat_id": 20521972,
  "is_private": false,
  "is_verified": true,
  "is_business": false,
  "is_really_business": false,
  "biography": "",
  "external_url": "http:\/\/www.cristianoronaldo.com\/",
  "follower_count": 319420951,
  "following_count": 475,
  "media_count": 3109,
  "engagement_rate": 0.0243,
  "total_like_count": null,
  "digg_count": null,
  "niches_extracted_at": "2021-04-02 07:58:40",
  "is_viewer_favorite": false,
  "is_viewer_subscribed_to_reports": false,
  "is_over_quota": false,
  "likes_and_comments": 0,
  "profile_picture_cached": "https:\/\/cdn.igblade.com\/platform-cache\/accounts\/12\/profile-picture.jpg",
  "is_eligible_for_stat_update": false,
  "platform_title": "Instagram",
  "former_accounts": [],
  "current_account": null
}

This endpoint retrieves basic information about a social media account.

HTTP Request

GET https://igblade.com/api/v3/<platform>/accounts/<username>

URL Parameters

Parameter Description
platform The social media platform. Can be either "tiktok" or "instagram".
username The unique username of the account you want to fetch

Get historical stats

curl "https://igblade.com/api/v3/<platform>/accounts/<username>/stats" \
     -H 'Authorization: Bearer YOUR_API_KEY_HERE'

The above command returns JSON structured like this:

[
  {
    "account_id": 12,
    "follower_count": 319420951,
    "following_count": 475,
    "media_count": 3109,
    "engagement_rate": 0.0243,
    "created_at": "2021-07-28 00:00:00",
    "total_like_count": null,
    "digg_count": null,
    "date": "2021-07-28T00:00:00.000000Z",
    "likes_and_comments": 7761929.1093
  },
  ...
]

This endpoint retrieves the historical follower count, following count, media count and engagement rate for a social media account.

Please note that we may not have complete data for all accounts, since only favorited accounts are updated on a daily basis.

HTTP Request

GET https://igblade.com/api/v3/<platform>/accounts/<username>/stats

URL Parameters

Parameter Description
platform The social media platform. Can be either "tiktok" or "instagram".
username The unique username of the account you want to fetch

Query Parameters

Parameter Description
start Start date of query (optional).
end End date of query (optional).

Get posts

curl "https://igblade.com/api/v3/<platform>/accounts/<username>/posts" \
     -H 'Authorization: Bearer YOUR_API_KEY_HERE'

The above command returns JSON structured like this:

{
  "current_page": 1,
  "data": [
    {
      "id": "2624828983265209197",
      "account_id": 12,
      "shortcode": "CRtRA2nrCtt",
      "type": 0,
      "caption": "Work done \ud83d\udcaa\ud83c\udffd",
      "posted_at": "2021-07-24 10:53:40",
      "thumbnail_src": "https:\/\/instagram.fotp3-2.fna.fbcdn.net\/v\/t51.2885-15\/sh0.08\/e35\/s640x640\/222593884_377126617177723_95688592978269331_n.jpg?_nc_ht=instagram.fotp3-2.fna.fbcdn.net&_nc_cat=1&_nc_ohc=GwLAi-nBoc4AX8P8UAL&edm=AAWvnRQBAAAA&ccb=7-4&oh=97260cab79a17aac2890405d1f5d80fa&oe=61080B5E&_nc_sid=e7738c",
      "like_count": 9111071,
      "comment_count": 72370,
      "view_count": null,
      "created_at": "2021-07-24 12:59:14",
      "updated_at": "2021-07-28 08:41:14",
      "share_count": null,
      "thumbnail_cached_src": "https:\/\/cdn.igblade.com\/platform-cache\/accounts\/12\/posts\/2624828983265209197.jpg",
      "raw_hashtags": []
    },
    ...
  ],
  "first_page_url": "https:\/\/igblade.com\/api\/v3\/instagram\/accounts\/cristiano\/posts?page=1",
  "from": 1,
  "last_page": 7,
  "last_page_url": "https:\/\/igblade.com\/api\/v3\/instagram\/accounts\/cristiano\/posts?page=7",
  "next_page_url": "https:\/\/igblade.com\/api\/v3\/instagram\/accounts\/cristiano\/posts?page=2",
  "path": "https:\/\/igblade.com\/api\/v3\/instagram\/accounts\/cristiano\/posts",
  "per_page": 18,
  "prev_page_url": null,
  "to": 18,
  "total": 113
}

This endpoint lists an account's posts in reverse chronological order.

HTTP Request

GET https://igblade.com/api/v3/<platform>/accounts/<username>/posts

URL Parameters

Parameter Description
platform The social media platform. Can be either "tiktok" or "instagram".
username The unique username of the account you want to fetch

Query Parameters

Parameter Description
start Start date of query (optional).
end End date of query (optional).

Alarms

Endpoint documentation coming soon.

PDF reports

Endpoint documentation coming soon.

Clients

Endpoint documentation coming soon.

Campaigns

Endpoint documentation coming soon.

Team

Endpoint documentation coming soon.

Pagination

Some of our endpoints return a large amount of data, so they must be paginated.

When an endpoint is paginated, all responses will look like the one on the right.

{
  "current_page": <current page number>,
  "data": [
    ...,
    list items,
    ...,
  ],
  "last_page": <number of the last page>,
  "per_page": <number of items per page>,
  "total": <total number of items across all pages>
}

To go to the next page, simply add a query parameter named page setting the value to the desired page number. To get the number of the next page: current_page + 1 To check if you are on the last page: current_page === last_page

Errors

The IGBlade API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access an endpoint with an invalid method.
422 Invalid request data -- The data you passed with the request was invalid.
429 Too Many Requests -- You're making requests too fast! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.