Help with cricapi data exract

Hi all,

I want to extract data from cricapi and display them in my HA dashboard

When executing the URL https://api.cricapi.com/v1/match_info?apikey=b024e8d4-4abb-4db6-9a9a-f13a7f2b01f8&id=<api_key>
it outputs the following result

{
  "apikey": "xxxxxxxxxxxxxxxxxx",
  "data": {
    "id": "189a5631-8bae-4d2f-8a21-3d31219b1bc2",
    "name": "Sri Lanka vs New Zealand, 3rd ODI",
    "matchType": "odi",
    "status": "Rain stops play - New Zealand opt to bat",
    "venue": "Pallekele International Cricket Stadium, Pallekele",
    "date": "2024-11-19",
    "dateTimeGMT": "2024-11-19T09:00:00",
    "teams": [
      "Sri Lanka",
      "New Zealand"
    ],
    "score": [
      {
        "r": 112,
        "w": 1,
        "o": 21,
        "inning": "New Zealand Inning 1"
      }
    ],
    "tossWinner": "New Zealand",
    "tossChoice": "bat",
    "series_id": "cabf1419-900e-4396-ac27-0dd87befa6a5",
    "fantasyEnabled": true,
    "bbbEnabled": true,
    "hasSquad": true,
    "matchStarted": true,
    "matchEnded": false
  },
  "status": "success",
  "info": {
    "hitsToday": 4,
    "hitsUsed": 1,
    "hitsLimit": 100,
    "credits": 0,
    "server": 6,
    "queryTime": 9.5071,
    "s": 0,
    "cache": 0
  }
}

How to use this output to extract the data I want to show in HA dashboard?

For example the venue & the status of the current match

    "status": "Rain stops play - New Zealand opt to bat",
    "venue": "Pallekele International Cricket Stadium, Pallekele",

You can use a restful sensor. Something like:

rest:
  - resource: "https://api.cricapi.com/v1/match_info?apikey=b024e8d4-4abb-4db6-9a9a-f13a7f2b01f8&id=<api_key>"
    sensor:
      - name: "Cricket Status"
        value_template: "{{ value_json.data.status }}"

      - name: "Cricket Venue"
        value_template: "{{ value_json.data.venue}}"

Thank you very much