Pinnacle odds API in R (httr2)
Answer: use httr2 with header x-api-key, call GET https://pinnfeed.io/v1/odds, and parse the JSON. WebSocket push still needs a WS client (or stick to REST on Free/Hobby). Builder (€99/mo) unlocks /v1/stream and closing history.
Minimal REST call#
library(httr2)
library(jsonlite)
key <- Sys.getenv("PINNFEED_KEY")
resp <- request("https://pinnfeed.io/v1/odds") |>
req_url_query(sport = "soccer", market = "moneyline", main = "true", limit = 20) |>
req_headers(`x-api-key` = key) |>
req_perform()
data <- resp_body_json(resp)
# data$events[[i]]$markets[[j]]$outcomes[[k]]$decimal / $fair / $american
Schema fields: docs/schema. Python twin: REST answer.
Trial CTA#
Builder (€99/mo) for WebSocket and closing history. 3-day trial; card required, charged after day 3 unless cancelled. Free REST: signup. Related: answers hub, docs.
Questions people ask#
Does httr2 support the WebSocket?#
Not as a first-class client. Use REST from R, or a language with a mature WS library for Builder push.
Is Free enough for research?#
Yes for delayed snapshots (30 s). Real-time REST needs Hobby+; push needs Builder.
Is this educational content for adults?#
Yes (18+).