Using the API Request Count API, you can fetch the pending requests available for your account.

Root
/e
Route
/e/requests
Request Type
GET
Request Headers
Header Value Required
secret-key <YOUR_SECRET_KEY> Yes
secret-key

You'll need to pass a secret-key in the header to fetch the pending API Request count.

Basic Code Samples
curl --header "secret-key: <SECRET_KEY>" \
       --request GET \
       https://api.jsonbin.io/e/requests
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
    console.log(req.responseText);
  }
};

req.open("GET", "https://api.jsonbin.io/e/requests", true);
req.setRequestHeader("secret-key", "<SECRET_KEY>");
req.send();
import requests
url = 'https://api.jsonbin.io/e/requests'
headers = {'secret-key': '<SECRET_KEY>'}

req = requests.get(url, json=nil, headers=headers)
print(req.text)
require 'net/http'

uri = URI("https://api.jsonbin.io/e/requests")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  req = Net::HTTP::Get.new(uri)
  req['secret-key'] = '<SECRET_KEY>'

  http.request(req)
end

puts res.body
Request Response
Success
200
{
  "count": 9999
}
Error
401
{
  "message": "<ERROR_MESSAGE>",
  "success": false
}
Status Code Error Message
401 Unauthorized
Need to provide a secret-key to fetch Pending Requests Count

Fix: While fetching pending requests, you need to pass secret-key header.

401 Unauthorized
Invalid secret key provided.

Fix: Ensure that you are passing a valid secret-key in the headers.