# Credit Usage

You can see your overall usage, the total credits used in the current monthly cycle as well as your current concurrency usage in the ‘Monitoring & Stats’ part of your [Dashboard](https://dashboard.scraperapi.com/). For more detailed information, you can download a domain report by clicking the small download button in the top right corner of the ‘Monitoring & Stats’ window.

The domain report includes which domains were scraped on which date, the parameters used and the credit consumption per domain per date. It also includes the number of canceled and failed requests on each scraping date.

If you would like to monitor your account usage and limits programmatically (how many concurrent requests you’re using, how many requests you’ve made, etc.) you can make a call to the /account endpoint, which will return usage data in JSON format.

{% tabs %}
{% tab title="cURL" %}

```bash
curl "http://api.scraperapi.com/account?api_key=API_KEY"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
payload = {'api_key': 'APIKEY'}
r = requests.get('http://api.scraperapi.com/account', params=payload)
print(r.text)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import fetch from 'node-fetch';

fetch('http://api.scraperapi.com/account?api_key=API_KEY')
  .then(res => res.text())
  .then(body => {
    console.log(body);
  })
  .catch(err => {
    console.error(err);
  });
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

// Replace the value for api_key with your actual API Key
$url = "https://api.scraperapi.com/account?api_key=API_KEY";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'Curl error: ' . curl_error($ch);
} else {
    print_r($response);
}

curl_close($ch);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'

# Replace the value for api_key with your actual API Key
params = {
  api_key: "API_KEY"
}

uri = URI('https://api.scraperapi.com/account')
uri.query = URI.encode_www_form(params)

account_info = Net::HTTP.get(uri)
puts account_info
```

{% endtab %}

{% tab title="Java" %}

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        // Replace the value for api_key with your actual API Key
        String apiKey = "API_KEY";

        String scraperApiUrl =
                "https://api.scraperapi.com/account?api_key=" + apiKey;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(scraperApiUrl))
                .GET()
                .build();

        HttpResponse<String> response =
                client.send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="success" %}
**Note:** the `requestCount` and `failedRequestCount` numbers only refresh once every 15 seconds, while the `concurrentRequests` number is available in real-time.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scraperapi.com/account-management/credit-usage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
