DIRECTORY UPDATED EVERY 24 HOURS!

College Sports Directory – API Documentation

Overview

The College Sports Directory REST API provides read-only access to school and staff data. All requests require API key authentication.

Base URL

https://www.collegesportsdirectory.com/wp-json/csd/v1/

Authentication

Pass your API key in the X-CSD-API-Key HTTP header with every request:

curl -H "X-CSD-API-Key: YOUR_API_KEY" https://www.collegesportsdirectory.com/wp-json/csd/v1/stats

Rate Limits

Limit TypeDefaultDescription
Per-Key60 req/minPer API key, configurable
Burst10 req/5secPrevents rapid-fire requests
Per-IP120 req/minPer source IP address
Global300 req/minAcross all keys combined

Rate limit info is included in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Response Format

All successful responses follow this envelope:

{
  "success": true,
  "data": { ... },
  "meta": {
    "total": 1500,
    "page": 1,
    "per_page": 20,
    "total_pages": 75,
    "timestamp": "2026-02-18T14:30:00Z"
  }
}

Error Codes

StatusCodeDescription
400invalid_parameterInvalid query parameter
401missing_api_keyNo API key provided
401invalid_api_keyKey not found or inactive
403api_disabledAPI is disabled
404resource_not_foundRecord not found
429rate_limit_exceededToo many requests

Schools Endpoints

GET /schools

List schools with filtering, sorting, and pagination.

ParameterTypeDefaultDescription
pageint1Page number
per_pageint20Results per page (max 100)
searchstringSearch school name, city, state, zip
statestringFilter by state (e.g., "AL")
divisionstringFilter by division (e.g., "NCAA D1")
school_typestringFilter by type (e.g., "Public")
conferencestringFilter by conference
sort_bystringschool_nameschool_name, city, state, school_divisions, date_created, school_enrollment
sort_orderstringASCASC or DESC
fieldsstringComma-separated field list for sparse response

Example

curl -H "X-CSD-API-Key: YOUR_KEY" \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/schools?state=AL&per_page=5"

GET /schools/{id}

Get a single school by ID, including staff count.

Example

curl -H "X-CSD-API-Key: YOUR_KEY" \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/schools/45"

GET /schools/{id}/staff

Get staff members for a specific school.

ParameterTypeDefaultDescription
pageint1Page number
per_pageint20Results per page (max 100)
sort_bystringfull_namefull_name, title, sport_department, email, phone, date_created
sort_orderstringASCASC or DESC
departmentstringFilter by sport/department
searchstringSearch within school's staff

Example

curl -H "X-CSD-API-Key: YOUR_KEY" \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/schools/45/staff?department=Football"

Staff Endpoints

GET /staff

List all staff members with filtering, sorting, and pagination.

ParameterTypeDefaultDescription
pageint1Page number
per_pageint20Results per page (max 100)
searchstringSearch name, title, email, department, school
school_idintFilter by school ID
departmentstringFilter by sport/department
sort_bystringfull_namefull_name, title, sport_department, email, phone, date_created, school_name
sort_orderstringASCASC or DESC
fieldsstringComma-separated field list

Example

curl -H "X-CSD-API-Key: YOUR_KEY" \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/staff?department=Football&per_page=10"

GET /staff/{id}

Get a single staff member with their associated school.

Example Response

{
  "success": true,
  "data": {
    "id": 101,
    "full_name": "John Smith",
    "title": "Head Football Coach",
    "sport_department": "Football",
    "email": "[email protected]",
    "phone": "(205) 348-1234",
    "school": {
      "id": 45,
      "school_name": "University of Alabama",
      "city": "Tuscaloosa",
      "state": "AL",
      "school_divisions": "NCAA D1"
    }
  }
}

Search & Stats

GET /search

Search across both schools and staff in a single request.

ParameterTypeDefaultDescription
qstringrequiredSearch term (min 2 chars)
per_pageint10Max results per type (max 50)

Example

curl -H "X-CSD-API-Key: YOUR_KEY" \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/search?q=Alabama"

Response

{
  "success": true,
  "data": {
    "schools": [ { "id": 1, "school_name": "University of Alabama", ... } ],
    "staff": [ { "id": 101, "full_name": "...", "school_name": "University of Alabama" } ],
    "totals": { "schools": 3, "staff": 42 }
  }
}

GET /stats

Get summary statistics for the directory.

Returns record counts and last-updated timestamps. No parameters required.

Example

curl -H "X-CSD-API-Key: YOUR_KEY" \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/stats"

Response

{
  "success": true,
  "data": {
    "counts": {
      "schools": 2104,
      "staff": 137965,
      "states_represented": 54,
      "divisions": 9,
      "school_types": 5,
      "departments": 11046
    },
    "last_updated": {
      "schools": "2025-11-12T14:26:59Z",
      "staff": "2026-02-18T11:57:32Z"
    }
  },
  "meta": {
    "timestamp": "2026-02-18T14:30:00Z"
  }
}

Webhooks & Events

Event Types

EventDescription
school.createdNew school added
school.updatedExisting school modified
school.deletedSchool removed
staff.createdNew staff added
staff.updatedExisting staff modified
staff.deletedStaff removed

GET /events

Query the event log to see recent changes. Use the since parameter to catch up on missed webhooks.

ParameterTypeDefaultDescription
sincedatetimeISO 8601 (e.g., 2026-02-01T00:00:00Z)
event_typestringFilter by event type
record_typestring"school" or "staff"
pageint1Page number
per_pageint50Max 100

Webhook Management

Register webhooks to receive real-time HTTP POST notifications when records change.

POST /webhooks

Register a new webhook.

curl -X POST -H "X-CSD-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-app.com/webhook","events":["school.created","staff.updated"],"name":"My App"}' \
  "https://www.collegesportsdirectory.com/wp-json/csd/v1/webhooks"

Returns the webhook ID and a secret for signature verification (shown once).

GET /webhooks

List your registered webhooks.

PUT /webhooks/{id}

Update a webhook's URL, events, or active status.

DELETE /webhooks/{id}

Delete a webhook.

Webhook Payload

When an event occurs, CSD sends an HTTP POST to your registered URL:

{
  "event": "school.updated",
  "timestamp": "2026-02-18T14:30:00Z",
  "data": {
    "id": 45,
    "school_name": "University of Alabama",
    ...
  }
}

Signature Verification

Each request includes an X-CSD-Signature header containing an HMAC-SHA256 hash of the request body using your webhook secret:

# PHP verification example
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_CSD_SIGNATURE'];
$expected = hash_hmac('sha256', $payload, $your_secret);

if (hash_equals($expected, $signature)) {
    // Valid webhook
}

Failure Handling

If your endpoint returns a non-2xx status or times out, the failure count increments. After 10 consecutive failures, the webhook is auto-disabled. Re-enable it via PUT /webhooks/{id} with {"is_active": true}.

Try It

Test API endpoints directly from this page.