ASD Database API
Endpoints for asd database operations.
Endpoints
- GET /asd/
- GET /asd/schemas
- GET /asd/tables
- GET /asd/sport/sport_code"}
- GET /asd/athletes/sport_code"}
- GET /asd/events/sport_code"}
- GET /asd/betting/sport_code"}
- POST /asd/query
- GET /asd/analytics
- GET /asd/kb
- GET /asd/docs/filename"}
- GET /asd/catalog
- GET /asd/sports
- GET /asd/api
GET /asd/
Asd Overview
ASD Database overview with navigation
Returns comprehensive information about the AltSportsData database including available schemas, tables, and exploration endpoints.
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/asd/" \
-H "Content-Type: application/json"GET /asd/schemas
List Schemas
List all database schemas with optional statistics
Categories:
- system: Infrastructure schemas (auth, storage, public, etc.)
- sports: Sport-specific schemas (wsl, spr, f1, etc.)
- all: All schemas
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
category | query | string | No | Filter by category: system, sports, or all |
include_stats | query | boolean | No | Include table counts and row statistics |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/schemas" \
-H "Content-Type: application/json"GET /asd/tables
List Tables
List all tables with optional filtering and pagination
Use schema parameter to filter by specific sport (e.g., schema=wsl) Use has_data=true to show only tables containing records
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
schema | query | string | No | Filter by schema name |
has_data | query | string | No | Filter tables with/without data |
limit | query | integer | No | Maximum tables to return |
offset | query | integer | No | Pagination offset |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/tables" \
-H "Content-Type: application/json"GET /asd/sport/{sport_code}"}
Get Sport Data
Get comprehensive data for a specific sport
Sport codes: wsl, spr, f1, motocrs, nhra, fdrift, etc. Returns athletes, events, and optionally betting data
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sport_code | path | string | Yes | - |
include_athletes | query | boolean | No | - |
include_events | query | boolean | No | - |
include_betting | query | boolean | No | - |
limit | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/sport/{sport_code}"}" \
-H "Content-Type: application/json"GET /asd/athletes/{sport_code}"}
Get Athletes
Get athlete data for a specific sport
Returns athlete profiles, stats, and metadata
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sport_code | path | string | Yes | - |
active_only | query | boolean | No | Return only active athletes |
limit | query | integer | No | - |
offset | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/athletes/{sport_code}"}" \
-H "Content-Type: application/json"GET /asd/events/{sport_code}"}
Get Events
Get event data for a specific sport
Returns competition events, dates, locations, and optionally participants
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sport_code | path | string | Yes | - |
upcoming_only | query | boolean | No | Return only upcoming events |
include_participants | query | boolean | No | Include event participants |
limit | query | integer | No | - |
offset | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/events/{sport_code}"}" \
-H "Content-Type: application/json"GET /asd/betting/{sport_code}"}
Get Betting Data
Get betting odds and projection data for a sport
Bet types:
- future: Season/championship odds
- player_h2h: Head-to-head matchups
- prop: Proposition bets
- outcome: Event outcome predictions
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
sport_code | path | string | Yes | - |
bet_type | query | string | No | future, player_h2h, prop, outcome |
event_id | query | string | No | Filter by specific event |
limit | query | integer | No | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/betting/{sport_code}"}" \
-H "Content-Type: application/json"POST /asd/query
Execute Query
Execute custom SQL query (read-only)
Security: Only SELECT queries allowed, parameterized for safety
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
query | query | string | Yes | SQL query to execute |
Request Body
{}Responses
200: Successful Response
422: Validation Error
Examples
curl -X POST "https://api.altsportsdata.com/asd/query" \
-H "Content-Type: application/json" \
-d '{}'GET /asd/analytics
Database Analytics
Get database-wide analytics and insights
Returns statistics about data distribution, completeness, and patterns
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/asd/analytics" \
-H "Content-Type: application/json"GET /asd/kb
Knowledge Base
ASD Knowledge Base index
Returns links to all documentation, schemas, and analysis files
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/asd/kb" \
-H "Content-Type: application/json"GET /asd/docs/{filename}"}
View Documentation
View ASD documentation files
Renders markdown files as HTML or returns JSON data files
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filename | path | string | Yes | - |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/docs/{filename}"}" \
-H "Content-Type: application/json"GET /asd/catalog
Schema Catalog
Complete schema catalog with sport categorization
Organizes all 26 schemas into logical categories
Responses
200: Successful Response
Examples
curl -X GET "https://api.altsportsdata.com/asd/catalog" \
-H "Content-Type: application/json"GET /asd/sports
List Sports
List all available sports with metadata
Returns sport codes, names, categories, and data availability
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
active_only | query | boolean | No | Return only sports with data |
include_stats | query | boolean | No | Include row counts and table stats |
Responses
200: Successful Response
422: Validation Error
Examples
curl -X GET "https://api.altsportsdata.com/asd/sports" \
-H "Content-Type: application/json"