Anytime Labs API (1.0.0)

API for fetching trending stat insights, and split historical player stats

Download OpenAPI description
Languages
Servers
Mock server
https://docs.anytimelabs.io/_mock/apis/
https://api.anytimelabs.io/v1beta/

Get trends

Request

List all available trends matching the specified filters. Filters are optional and can be used in any combination.

Bodyapplication/jsonrequired
league_idsArray of strings

List of league IDs to filter by

game_idsArray of strings

List of game IDs to filter by

entity_idsArray of strings

List of entity IDs to filter by

stat_keysArray of strings

List of stat keys to filter by

max_resultsinteger>= 1

Maximum number of total results to return

Default 100
max_results_per_entityinteger>= 1

Maximum number of results to return per entity

Default 3
max_results_per_entity_stat_keyinteger>= 1

Maximum number of results to return per entity and stat key combination

Default 1
curl -i -X POST \
  'https://docs.anytimelabs.io/_mock/apis/trends?key=YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "league_ids": [
      "string"
    ],
    "game_ids": [
      "string"
    ],
    "entity_ids": [
      "string"
    ],
    "stat_keys": [
      "string"
    ],
    "max_results": 100,
    "max_results_per_entity": 3,
    "max_results_per_entity_stat_key": 1
  }'

Responses

List of matching trends. Filters are optional, and listed in order from more general to more specific. When providing a filter, it is most efficient to provide all filters above it.

Bodyapplication/jsonArray [
idstringrequired

Unique identifier for the trend

league_idstringrequired

League identifier

gameobject(Game)required

Game this trend applies to

game.​idstringrequired

Unique identifier for the game

game.​home_teamobject(Team)

Game's home team

game.​away_teamobject(Team)

Game's away team

game.​game_timestring

Game's scheduled time

game.​league_idstringrequired

Game's league

entity_typestring(EntityType)required

Types of entities that can be filtered

Enum"player""team"
entityPlayer (object)required

Entity this trend applies to (currently only players supported)

One of:

Entity this trend applies to (currently only players supported)

entity.​idstringrequired

Unique identifier for the player

entity.​first_namestringrequired

Player's first name

entity.​last_namestringrequired

Player's last name

entity.​full_namestringrequired

Player's full name

entity.​jersey_numberinteger

Player's jersey number

entity.​positionobject(Position)

Player's position

entity.​teamobject(Team)

Player's current team (if applicable)

statobject(StatKey)required

Stat key information

stat.​keystringrequired

Unique identifier for the stat

stat.​titlestringrequired

Human-readable title for the stat

stat.​entity_typestring(EntityType)required

Types of entities that can be filtered

Enum"player""team"
stat.​position_categoriesArray of stringsrequired

List of position categories this stat applies to

handicapnumber(float)required

Value to compare the stat against

stat_resultstring(StatResult)required

Result of a stat comparison against a handicap

Enum"over""under"
entity_trend_statsobject(TrendStats)required

Statistical summary of the trend

entity_trend_stats.​hitsintegerrequired

Number of times the trend condition was met

entity_trend_stats.​missesintegerrequired

Number of times the trend condition was not met

entity_trend_stats.​pushintegerrequired

Number of times the trend condition resulted in a push

entity_trend_stats.​totalintegerrequired

Total number of occurrences

entity_trend_stats.​averagenumberrequired

Average value for the stat

entity_trend_conditionobject(TimeSpanAndGameFilters)required

Time span and game filters applied to this trend

entity_trend_condition.​time_spanobject(DataFilter)required

Time span filter to apply

entity_trend_condition.​time_span.​keystringrequired

Unique identifier for the filter

entity_trend_condition.​time_span.​valueArray of strings or integers or booleans or arrays or null or string or integer or boolean or nullrequired
entity_trend_condition.​game_filtersArray of objects(DataFilter)

Optional game-specific filters to apply within the time span

entity_trend_readable_stringstringrequired

Human-readable description of the trend

updatedstring(date-time)required

When this trend was last updated

]
Response
application/json
[ { "id": "string", "league_id": "string", "game": {}, "entity_type": "player", "entity": {}, "stat": {}, "handicap": 0.1, "stat_result": "over", "entity_trend_stats": {}, "entity_trend_condition": {}, "entity_trend_readable_string": "string", "updated": "2019-08-24T14:15:22Z" } ]

Game Logs

Game log retrieval and analysis endpoints

Operations

Stat Averages

Stat average management endpoints

Operations

Leagues

League management endpoints

Operations

Teams

Team management endpoints

Operations

Players

Player management endpoints

Operations

Games

Game management endpoints

Operations

Data Filters

Data filter management endpoints

Operations