Overview
Retrieves the total count of currently enabled and active streams in your account. Use this endpoint to quickly check how many streams are actively running without fetching full stream details.
Key use cases:
- Monitor stream usage against account limits
- Build dashboard widgets showing active stream count
- Quick health check for stream infrastructure
Endpoint
Send a GET request to retrieve the count of enabled streams.
GET https://api.quicknode.com/streams/rest/v1/streams/enabled_count
Example Request
- cURL
- CLI
- JavaScript
Python
- Ruby
- SDK (JS)
SDK (Python)
- SDK (Ruby)
- SDK (Rust)
curl -X GET "https://api.quicknode.com/streams/rest/v1/streams/enabled_count" \
-H "accept: application/json" \
-H "x-api-key: YOUR_API_KEY"
qn stream enabled-count -o json
const headers = new Headers()
headers.append('accept', 'application/json')
headers.append('x-api-key', 'YOUR_API_KEY')
fetch('https://api.quicknode.com/streams/rest/v1/streams/enabled_count', {
method: 'GET',
headers: headers
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error))
import requests
url = "https://api.quicknode.com/streams/rest/v1/streams/enabled_count"
headers = {
"accept": "application/json",
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
require "uri"
require "net/http"
url = URI("https://api.quicknode.com/streams/rest/v1/streams/enabled_count")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["x-api-key"] = "YOUR_API_KEY"
response = https.request(request)
puts response.body
import { QuicknodeSdk } from "@quicknode/sdk"
const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })
const count = await qn.streams.getEnabledCount()
console.log(`Enabled streams: ${count.total}`)
import asyncio
from quicknode_sdk import QuicknodeSdk, SdkFullConfig
async def main():
qn = QuicknodeSdk(SdkFullConfig(api_key="YOUR_API_KEY"))
count = await qn.streams.get_enabled_count()
print(f"Enabled streams: {count.total}")
asyncio.run(main())
require "quicknode_sdk"
qn = QuicknodeSdk::SDK.from_config(api_key: "YOUR_API_KEY")
count = qn.streams.get_enabled_count
puts "Enabled streams: #{count["total"]}"
use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("YOUR_API_KEY").build())?;
let count = qn.streams.get_enabled_count().await?;
println!("Enabled streams: {}", count.total);
Ok(())
}
Response
On success, the API returns the count of enabled streams.
{
"total": 5
}
Response Fields
| Field | Type | Description |
|---|---|---|
| total | integer | Total count of enabled (active) streams in your account |