pyracing icon indicating copy to clipboard operation
pyracing copied to clipboard

Change the URL endpoint for event_results as requested by iRacing

Open Esterni opened this issue 3 years ago • 0 comments

In the 2020 Season 3 release notes iRacing presented a new endpoint to retrieve a drivers race results and requested that anyone previously using.

Website Data

- For those who scrape the iRacing Membersite website for data and are using the endpoint behind the "My Series Results" page (/memberstats/member/GetResults) we request that you switch to the new endpoint "/memberstats/member/SearchSeriesResults".
- - Key differences for the new endpoint are that it has fewer filters and returns all results unordered rather than pages of ordered results making the query easier for our system and requiring fewer calls.
- - Request parameters:
- - - custid (Required): ID for the customer whose official series results will be pulled.
- - - seriesid (Optional): ID of the series to limit results. Excluding pulls the customer's results for all series.
- - - catid (Optional): The ID(s) of the categories to limit results. This parameter may be included zero or more times. Excluding pulls results for all categories. Acceptable values are '1' (Oval), '2' (Road), '3' (Dirt Oval), '4' (Dirt Road).
- - - evttype (Optional): The type(s) of events to limit results. This parameter may be included zero or more times. Excluding pulls results for all event types. Acceptable values are '2' (Practice), '3' (Qualify), '4' (Time Trial), '5' (Race).
- - - Either 'seasonyear' and 'seasonquarter' must be included, or 'starttime_low' and 'starttime_high'. Our recommended approach is to use 'seasonyear' and 'seasonquarter' for initial pull of a customer's data, then using 'starttime_low' and 'starttime_high' where 'starttime_low' is the start time from the last session pulled.
- - - - seasonyear: The season year for which to limit results (e.g. 2020).
- - - - seasonquarter: The season quarter for which to limit results (e.g. 3).
- - - - OR
- - - - starttime_low: Include in the results sessions which started after this date/time, in milliseconds since the epoch beginning midnight January 1, 1970 UTC.
- - - - starttime_high: Include in the results sessions which started prior to this date/time, in milliseconds since the epoch beginning midnight January 1, 1970 UTC. May be no more than 90 days after starttime_low.
- - Example pulling Oval and Road race results (note that this returns no results):

It looks like the parameters are as follows:

  • custid (required)
  • seriesid (optional)
  • catid (optional - returns all categories when omitted)
  • evttype (optional- returns all event types when ommitted)
  • seasonyear AND seasonquarter OR
  • starttime_low AND starttime_high (Restricted to 90 day max search window)

Results are returned unordered

Esterni avatar Jul 28 '20 04:07 Esterni