- About the IPQS APIs
- Proxy & VPN Detection API
- Email Verification API
- Phone Number Validation API
- Malicious URL Scanner API
- Device Fingerprint API
- Mobile Device Fingerprinting SDK
- Gaming Fraud Detection SDK
- Dark Web Leak API
- Malware File Scanner API
- Request List API
- Fraud Reporting API
- Account Management APIs
- Bulk Validation CSV
- Allowlist Blocklist APIs
- Plugins Platforms Integrations
- IP Reputation Database
- IP Address Abuse Feed
- Email Verification Database
-
Custom Integrations
- Getting Started
- Authentication
- Refresh Secret
- IP & Proxy Checks
- Email Verification Checks
- Phone Number Validity Checks
- Device Tracker
- List Device Trackers
- Device Tracker Statistics
- Login Tokens
- Overview Statistics
- Recent Proxy Statistics
- Recent Email Statistics
- Fraud Reporting
- Retrieve Requests by ID
- Country List API Documentation
- Release Notes
Credit Usage API
Rate this article:
Select all that apply:
Email:
About the Credit Usage API
You can use the Credit Usage API to access your account's total number of available credits and current usage for this billing period. This data can help you track your usage patterns and make informed decisions about credit usage.
API Request URLs
JSON
https://www.ipqualityscore.com/api/json/account/YOUR_API_KEY_HERE
XML
https://www.ipqualityscore.com/api/xml/account/YOUR_API_KEY_HERE
Example Response
This is an example success response in JSON format. Responses are also available in XML format.
{
"success":true,
"message":"Success",
"credits":3004522,
"usage":478,
"proxy_usage":6,
"email_usage":472,
"mobile_sdk_usage": 22,
"phone_usage": 1231,
"url_usage": 211,
"fingerprint_usage":0,
"request_id":"3ift1XN"
}
// You API Key.
$key = 'YOUR_API_KEY_HERE';
// Base URL
$url = 'https://www.ipqualityscore.com/api/json/account/%s';
// Finish assembling the URL and make the request.
$json = file_get_contents(sprintf($url, $key));
// Decode json and print the number of available credits.
$result = json_decode($json, true);
if(isset($result['success']) && $result['success'] === true){
echo "Available credits: ".$result['credits'];
} else {
echo $result['message'];
}
import json
import requests
# You may need to install Requests pip
# python -m pip install requests
class IPQS:
key = "YOUR_API_KEY_HERE"
def usage_api(self)->dict:
url = 'https://www.ipqualityscore.com/api/json/account/%s' % (self.key)
x = requests.get(url)
return (json.loads(x.text))
if __name__ == "__main__":
result = (IPQS()).usage_api()
if 'success' in result and result['success'] == True:
print('Available credits: %s' %(result['credits']))
else:
print(result['message'])