API Reference
ASD Database API

ASD Database API

Endpoints for asd database operations.

Endpoints

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

NameInTypeRequiredDescription
categoryquerystringNoFilter by category: system, sports, or all
include_statsquerybooleanNoInclude 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

NameInTypeRequiredDescription
schemaquerystringNoFilter by schema name
has_dataquerystringNoFilter tables with/without data
limitqueryintegerNoMaximum tables to return
offsetqueryintegerNoPagination 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

NameInTypeRequiredDescription
sport_codepathstringYes-
include_athletesquerybooleanNo-
include_eventsquerybooleanNo-
include_bettingquerybooleanNo-
limitqueryintegerNo-

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

NameInTypeRequiredDescription
sport_codepathstringYes-
active_onlyquerybooleanNoReturn only active athletes
limitqueryintegerNo-
offsetqueryintegerNo-

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

NameInTypeRequiredDescription
sport_codepathstringYes-
upcoming_onlyquerybooleanNoReturn only upcoming events
include_participantsquerybooleanNoInclude event participants
limitqueryintegerNo-
offsetqueryintegerNo-

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

NameInTypeRequiredDescription
sport_codepathstringYes-
bet_typequerystringNofuture, player_h2h, prop, outcome
event_idquerystringNoFilter by specific event
limitqueryintegerNo-

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

NameInTypeRequiredDescription
queryquerystringYesSQL 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

NameInTypeRequiredDescription
filenamepathstringYes-

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

NameInTypeRequiredDescription
active_onlyquerybooleanNoReturn only sports with data
include_statsquerybooleanNoInclude 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"

GET /asd/api

Asd Api Reference

Complete API reference for ASD endpoints

Comprehensive documentation of all available routes and methods

Responses

200: Successful Response

Examples

curl -X GET "https://api.altsportsdata.com/asd/api" \
  -H "Content-Type: application/json"

Platform

Documentation

Community

Support

partnership@altsportsdata.comdev@altsportsleagues.ai

2025 Β© AltSportsLeagues.ai. Powered by AI-driven sports business intelligence.

πŸ€– AI-Enhancedβ€’πŸ“Š Data-Drivenβ€’βš‘ Real-Time