Find Sport by Query

gns-api/sports

API to return the sport(s) and their sport id(s) based on a specific query.

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

Request Parameters

Parameter Mandatory Description
query Yes

Make a request based on a 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 sports, this is limited to "names".

Queries

Query Description Example
name Make a request based on the name(s) of the sport(s). {"name": "Basketball"}
{} Returns all sports. This can be a good first step from which to then requests events, organizations, etc. for a specific sport. {}

Response Body

Response Description
id Unique Gracenote id for the sport.
value Name of the sport. (e.g. Baseball). The type of name for sports is DEFAULT.
xids
supplier Name of the supplier (e.g. sportsdirect, infostrada) of the xid.
type The description of the supplier's id keyspace.
id The supplier's id for the associated entity.

Sample

 

Sample Request

Query: {"name": "Baseball"}

 

Sample Response

<sport>
 	<id>GN3FAZE2HJTVDJ9</id>
	<meta>
		<update_date>2017-05-26T01:07:16Z</update_date>
	</meta>
	<xids>
		<xid>
			<supplier>sportsdirect</supplier>
			<type>xml</type>
			<id>/sport/baseball</id>
		</xid>
	</xids>
	<names>
		<name>
			<type>DEFAULT</type>
			<value>Baseball</value>
		</name>
	</names>
</sport>