# bet365 odds API: quickstart

> bet365 is included in every OddsRelay plan, Free too. One keyed call returns its pre-match prices beside exchange lay prices: the call, its quote and its reply.

## bet365 is in every plan

bet365 is included in every OddsRelay plan, Free included: its pre-match prices for featured football and UK and Irish racing. It is not an add-on and needs nothing set on the key: name it in `bookmakers` like any other bookmaker.

This call needs a key. [Sign up free](https://app.oddsrelay.io/signup): your first key is shown once when you finish. Save it as the environment variable ODDSRELAY_KEY.

## Price the call first

This call asks the Standard feed for bet365's match odds on English football, with Smarkets lay prices beside them: `bookmakers=bet365`, `sports=soccer_england`, `markets=h2h` and `exchanges=smarkets`. With `quote=true` it returns the call's price in tokens instead of the odds, and a quote costs nothing.

A free quote for the bet365 call:

```
curl --compressed -s -H "Authorization: Bearer $ODDSRELAY_KEY" \
  "https://api.oddsrelay.io/v2/odds/standard?region=uk&format=bare&sports=soccer_england&markets=h2h&bookmakers=bet365&exchanges=smarkets&quote=true"
# {"cost": …, "remaining": …, "rate_card": "…"}
```

## What the call returns

Drop `quote=true` and the same call returns the events. In each outcome, `back` holds bet365's price and `lay` the Smarkets lay price, with `available`, the amount you can lay at it. Here is the reply, trimmed to one event and without the kick-off time and the links.

Reply:

```
[
  {
    "event_id": "or_evt_30f27f768cdc",
    "sport_key": "soccer_championship",
    "sport_title": "Championship",
    "competition_key": "soccer_england_championship",
    "home_team": "Cardiff City FC",
    "away_team": "Watford",
    "markets": [
      {
        "key": "h2h",
        "outcomes": [
          {
            "name": "Cardiff City FC",
            "back": [
              { "bookmaker": "bet365", "price": 1.615 }
            ],
            "lay": [
              {
                "exchange": "smarkets",
                "price": 1.71,
                "available": 661.27
              }
            ]
          },
          {
            "name": "Draw",
            "back": [
              { "bookmaker": "bet365", "price": 4.1 }
            ],
            "lay": [
              {
                "exchange": "smarkets",
                "price": 4.7,
                "available": 219.67
              }
            ]
          },
          {
            "name": "Watford",
            "back": [
              { "bookmaker": "bet365", "price": 5 }
            ],
            "lay": [
              {
                "exchange": "smarkets",
                "price": 5.3,
                "available": 67.4
              }
            ]
          }
        ]
      }
    ]
  }
]
```

## How old a price can be

Every product on sale meets a maximum update time of 10–20 s: how old a bookmaker's price can be when it reaches you. [How fresh a price is](https://oddsrelay.io/docs/guides/freshness) shows the times each reply carries.

## More on bet365

[Is there a bet365 API?](https://oddsrelay.io/blog/is-there-a-bet365-api) answers the question most people ask first. [bet365 odds APIs compared](https://oddsrelay.io/compare/bet365-odds-apis) sets the suppliers side by side, and [bet365's page](https://oddsrelay.io/bookmakers/bet365) lists the feeds and sports that carry it.

OddsRelay is not affiliated with or endorsed by bet365.

Source: https://oddsrelay.io/docs/guides/bet365-odds · the API contract: https://api.oddsrelay.io/v2/openapi.json
