Usage Count API

Quickstart

cURL
curl --location 'https://keywordresearch.api.kwrds.ai/usage_count' --header 'X-API-KEY: YOUR_API_KEY_GOES_HERE'

To increase your API limits, please choose your plan right from our pricing page.

Introduction

The Usage Count API allows you to monitor your API usage across different categories, including keyword searches, PAA searches, and SERP searches. This endpoint helps you keep track of your request limits and ensures that you are staying within your allocated usage. The Usage Count API provides a breakdown of the number of requests you've made to various endpoints within the kwrds.ai API. This information is crucial for managing your API usage effectively and avoiding rate limit issues.

Endpoint

GET /usage_count

This endpoint retrieves the current count of requests made to different API categories.

Example Request

Here’s an example of how to use the Usage Count API with curl:

cURL
curl --location 'https://keywordresearch.api.kwrds.ai/usage_count'
--header 'X-API-KEY: YOUR_API_KEY_GOES_HERE'

Query Parameters

  • X-API-KEY: (Required) Your API key for authentication. Replace YOUR_API_KEY_GOES_HERE with your actual API key.

Example Response

The API returns a JSON object containing the counts of requests made to each API category. Here’s an example response:

JSON
{
"keyword_search_count": 100,
"paa_search_count": 550,
"serp_search_count": 419,
"serp_search_detailed_count": 202
}

Response Structure

  • keyword_search_count: The number of requests made to the Keyword Research API.
  • paa_search_count: The number of requests made to the People Also Ask (PAA) API.
  • serp_search_count: The number of requests made to the SERP API.
  • serp_search_detailed_count: The number of requests made to the SERP Detailed API.

Use Cases

The Usage Count API can be used in various ways:

  1. Monitor API Usage: Keep track of how many requests you’ve made to each endpoint to ensure you don’t exceed your API usage limits.
  2. Usage Analysis: Analyze your API usage patterns to optimize how and when you make requests.
  3. Budgeting: Use the counts to manage and allocate API usage effectively, especially if you are working with limited quotas.

Best Practices

  • Regular Monitoring: Regularly check your usage counts to stay informed about your API consumption.
  • API Key Management: Keep your API key secure and do not expose it in public repositories.
  • Usage Optimization: If you notice high usage in certain areas, consider optimizing your API calls or caching results to reduce unnecessary requests.

Error Handling

The Keyword Research API returns standard HTTP status codes:

  • 200 OK: The request was successful, and the data is returned in the response.
  • 400 Bad Request: The request was invalid or malformed. Check your request body and parameters.
  • 401 Unauthorized: The API key is missing or invalid. Ensure that your X-API-KEY header is correct.
  • 5XX Internal Server Error: An error occurred on the server. Retry the request or contact support if the issue persists.

Next Steps

Now that you're familiar with the Usage Count API, you can start integrating it into your monitoring and management systems. For further details, explore the full kwrds.ai documentation or reach out to hello@kwrds.ai for support.