Rating Distribution
curl --request POST \
--url https://gateway.creditbenchmark.com/beta/data/ratingdistribution \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metric": "CCR",
"rating_scale": "CB21",
"effective_date": 20250930,
"lookback_period": 12,
"lookback_unit": "months",
"scope": {
"filters": [
{
"key": "CB_Country",
"operator": "==",
"values": "United States"
}
]
},
"facet_column": "CB_Sector"
}
'import requests
url = "https://gateway.creditbenchmark.com/beta/data/ratingdistribution"
payload = {
"metric": "CCR",
"rating_scale": "CB21",
"effective_date": 20250930,
"lookback_period": 12,
"lookback_unit": "months",
"scope": { "filters": [
{
"key": "CB_Country",
"operator": "==",
"values": "United States"
}
] },
"facet_column": "CB_Sector"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric: 'CCR',
rating_scale: 'CB21',
effective_date: 20250930,
lookback_period: 12,
lookback_unit: 'months',
scope: {filters: [{key: 'CB_Country', operator: '==', values: 'United States'}]},
facet_column: 'CB_Sector'
})
};
fetch('https://gateway.creditbenchmark.com/beta/data/ratingdistribution', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.creditbenchmark.com/beta/data/ratingdistribution",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric' => 'CCR',
'rating_scale' => 'CB21',
'effective_date' => 20250930,
'lookback_period' => 12,
'lookback_unit' => 'months',
'scope' => [
'filters' => [
[
'key' => 'CB_Country',
'operator' => '==',
'values' => 'United States'
]
]
],
'facet_column' => 'CB_Sector'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.creditbenchmark.com/beta/data/ratingdistribution"
payload := strings.NewReader("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.creditbenchmark.com/beta/data/ratingdistribution")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.creditbenchmark.com/beta/data/ratingdistribution")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}"
response = http.request(request)
puts response.read_body{
"CB_Sector": [
"Banks",
"Financial Services"
],
"CB_Effective_Date_ID": [
20250831,
20250731
],
"AGG_EntityCount": [
14,
9
],
"a": [
0.18,
0.16
],
"a-": [
0.27,
0.29
],
"bbb+": [
0.23,
0.22
],
"bbb": [
0.19,
0.2
],
"bbb-": [
0.13,
0.13
]
}{
"error": "Invalid request parameters: scope requires at least 'portfolio' or 'filters'."
}{
"detail": "Unauthorized request"
}{
"error": "Client-backed analytics inputs require contributor entitlement."
}{
"detail": [
{
"loc": [
"body",
"effective_date"
],
"msg": "Input should be a valid integer",
"type": "int_parsing"
}
]
}{
"error": "Rate limit exceeded",
"detail": "60 per 1 minute"
}{
"error": "An error occurred while processing your request. Please try again later."
}Rating Distribution
Share of entities in each rating bucket over time for a scoped universe.
POST
/
beta
/
data
/
ratingdistribution
Rating Distribution
curl --request POST \
--url https://gateway.creditbenchmark.com/beta/data/ratingdistribution \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"metric": "CCR",
"rating_scale": "CB21",
"effective_date": 20250930,
"lookback_period": 12,
"lookback_unit": "months",
"scope": {
"filters": [
{
"key": "CB_Country",
"operator": "==",
"values": "United States"
}
]
},
"facet_column": "CB_Sector"
}
'import requests
url = "https://gateway.creditbenchmark.com/beta/data/ratingdistribution"
payload = {
"metric": "CCR",
"rating_scale": "CB21",
"effective_date": 20250930,
"lookback_period": 12,
"lookback_unit": "months",
"scope": { "filters": [
{
"key": "CB_Country",
"operator": "==",
"values": "United States"
}
] },
"facet_column": "CB_Sector"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric: 'CCR',
rating_scale: 'CB21',
effective_date: 20250930,
lookback_period: 12,
lookback_unit: 'months',
scope: {filters: [{key: 'CB_Country', operator: '==', values: 'United States'}]},
facet_column: 'CB_Sector'
})
};
fetch('https://gateway.creditbenchmark.com/beta/data/ratingdistribution', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.creditbenchmark.com/beta/data/ratingdistribution",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric' => 'CCR',
'rating_scale' => 'CB21',
'effective_date' => 20250930,
'lookback_period' => 12,
'lookback_unit' => 'months',
'scope' => [
'filters' => [
[
'key' => 'CB_Country',
'operator' => '==',
'values' => 'United States'
]
]
],
'facet_column' => 'CB_Sector'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.creditbenchmark.com/beta/data/ratingdistribution"
payload := strings.NewReader("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.creditbenchmark.com/beta/data/ratingdistribution")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.creditbenchmark.com/beta/data/ratingdistribution")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric\": \"CCR\",\n \"rating_scale\": \"CB21\",\n \"effective_date\": 20250930,\n \"lookback_period\": 12,\n \"lookback_unit\": \"months\",\n \"scope\": {\n \"filters\": [\n {\n \"key\": \"CB_Country\",\n \"operator\": \"==\",\n \"values\": \"United States\"\n }\n ]\n },\n \"facet_column\": \"CB_Sector\"\n}"
response = http.request(request)
puts response.read_body{
"CB_Sector": [
"Banks",
"Financial Services"
],
"CB_Effective_Date_ID": [
20250831,
20250731
],
"AGG_EntityCount": [
14,
9
],
"a": [
0.18,
0.16
],
"a-": [
0.27,
0.29
],
"bbb+": [
0.23,
0.22
],
"bbb": [
0.19,
0.2
],
"bbb-": [
0.13,
0.13
]
}{
"error": "Invalid request parameters: scope requires at least 'portfolio' or 'filters'."
}{
"detail": "Unauthorized request"
}{
"error": "Client-backed analytics inputs require contributor entitlement."
}{
"detail": [
{
"loc": [
"body",
"effective_date"
],
"msg": "Input should be a valid integer",
"type": "int_parsing"
}
]
}{
"error": "Rate limit exceeded",
"detail": "60 per 1 minute"
}{
"error": "An error occurred while processing your request. Please try again later."
}Body
application/json
Was this page helpful?

