Find Sports Actions by Query

gns-api/actions

API to return the sports event action(s) for a specific query.

Some actions exist as a hierarchy where actions have parent action id that they belong to, and a sequence to order the child events.

Response Schema: https://gns-schemas.sports.gracenote.com/gns.xsd / https://gns-schemas.sports.gracenote.com/gns.json

Request Parameters

Parameter Mandatory Description Example(s) 
query Yes

Make a request based on specific query. See examples below.

accept Yes

Choose between XML and JSON for the response..

skip No Indicate the number of results to skip in the response.
limit No Indicate the maximum number of results in the response.
fields No Allows you to return the id(s) and a specific field(s) in the response. In the case of actions, this is not applicable.

Queries

Query Description Example
type Make a request based on the type(s) of actions. {"type": "shot"}
eventparticipantid Make a request based on the participant that performed the action. {"eventParticipantId":"GN24WHYVAPM3MA4"}
parentactionids Make a request for actions based on their parentactionid(s) for the actions of which they are a child. {"parentActionId": "GN4TFRR1JKT61T2"}
sporteventid Make a request for actions based on the sportEventId for the action. Combine "type" with your query to narrow down to specific types of actions. {"sportsEventId":"GN4ZYFJP8994GRH", "Type":"shot_made_three_pointer"}
description Make a request for actions based on the description of the event. {"description": "Crosby shoots"}
{} Returns all sports actions. {}

Response Body

Response

Description

id

Unique Gracenote id for the action.

meta Container for the update information.
update_date Update date and time for the action
type The type of action (e.g. play, substitution, shot_made, possession_turnover etc.)
sequence The sequence of an action within a play, or the sequence of a play in respect to the sports_event.
parent_action_id (if applicable) If a child action, the Gracenote ID for the parent action.
sports_event_id The Gracenote ID for the sports event.
event_time The container for the timing of the action.
period number The period of the match in which the action took place.
time The time of the clock when the action took place.
event_participant_id The Gracenote ID for the event participant that is performing the action.
description The description of the action (e.g. Tyler Seguin shoots Saved by Craig Anderson.)
properties Only applicable to NFL actions. Provides more detailed information for an action such as the down, yards to go and challenges.
down If applicable, the down for which the action occurred on.
yards_to_go If applicable, the number of yards to go for a first down or until the goal line on the down for which the action occurred on.
yards_to_go_goal If applicable, whether or not the yards to go is for a first down (false) or for the goal line (true).
yard_line If applicable, the yard line on which the action started.
yard_line_alignment If applicable, the side of the field (Home or AWAY) on which the action started.
challenge_called_by_official If applicable, "true" or "false" for whether or not there was a challenge on the play.
challenge_play_reversed If applicable, "true" or "false" for whether or not tthe call on the play was reversed.

Sample

Sample Request

1. Return all of John Tavares' goals: 

{"eventParticipantId":"GN24WHYVAPM3MA4", "type": "goal"}

2. Return all goals from the Champions League Finals:

{"sportsEventId":"GNB4KR3TTGMESD9","type":"goal"}

1. John Tavares' Goals:
<gns>
    <sports_actions>
        <sports_action>
            <id>GN7BTQRM47TCX45</id>
            <meta>
                <update_date>2018-03-06T14:59:12.687Z</update_date>
            </meta>
            <type>goal_even_strength</type>
            <sequence>0</sequence>
            <parent_action_id>GN4GA7NCP8Q9YTR</parent_action_id>
            <sports_event_id>GND2B1BW9A81TW7</sports_event_id>
            <points>1</points>
            <event_participant_id>GN24WHYVAPM3MA4</event_participant_id>
            <description>John Tavares scores.</description>
        </sports_action>
    </sports_actions>
</gns>


2. Champions League Finals goals:
<gns>
    <sports_actions>
        <sports_action>
            <id>GND97XDNXWHJV2P</id>
            <meta>
                <update_date>2018-08-02T00:07:01.820Z</update_date>
            </meta>
            <type>goal</type>
            <sequence>0</sequence>
            <parent_action_id>GN40XSMSGEEFT15</parent_action_id>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_participant_id>GN59GSBXX5WKD6Z</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN40XSMSGEEFT15</id>
            <meta>
                <update_date>2018-08-02T00:07:01.784Z</update_date>
            </meta>
            <xids>
                <xid>
                    <supplier>infostrada</supplier>
                    <type>soccer_editionmatchperson</type>
                    <id>24624924</id>
                </xid>
            </xids>
            <type>goal</type>
            <sequence>86</sequence>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_time>
                <period_number>2</period_number>
                <time>54:27</time>
            </event_time>
            <event_participant_id>GN6XESYRRWVZ6QN</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN2SQZWH45DZRYM</id>
            <meta>
                <update_date>2018-08-02T00:07:01.833Z</update_date>
            </meta>
            <xids>
                <xid>
                    <supplier>infostrada</supplier>
                    <type>soccer_editionmatchperson</type>
                    <id>24625100</id>
                </xid>
            </xids>
            <type>goal</type>
            <sequence>123</sequence>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_time>
                <period_number>2</period_number>
                <time>82:44</time>
            </event_time>
            <event_participant_id>GN27HXW31J4Y1VH</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN78DK0TPEDDB2G</id>
            <meta>
                <update_date>2018-08-02T00:07:01.845Z</update_date>
            </meta>
            <type>goal</type>
            <sequence>0</sequence>
            <parent_action_id>GN9W2C9CAABN0RE</parent_action_id>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_participant_id>GN3QEWGMSX50N59</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN4YD67S0PJ6M8D</id>
            <meta>
                <update_date>2018-08-02T00:07:01.820Z</update_date>
            </meta>
            <type>goal</type>
            <sequence>0</sequence>
            <parent_action_id>GN96WXC69V5Y53W</parent_action_id>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_participant_id>GN4P6CFMS1HKKF6</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN9PM0T7TXVHZRN</id>
            <meta>
                <update_date>2018-08-02T00:07:01.797Z</update_date>
            </meta>
            <type>goal</type>
            <sequence>0</sequence>
            <parent_action_id>GN2SQZWH45DZRYM</parent_action_id>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_participant_id>GN3QEWGMSX50N59</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN96WXC69V5Y53W</id>
            <meta>
                <update_date>2018-08-02T00:07:01.797Z</update_date>
            </meta>
            <xids>
                <xid>
                    <supplier>infostrada</supplier>
                    <type>soccer_editionmatchperson</type>
                    <id>24624898</id>
                </xid>
            </xids>
            <type>goal</type>
            <sequence>79</sequence>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_time>
                <period_number>2</period_number>
                <time>50:08</time>
            </event_time>
            <event_participant_id>GN27HXW31J4Y1VH</event_participant_id>
            <description>Goal</description>
        </sports_action>
        <sports_action>
            <id>GN9W2C9CAABN0RE</id>
            <meta>
                <update_date>2018-08-02T00:07:01.795Z</update_date>
            </meta>
            <xids>
                <xid>
                    <supplier>infostrada</supplier>
                    <type>soccer_editionmatchperson</type>
                    <id>24624999</id>
                </xid>
            </xids>
            <type>goal</type>
            <sequence>94</sequence>
            <sports_event_id>GNB4KR3TTGMESD9</sports_event_id>
            <points>1</points>
            <event_time>
                <period_number>2</period_number>
                <time>62:57</time>
            </event_time>
            <event_participant_id>GN27HXW31J4Y1VH</event_participant_id>
            <description>Goal</description>
        </sports_action>
    </sports_actions>
</gns>

Docs Navigation