Sites

Get Site Usage

Returns this month's billable event count for a site and its organization, with month-end projections.

GET /api/sites/:site/usage

Returns the number of billable events the site and its whole organization have recorded since the start of the current calendar month, the organization's monthly event limit, and a month-end projection at the current rate.

Billable events are pageview, custom_event, performance, outbound, button_click, copy, form_submit and input_change. Errors are not counted.

Permissions: the viewer role or above on the site. API keys need the sites:read scope.

Path Parameters

Prop

Type

Response

Prop

Type

Request
curl -X GET "https://app.rybbit.io/api/sites/123/usage" \
  -H "Authorization: Bearer your_api_key_here"
Request
const response = await fetch(
  'https://app.rybbit.io/api/sites/123/usage',
  {
    headers: {
      'Authorization': 'Bearer your_api_key_here'
    }
  }
);

const data = await response.json();
Request
import requests

response = requests.get(
    'https://app.rybbit.io/api/sites/123/usage',
    headers={
        'Authorization': 'Bearer your_api_key_here'
    }
)

data = response.json()
Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/123/usage');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer your_api_key_here'
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
Request
require 'net/http'
require 'json'

uri = URI('https://app.rybbit.io/api/sites/123/usage')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer your_api_key_here'

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
Request
req, _ := http.NewRequest("GET", "https://app.rybbit.io/api/sites/123/usage", nil)
req.Header.Set("Authorization", "Bearer your_api_key_here")

client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()

var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
Request
let client = reqwest::Client::new();
let res = client
    .get("https://app.rybbit.io/api/sites/123/usage")
    .header("Authorization", "Bearer your_api_key_here")
    .send()
    .await?;

let data: serde_json::Value = res.json().await?;
Request
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.rybbit.io/api/sites/123/usage"))
    .header("Authorization", "Bearer your_api_key_here")
    .GET()
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
Request
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");

var response = await client.GetAsync("https://app.rybbit.io/api/sites/123/usage");
var data = await response.Content.ReadAsStringAsync();
Response
{
  "periodStart": "2026-10-01",
  "daysInMonth": 31,
  "daysElapsed": 30.4,
  "siteEventsThisMonth": 182340,
  "orgEventsThisMonth": 241875,
  "orgEventLimit": 500000,
  "projectedSiteEvents": 185939,
  "projectedOrgEvents": 246649
}