Announcing the new /usage API Endpoint

Last updated on January 02, 2025

< Back to Blogs

New API Endpoint: usage

We are excited to introduce a new feature to MetalPriceAPI:  the /usage endpoint. This new addition is designed to help you easily monitor your API usage and manage your monthly quota effectively.

What is the /usage Endpoint?

The /usage endpoint provides a simple and efficient way to check your API usage statistics for the current month. With this endpoint, you can track how many requests you've made, how many you have left, and understand your current plan's limits. There is no increment to your quota by calling this endpoint.

How to Use the /usage Endpoint

To access your usage data, make a GET request to the following URL:

https://api.metalpriceapi.com/v1/usage?api_key=[API_KEY]

Request Parameters

  • api_key: [Required] Your unique API key. Ensure you replace [API_KEY] with your actual key to authenticate your request.

Example API Response

Upon a successful request, you will receive a response in JSON format, detailing your current usage statistics:

{
  "success": true,
  "result": {
    "plan": "Business",
    "used": 12,
    "total": 100,
    "remaining": 88
  }
}

Response Attributes

  • success: Indicates whether the API request was successful. If false, please refer to our API Errors documentation for troubleshooting.
  • plan: Displays your current subscription plan.
  • used: Shows the number of requests you have used this month.
  • total: Indicates your total request quota for the month.
  • remaining: Tells you how many requests you have left for the month.

Why Use the /usage Endpoint?

Monitoring your API usage is crucial for optimizing your operations and ensuring you stay within your plan's limits. The /usage endpoint provides real-time insights into your API consumption, helping you plan and adjust your usage as needed.

Get Started Today

To start using the /usage endpoint, simply include your API key in the request URL and retrieve your usage data instantly. For more details on managing your API key and understanding your plan, visit our API documentation.

We hope this new feature enhances your experience with MetalPriceAPI. As always, we are here to support you. If you have any questions or need assistance, please contact our support team.