GET events

Description

Returns a list of events that meet the search criteria.

Resource URL

http://clutchwin.com/api/v1/events.json

Parameters

Field Default Description

season

optional
Only events for the specified season will be returned.

start_date

optional
Specifies the beginning of the time period for which events should be returned. Format: YYYY-MM-DD

end_date

optional
Specifies the end of the time period for which events should be returned Format: YYYY-MM-DD

game_type

optional
regular Filters the list for a particular type of game (regular, all-star, or post-season). Valid values: asg, post, regular.

away_team_id

optional
Return only events where the specified team is the visiting team.

home_team_id

optional
Return only events where the specified team is the home team.

bat_team_id

optional
Return only events where the specified team is batting.

fld_team_id

optional
Return only events where the specified team is in the field.

bat_id

optional
Return only events where the specified player was batting.

pit_id

optional
Return only events where the specified player was pitching.

bat_hand_cd

optional
Return only events where the batter was batting from the left/right side. Valid values: r, l.

event_cd

optional
Return only events with a specific outcome. Valid values: 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23.

include

optional
To include more details on the Game, Batter or Pitcher, specify include=batter or include=game,pitcher. You can also use the following syntax: include[]=batter&include[]=pitcher.

fieldset

optional
Return a limited set of fields. Valid values: basic.

max_entries

optional
100 Number of entries to return per request.

start_index

optional
1 The index of the first entry to be returned (used for paging).

Example Requests

Return Chris Davis' first two at bats against Ivan Nova in 2013.

GET

http://clutchwin.com/api/v1/events.json?season=2013&bat_id=davic003&pit_id=novai001&max_entries=2&access_token=[token]

Response:

