ElementalInference / Client / search_fixtures
search_fixtures¶
- ElementalInference.Client.search_fixtures(**kwargs)¶
Searches for the fixtures (sports events, such as a specific basketball game) that are available for a sport in a date window. Each fixture in the response includes a fixtureId that you specify in the clipping output of a feed, so that Elemental Inference maps the event data for that fixture onto the clipping metadata. This operation is paginated: if there are more fixtures than fit in one page, the response includes a nextToken that you pass in a subsequent request.
See also: AWS API Documentation
Request Syntax
response = client.search_fixtures( sport='basketball'|'american-football', startDate='string', endDate='string', filters=[ { 'name': 'COMPETITOR', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
- Parameters:
sport (string) –
[REQUIRED]
The sport to search for fixtures. Valid values: basketball (search for basketball fixtures), american-football (search for american-football fixtures).
startDate (string) –
[REQUIRED]
The first day of the search window, in UTC. The search includes fixtures that are scheduled on this day.
Specify the date in ISO 8601 format, as
YYYY-MM-DD. For example, 2026-03-14.endDate (string) –
The last day of the search window, in UTC. The search includes fixtures that are scheduled on this day. Specify the date in ISO 8601 format, as
YYYY-MM-DD.If you omit this parameter, Elemental Inference searches only the day that you specified in startDate. The window from startDate through endDate must not exceed seven days.
filters (list) –
An array of filters that narrow the results. Each filter applies to one dimension of a fixture, such as the competitor. You can specify up to 10 filters.
A fixture must satisfy every filter in the array in order to appear in the results. Within one filter, a fixture must match at least one of the values.
(dict) –
A filter for a fixture search. It is used in the filters array of a SearchFixtures request.
name (string) – [REQUIRED]
The dimension of the fixture to filter on. Valid values: COMPETITOR.
values (list) – [REQUIRED]
An array of values to match in the dimension that you specified in name. You can specify up to 10 values. A fixture appears in the results if it matches at least one of these values.
(string) –
maxResults (integer) –
The maximum number of fixtures to return for each API request.
The service might return fewer fixtures than the maxResults value. When more fixtures match the search, the response also includes a nextToken value that you can use to fetch the next batch of results.
nextToken (string) –
The token that identifies the batch of results that you want to see.
For example, you submit a SearchFixtures request with maxResults set at 5. The service returns the first batch of results (up to 5) and a nextToken value. To see the next batch of results, you submit the SearchFixtures request a second time, with the same search criteria, and specify the nextToken value.
- Return type:
dict
- Returns:
Response Syntax
{ 'fixtures': [ { 'fixtureId': 'string', 'name': 'string', 'fixtureGroup': 'string', 'scheduledStart': datetime(2015, 1, 1), 'status': 'string', 'competitors': [ { 'name': 'string', 'isHome': True|False }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) –
fixtures (list) –
An array of FixtureSummary objects, one for each fixture that matches the search. The array is empty if no fixtures match.
(dict) –
Contains information about one fixture. It is used in the SearchFixtures response.
Elemental Inference relays the information in this structure from the data source, so that you can identify the fixture that matches your source media.
fixtureId (string) –
The ID of the fixture. Specify this ID in the clipping output of a feed, to identify the fixture whose event data you want Elemental Inference to map onto the clipping metadata.
name (string) –
The name of the fixture, as provided by the data source. For example, the names of the two competing teams.
fixtureGroup (string) –
The group that the fixture belongs to, such as the competition, league, or tournament. The data source doesn’t provide this information for every fixture.
scheduledStart (datetime) –
The scheduled start time of the fixture, as provided by the data source. The actual start time might differ.
status (string) –
The status of the fixture in its lifecycle, as provided by the data source. For example, Scheduled or Completed.
competitors (list) –
An array of the competitors (the teams or individuals) in the fixture.
(dict) –
Contains information about one competitor in a fixture. It is used in the FixtureSummary that is in the SearchFixtures response.
name (string) –
The name of the competitor, as provided by the data source.
isHome (boolean) –
Specifies whether this competitor is the home side in the fixture. If true, this competitor is the home side. If false, this competitor is the away side.
nextToken (string) –
The token that identifies the next batch of results. To see the next batch, submit the SearchFixtures request again, with the same search criteria, and specify this value in nextToken.
This parameter is absent when there are no more results to return.
Exceptions