Locations
The Locations endpoint provides access to all locations from the Regular Show animated series.
Endpoint
GET /api/locationQuery Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Filter by location name |
slug | string | Filter by location slug |
category | string | Filter by category (e.g., "Restaurants") |
page | number | Page number (default: 1) |
limit | number | Results per page (default: 20) |
Get All Locations
bash
GET /api/locationSearch Locations by Name
bash
GET /api/location?name=ParkFilter by Category
bash
GET /api/location?category=RestaurantsGet Single Location
GET /api/location/:idParameters:
id- Location ID or slug
bash
GET /api/location/Park
GET /api/location/33Location Object
json
{
"id": 33,
"name": "Park",
"slug": "Park",
"url": "https://regularshow.fandom.com/wiki/Park",
"thumbnail": "https://static.wikia.nocookie.net/theregularshow/images/...",
"categories": ["Locations"],
"description": "The main setting of the show..."
}Available Categories
Locations- General locationsRestaurants- Restaurants and food placesSchools- Schools and educational places
Example: Get All Restaurants
javascript
async function getRestaurants() {
const response = await fetch('https://regularshow-api.vercel.app/api/location?category=Restaurants');
const data = await response.json();
return data.results;
}Example: Search Locations
javascript
async function searchLocations(query) {
const response = await fetch(
`https://regularshow-api.vercel.app/api/location?name=${query}&limit=20`
);
const data = await response.json();
data.results.forEach(location => {
console.log(`${location.name} - ${location.categories.join(', ')}`);
});
}
searchLocations('House');Get Location Image Only
GET /api/location/:id/imagebash
GET /api/location/Park/imageResponse:
json
{
"id": 33,
"name": "Park",
"image": "https://static.wikia.nocookie.net/..."
}Popular Locations
Here are some of the key locations in Regular Show:
- Park - The main park where most episodes take place
- The House - The characters' residence
- Benson's Apartment - Benson's living space
- Cheezers - A popular restaurant
- Space Tree - The space station from the final season
Example: Display Location Gallery
javascript
async function displayLocationGallery() {
const response = await fetch('https://regularshow-api.vercel.app/api/location?limit=50');
const data = await response.json();
const gallery = document.getElementById('gallery');
data.results.forEach(location => {
const card = document.createElement('div');
card.innerHTML = `
<img src="${location.thumbnail}" alt="${location.name}">
<h3>${location.name}</h3>
`;
gallery.appendChild(card);
});
}