Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8440951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:26:20+00:00 2026-06-10T08:26:20+00:00

According to Instagram you can check API limit count remaining using the HTTP headers

  • 0

According to Instagram you can check API limit count remaining using the HTTP headers that they supply with the call. I am quite new to this and am unable to find relevant data on how to access this information with PHP. Could anyone please clarify this for me?

I found the following from the Instagram API developers forum on Google Groups:

“We just rolled this out to production; all API calls now have the
additional HTTP headers:

  • X-Ratelimit-Limit (total # of possible calls per hour)
  • X-Ratelimit-Remaining (how many calls are left for this particular token or client ID)”
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:26:22+00:00Added an answer on June 10, 2026 at 8:26 am

    If you’re using file_get_contents to make the request (or anything that uses the HTTP wrapper for that matter), the special variable $http_response_header contains an array of lines with the HTTP response headers of the most recent request.

    Maybe something like this:

    // Make your API request here
    ...
    file_get_contents('http://example.com', false, $context);
    
    // Check HTTP response headers
    foreach ($http_response_header as $line) {
        if(preg_match('!X-Ratelimit-Remaining: ([0-9]+)!i', $line, $matches)) {
            $remaining = $matches[1];
            break;
        }
    }
    
    // Do something based on the number of remaining attempts
    echo "Remaining attempts: $remaining";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to http://www.bennadel.com/blog/1892-You-Cannot-Bind-The-Submit-Event-To-Objects-Using-jQuery.htm It is a bug: I am pretty sure this is a
According to this SO post: How to check the TEMPLATE_DEBUG flag in a django
According MSDN, FxCop is an application that analyzes managed code assemblies (code that targets
According to Hibernate documentation : After observing that arrays cannot be lazy , you
According to this post in Recursive Descent vs. LALR , any LALR(k) can be
According to docs at http://code.google.com/p/minify/wiki/UriRewriting $min_serveOptions['rewriteCssUris'] = false; I should be able to add
According to what I've heard, integer values that are not the processor's word size
According to the PHP Documentation PDO::prepare() adds quotes to all your parameters so that
According to the HttpListener reference , a call to HttpListener.GetContext will block until it
Recently Facebook has deprecated 'offline_access'. But, I find that Instagram app for Android still

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.