Skip to content

Stats

Get API statistics and data counts.

Endpoint

GET /api/stats

Example

bash
GET /api/stats

Response:

json
{
  "characters": {
    "total": 252,
    "categories": 58
  },
  "episodes": {
    "total": 274,
    "seasons": 8,
    "shorts": 15
  }
}

Use Cases

  • Display loading progress while fetching data
  • Show API statistics on your website
  • Check if your cache is up to date

Example: Fetch Stats

javascript
async function getStats() {
  const response = await fetch('https://regularshow-api.vercel.app/api/stats');
  const stats = await response.json();
  
  console.log('Regular Show API Statistics');
  console.log('==========================');
  console.log(`Total Characters: ${stats.characters.total}`);
  console.log(`Character Categories: ${stats.characters.categories}`);
  console.log(`Total Episodes: ${stats.episodes.total}`);
  console.log(`Seasons: ${stats.episodes.seasons}`);
  console.log(`Shorts: ${stats.episodes.shorts}`);
}

getStats();

Current Data Counts

  • Characters: 252 unique characters
  • Categories: 58 unique categories
  • Episodes: 274 episodes total
    • 8 Seasons
    • 15 Shorts
    • 1 Movie

Released under the MIT License.