Bulk and spreadsheets › Excel Power Query
Excel Power Query
The latest results in Excel, refreshed with one click: Data, Get Data, Blank Query, Advanced Editor, paste.
// Excel: Data, Get Data, From Other Sources, Blank Query, Advanced Editor.
// Paste this, replace the key on the first line, then Close & Load.
let
Key = "your key here",
Reply = Json.Document(Web.Contents("https://api.apihorseracing.com", [
RelativePath = "/v1/results/latest",
Query = [limit = "50"],
Headers = [#"X-API-Key" = Key]
])),
Rows = Table.FromRecords(Reply[data]),
Kept = Table.SelectColumns(Rows, {"date", "time", "course", "name", "runners"}, MissingField.UseNull)
in
Kept
What the reply holds
- date
- The race day.
- course
- The course.
- time
- The off.
- name
- The race.
When it says no
401no_key The key is missing or mistyped. Every sample reads it from AHR_KEY.403plan_needed Your plan does not reach this. The reply names the plan that does.429rate_limited Too fast. Wait the seconds in Retry-After, then try again.