cURL Examples
Here are practical examples of how to use the Regular Show API with cURL.
API Information
bash
curl https://regularshow-api.vercel.app/apiCharacters
Get All Characters (first 20)
bash
curl https://regularshow-api.vercel.app/api/characterGet Characters with Pagination
bash
curl "https://regularshow-api.vercel.app/api/character?page=2&limit=10"Search Characters by Name
bash
curl "https://regularshow-api.vercel.app/api/character?name=Mordecai"Filter by Category
bash
# Get all villains
curl "https://regularshow-api.vercel.app/api/character?category=Villains"
# Get main characters
curl "https://regularshow-api.vercel.app/api/character?category=Main%20Characters"
# Get antagonists
curl "https://regularshow-api.vercel.app/api/character?category=Antagonists"Get Single Character by ID
bash
curl https://regularshow-api.vercel.app/api/character/2037Get Single Character by Slug
bash
curl https://regularshow-api.vercel.app/api/character/Benson
curl https://regularshow-api.vercel.app/api/character/MordecaiGet Character Image
bash
curl https://regularshow-api.vercel.app/api/character/Benson/imageEpisodes
Get All Episodes
bash
curl https://regularshow-api.vercel.app/api/episodeFilter by Season
bash
curl "https://regularshow-api.vercel.app/api/episode?season=1"
curl "https://regularshow-api.vercel.app/api/episode?season=2"Search by Name
bash
curl "https://regularshow-api.vercel.app/api/episode?name=Power"Get Single Episode by ID
bash
curl https://regularshow-api.vercel.app/api/episode/1Get Single Episode by Slug
bash
curl https://regularshow-api.vercel.app/api/episode/The_PowerSeasons
Get All Seasons
bash
curl https://regularshow-api.vercel.app/api/seasonGet Season Details
bash
curl https://regularshow-api.vercel.app/api/season/1
curl https://regularshow-api.vercel.app/api/season/2Get Shorts
bash
curl https://regularshow-api.vercel.app/api/season/shortsStats
bash
curl https://regularshow-api.vercel.app/api/statsSave Response to File
bash
# Save characters to file
curl https://regularshow-api.vercel.app/api/character > characters.json
# Save with formatting
curl https://regularshow-api.vercel.app/api/character | python3 -m json.tool > characters_pretty.jsonUsing with jq
bash
# Get just the character names
curl -s https://regularshow-api.vercel.app/api/character | jq '.results[].name'
# Get first 5 character names
curl -s https://regularshow-api.vercel.app/api/character | jq '.results[:5] | .[].name'
# Get count of characters
curl -s https://regularshow-api.vercel.app/api/character | jq '.info.count'
# Get all villain names
curl -s "https://regularshow-api.vercel.app/api/character?category=Villains" | jq '.results[].name'Using in Shell Scripts
bash
#!/bin/bash
# Get random character
CHARACTERS=$(curl -s https://regularshow-api.vercel.app/api/character?limit=100)
COUNT=$(echo $CHARACTERS | jq '.info.count')
RANDOM_ID=$((1 + RANDOM % COUNT))
curl -s "https://regularshow-api.vercel.app/api/character?page=$RANDOM_ID&limit=1" | jq '.results[0]'HTTP Headers
If you need to add custom headers:
bash
# Add User-Agent
curl -H "User-Agent: MyApp/1.0" https://regularshow-api.vercel.app/api
# Add Accept header
curl -H "Accept: application/json" https://regularshow-api.vercel.app/apiPOST Requests (Future)
Some endpoints may support POST requests:
bash
# Example (if available)
curl -X POST \
-H "Content-Type: application/json" \
-d '{"name": "Mordecai"}' \
https://regularshow-api.vercel.app/api/character/search