Skip to main content

Overview

Returns comprehensive information about a specific school using its slug. Slugs are URL-friendly identifiers typically used for public-facing pages and SEO.

Path Parameters

ParameterTypeRequiredDescription
slugstringYesSchool slug (e.g., westminster-academy)

Query Parameters

ParameterTypeRequiredDescription
expandstringNoComma-separated list of expansions: ratings, performance, catchment, demographics, finance

Response

The response structure is identical to the Get School by ID endpoint.

Slug Format

Slugs are automatically generated from school names:
  • Lowercase
  • Spaces replaced with hyphens
  • Special characters removed
  • Duplicate hyphens collapsed
School NameSlug
Westminster Academywestminster-academy
St. Mary’s Primary Schoolst-marys-primary-school
The Queen’s C of E Schoolthe-queens-c-of-e-school

Example Requests

Basic Request

import { Vepler } from '@vepler/sdk';

const vepler = new Vepler({ apiKey: process.env.VEPLER_API_KEY });

const school = await vepler.schools.getBySlug('westminster-academy');

console.log(school.name);
console.log(`URN: ${school.urn}`);

Building School Profile Pages

// Create SEO-friendly URLs for school pages
const createSchoolUrl = (slug: string) =>
  `https://yoursite.com/schools/${slug}`;

// Fetch school data using slug from URL
app.get('/schools/:slug', async (req, res) => {
  const school = await vepler.schools.getBySlug(req.params.slug, {
    expand: 'ratings,performance'
  });

  res.render('school-profile', { school });
});

Use Cases

  • SEO-friendly school profile pages
  • Shareable school URLs
  • Human-readable identifiers
  • URL routing in web applications