[
  {
    "retro_game_id": "BAL201306290",
    "away_team_id": "NYA",
    "inn_ct": 4,
    "bat_home_id": "1",
    "outs_ct": 2,
    "balls_ct": 1,
    "strikes_ct": 1,
    "pitch_seq_tx": "BFX",
    "away_score_ct": 0,
    "home_score_ct": 9,
    "bat_id": "davic003",
    "bat_hand_cd": "L",
    "resp_bat_id": "davic003",
    "resp_bat_hand_cd": "L",
    "pit_id": "novai001",
    "pit_hand_cd": "R",
    "resp_pit_id": "novai001",
    "resp_pit_hand_cd": "R",
    "pos2_fld_id": "romia002",
    "pos3_fld_id": "overl001",
    "pos4_fld_id": "canor001",
    "pos5_fld_id": "adamd001",
    "pos6_fld_id": "nix-j001",
    "pos7_fld_id": "almoz001",
    "pos8_fld_id": "gardb001",
    "pos9_fld_id": "suzui001",
    "base1_run_id": "",
    "base2_run_id": "",
    "base3_run_id": "",
    "event_tx": "5/L",
    "leadoff_fl": "F",
    "ph_fl": "F",
    "bat_fld_cd": "3",
    "bat_lineup_id": "5",
    "event_cd": "2",
    "bat_event_fl": "T",
    "ab_fl": "T",
    "h_cd": "0",
    "sh_fl": "F",
    "sf_fl": "F",
    "event_outs_ct": 1,
    "dp_fl": "F",
    "tp_fl": "F",
    "rbi_ct": 0,
    "wp_fl": "F",
    "pb_fl": "F",
    "fld_cd": "5",
    "battedball_cd": "L",
    "bunt_fl": "F",
    "foul_fl": "F",
    "battedball_loc_tx": "",
    "err_ct": 0,
    "err1_fld_cd": "0",
    "err1_cd": "N",
    "err2_fld_cd": "0",
    "err2_cd": "N",
    "err3_fld_cd": "0",
    "err3_cd": "N",
    "bat_dest_id": "0",
    "run1_dest_id": "0",
    "run2_dest_id": "0",
    "run3_dest_id": "0",
    "bat_play_tx": "5",
    "run1_play_tx": "",
    "run2_play_tx": "",
    "run3_play_tx": "",
    "run1_sb_fl": "F",
    "run2_sb_fl": "F",
    "run3_sb_fl": "F",
    "run1_cs_fl": "F",
    "run2_cs_fl": "F",
    "run3_cs_fl": "F",
    "run1_pk_fl": "F",
    "run2_pk_fl": "F",
    "run3_pk_fl": "F",
    "run1_resp_pit_id": "",
    "run2_resp_pit_id": "",
    "run3_resp_pit_id": "",
    "game_new_fl": "F",
    "game_end_fl": "F",
    "pr_run1_fl": "F",
    "pr_run2_fl": "F",
    "pr_run3_fl": "F",
    "removed_for_pr_run1_id": "",
    "removed_for_pr_run2_id": "",
    "removed_for_pr_run3_id": "",
    "removed_for_ph_bat_id": "",
    "removed_for_ph_bat_fld_cd": 0,
    "po1_fld_cd": 5,
    "po2_fld_cd": 0,
    "po3_fld_cd": 0,
    "ass1_fld_cd": 0,
    "ass2_fld_cd": 0,
    "ass3_fld_cd": 0,
    "ass4_fld_cd": 0,
    "ass5_fld_cd": 0,
    "event_id": 39,
    "home_team_id": "BAL",
    "bat_team_id": "BAL",
    "fld_team_id": "NYA",
    "bat_last_id": "1",
    "inn_new_fl": "F",
    "inn_end_fl": "T",
    "start_bat_score_ct": 9,
    "start_fld_score_ct": 0,
    "inn_runs_ct": 0,
    "game_pa_ct": 22,
    "inn_pa_ct": 2,
    "pa_new_fl": "T",
    "pa_trunc_fl": "F",
    "start_bases_cd": "0",
    "end_bases_cd": "0",
    "bat_start_fl": "T",
    "resp_bat_start_fl": "T",
    "bat_on_deck_id": "wietm001",
    "bat_in_hold_id": "hardj003",
    "pit_start_fl": "F",
    "resp_pit_start_fl": "F",
    "run1_fld_cd": "0",
    "run1_lineup_cd": "0",
    "run1_origin_event_id": "0",
    "run2_fld_cd": "0",
    "run2_lineup_cd": "0",
    "run2_origin_event_id": "0",
    "run3_fld_cd": "0",
    "run3_lineup_cd": "0",
    "run3_origin_event_id": "0",
    "run1_resp_cat_id": "",
    "run2_resp_cat_id": "",
    "run3_resp_cat_id": "",
    "pa_ball_ct": 1,
    "pa_called_ball_ct": 1,
    "pa_intent_ball_ct": 0,
    "pa_pitchout_ball_ct": 0,
    "pa_hitbatter_ball_ct": 0,
    "pa_other_ball_ct": 0,
    "pa_strike_ct": 2,
    "pa_called_strike_ct": 0,
    "pa_swingmiss_strike_ct": 0,
    "pa_foul_strike_ct": 1,
    "pa_inplay_strike_ct": 1,
    "pa_other_strike_ct": 0,
    "event_runs_ct": 0,
    "fld_id": "adamd001",
    "base2_force_fl": "F",
    "base3_force_fl": "F",
    "base4_force_fl": "F",
    "bat_safe_err_fl": "F",
    "bat_fate_id": "0",
    "run1_fate_id": "0",
    "run2_fate_id": "0",
    "run3_fate_id": "0",
    "fate_runs_ct": 0,
    "ass6_fld_cd": "0",
    "ass7_fld_cd": "0",
    "ass8_fld_cd": "0",
    "ass9_fld_cd": "0",
    "ass10_fld_cd": "0",
    "unknown_out_exc_fl": "F",
    "uncertain_play_exc_fl": "F",
    "game_type": "regular",
    "game_id": 25910,
    "gamelog_id": 7331,
    "season": 2013,
    "k": 0,
    "sb": 0,
    "di": 0,
    "cs": 0,
    "pk": 0,
    "wp": 0,
    "pb": 0,
    "bk": 0,
    "bb": 0,
    "ibb": 0,
    "hbp": 0,
    "xi": 0,
    "roe": 0,
    "h_1b": 0,
    "h_2b": 0,
    "h_3b": 0,
    "hr": 0,
    "game_date": "2013-06-29"
  },
  {
    "retro_game_id": "BAL201306290",
    "away_team_id": "NYA",
    "inn_ct": 6,
    "bat_home_id": "1",
    "outs_ct": 2,
    "balls_ct": 0,
    "strikes_ct": 1,
    "pitch_seq_tx": "FX",
    "away_score_ct": 2,
    "home_score_ct": 9,
    "bat_id": "davic003",
    "bat_hand_cd": "L",
    "resp_bat_id": "davic003",
    "resp_bat_hand_cd": "L",
    "pit_id": "novai001",
    "pit_hand_cd": "R",
    "resp_pit_id": "novai001",
    "resp_pit_hand_cd": "R",
    "pos2_fld_id": "stewc001",
    "pos3_fld_id": "overl001",
    "pos4_fld_id": "canor001",
    "pos5_fld_id": "adamd001",
    "pos6_fld_id": "nix-j001",
    "pos7_fld_id": "almoz001",
    "pos8_fld_id": "gardb001",
    "pos9_fld_id": "suzui001",
    "base1_run_id": "markn001",
    "base2_run_id": "",
    "base3_run_id": "",
    "event_tx": "HR/9/F.1-H",
    "leadoff_fl": "F",
    "ph_fl": "F",
    "bat_fld_cd": "3",
    "bat_lineup_id": "5",
    "event_cd": "23",
    "bat_event_fl": "T",
    "ab_fl": "T",
    "h_cd": "4",
    "sh_fl": "F",
    "sf_fl": "F",
    "event_outs_ct": 0,
    "dp_fl": "F",
    "tp_fl": "F",
    "rbi_ct": 2,
    "wp_fl": "F",
    "pb_fl": "F",
    "fld_cd": "0",
    "battedball_cd": "F",
    "bunt_fl": "F",
    "foul_fl": "F",
    "battedball_loc_tx": "9",
    "err_ct": 0,
    "err1_fld_cd": "0",
    "err1_cd": "N",
    "err2_fld_cd": "0",
    "err2_cd": "N",
    "err3_fld_cd": "0",
    "err3_cd": "N",
    "bat_dest_id": "4",
    "run1_dest_id": "4",
    "run2_dest_id": "0",
    "run3_dest_id": "0",
    "bat_play_tx": "",
    "run1_play_tx": "",
    "run2_play_tx": "",
    "run3_play_tx": "",
    "run1_sb_fl": "F",
    "run2_sb_fl": "F",
    "run3_sb_fl": "F",
    "run1_cs_fl": "F",
    "run2_cs_fl": "F",
    "run3_cs_fl": "F",
    "run1_pk_fl": "F",
    "run2_pk_fl": "F",
    "run3_pk_fl": "F",
    "run1_resp_pit_id": "novai001",
    "run2_resp_pit_id": "",
    "run3_resp_pit_id": "",
    "game_new_fl": "F",
    "game_end_fl": "F",
    "pr_run1_fl": "F",
    "pr_run2_fl": "F",
    "pr_run3_fl": "F",
    "removed_for_pr_run1_id": "",
    "removed_for_pr_run2_id": "",
    "removed_for_pr_run3_id": "",
    "removed_for_ph_bat_id": "",
    "removed_for_ph_bat_fld_cd": 0,
    "po1_fld_cd": 0,
    "po2_fld_cd": 0,
    "po3_fld_cd": 0,
    "ass1_fld_cd": 0,
    "ass2_fld_cd": 0,
    "ass3_fld_cd": 0,
    "ass4_fld_cd": 0,
    "ass5_fld_cd": 0,
    "event_id": 59,
    "home_team_id": "BAL",
    "bat_team_id": "BAL",
    "fld_team_id": "NYA",
    "bat_last_id": "1",
    "inn_new_fl": "F",
    "inn_end_fl": "F",
    "start_bat_score_ct": 9,
    "start_fld_score_ct": 2,
    "inn_runs_ct": 0,
    "game_pa_ct": 31,
    "inn_pa_ct": 3,
    "pa_new_fl": "T",
    "pa_trunc_fl": "F",
    "start_bases_cd": "1",
    "end_bases_cd": "0",
    "bat_start_fl": "T",
    "resp_bat_start_fl": "T",
    "bat_on_deck_id": "wietm001",
    "bat_in_hold_id": "hardj003",
    "pit_start_fl": "F",
    "resp_pit_start_fl": "F",
    "run1_fld_cd": "9",
    "run1_lineup_cd": "3",
    "run1_origin_event_id": "57",
    "run2_fld_cd": "0",
    "run2_lineup_cd": "0",
    "run2_origin_event_id": "0",
    "run3_fld_cd": "0",
    "run3_lineup_cd": "0",
    "run3_origin_event_id": "0",
    "run1_resp_cat_id": "stewc001",
    "run2_resp_cat_id": "",
    "run3_resp_cat_id": "",
    "pa_ball_ct": 0,
    "pa_called_ball_ct": 0,
    "pa_intent_ball_ct": 0,
    "pa_pitchout_ball_ct": 0,
    "pa_hitbatter_ball_ct": 0,
    "pa_other_ball_ct": 0,
    "pa_strike_ct": 2,
    "pa_called_strike_ct": 0,
    "pa_swingmiss_strike_ct": 0,
    "pa_foul_strike_ct": 1,
    "pa_inplay_strike_ct": 1,
    "pa_other_strike_ct": 0,
    "event_runs_ct": 2,
    "fld_id": "",
    "base2_force_fl": "F",
    "base3_force_fl": "F",
    "base4_force_fl": "F",
    "bat_safe_err_fl": "F",
    "bat_fate_id": "4",
    "run1_fate_id": "4",
    "run2_fate_id": "0",
    "run3_fate_id": "0",
    "fate_runs_ct": 0,
    "ass6_fld_cd": "0",
    "ass7_fld_cd": "0",
    "ass8_fld_cd": "0",
    "ass9_fld_cd": "0",
    "ass10_fld_cd": "0",
    "unknown_out_exc_fl": "F",
    "uncertain_play_exc_fl": "F",
    "game_type": "regular",
    "game_id": 25910,
    "gamelog_id": 7331,
    "season": 2013,
    "k": 0,
    "sb": 0,
    "di": 0,
    "cs": 0,
    "pk": 0,
    "wp": 0,
    "pb": 0,
    "bk": 0,
    "bb": 0,
    "ibb": 0,
    "hbp": 0,
    "xi": 0,
    "roe": 0,
    "h_1b": 0,
    "h_2b": 0,
    "h_3b": 0,
    "hr": 1,
    "game_date": "2013-06-29"
  }
]
              

Resource Information

Rate Limited? No
Requests per rate limit window N/A
Response Formats json, xml
HTTP Methods GET
Resource family events
API Version API v1.0