Skip to content

Get Analysis

Retrieve details about a specific analysis.

Request

GET /analyses/{id}

Path Parameters

Parameter Type Required Description
id integer Yes The analysis ID

Response

{
  "data": {
    "id": 1246,
    "video_id": 789,
    "status": "done",
    "aggregate_version": "0.4.98",
    "created_at": "2025-01-15T10:30:00Z",
    "finished_at": "2025-01-15T11:45:00Z",
    "video": {
      "id": 789,
      "title": "Team A vs Team B - League Match",
      "duration": 5400,
      "home_team_name": "Team A",
      "away_team_name": "Team B"
    }
  }
}

Response Fields

Field Type Description
id integer Analysis ID
video_id integer Associated video ID
status string Analysis status — see Status Values
aggregate_version string Processing version (e.g., "0.4.98")
created_at datetime When analysis was requested
finished_at datetime When analysis finished (null if not done)
video object Video metadata

Status Values

Status Description
init Analysis created, initializing
waiting_for_video Waiting for the video to be ready
running Currently being processed
done Completed successfully, results available
error Processing failed
ignored Analysis was ignored and will not be processed
no_match_detected No soccer match was detected in the video; the analysis will not run
needs_attention Processing paused, pending manual review

Analysis Must Be Complete

Most other endpoints require status: "done". Check this endpoint first before querying results.

Example

curl -X GET "https://aiontheball.nl/api/v1/analyses/1246" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

response = requests.get(
    'https://aiontheball.nl/api/v1/analyses/1246',
    headers={'Authorization': f'Bearer {token}'}
)
analysis = response.json()['data']

if analysis['status'] == 'done':
    print(f"Analysis complete: {analysis['aggregate_version']}")