Betfair JSON Feed (Feedback from BF would be good please)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • geoffw123
    Senior Member
    • Mar 2014
    • 250

    #1

    Betfair JSON Feed (Feedback from BF would be good please)

    Hello

    Not sure if this already common knowledge but I stumbled across an interesting discovery today. The Betfair website utilises a JSON feed for live scores. This could be very useful for App writers to display a live score in football or Tennis matches.
    This feature is sadly lacking from the API so I am wondering if I could also use it ?

    For example, here is a snippet for one game I just captured, all sorts of useful information.

    Code:
    [{
    	"eventId": 27610980,
    	"eventTypeId": 1,
    	"marketId": "1.121991682",
    	"marketName": "Match Odds",
    	"relevance": 0,
    	"eventName": "Mordovia Saransk v Terek Grozni",
    	"competitionName": "Premier Division",
    	"competitionId": "101",
    	"numberOfRunners": 3,
    	"countryCode": "RU",
    	"startTime": "2015-12-03T16:00:00.000Z",
    	"runners": {
    		"runner1Name": "Mordovia Saransk",
    		"runner2Name": "Terek Grozni",
    		"drawName": "The Draw",
    		"runner1SelectionId": 4045119,
    		"runner2SelectionId": 939625,
    		"drawSelectionId": 58805
    	},
    	"homeName": "Mordovia Saransk",
    	"awayName": "Terek Grozni",
    	"broadcasts": {
    		"tv": [],
    		"radio": {
    			"url": "http://radio.betfair.com"
    		},
    		"bfLiveVideo": {
    			
    		},
    		"isLiveVideoAvailable": false,
    		"isDataVisualizationAvailable": true
    	},
    	"state": {
    		"eventTypeId": 1,
    		"eventId": 27610980,
    		"score": {
    			"home": {
    				"name": "Mordovia Saransk",
    				"score": "0",
    				"halfTimeScore": "0",
    				"fullTimeScore": "",
    				"penaltiesScore": "",
    				"penaltiesSequence": [],
    				"games": "",
    				"sets": "",
    				"numberOfYellowCards": 1,
    				"numberOfRedCards": 0,
    				"numberOfCards": 1,
    				"numberOfCorners": 2,
    				"numberOfCornersFirstHalf": 2,
    				"numberOfCornersSecondHalf": 0,
    				"bookingPoints": 10
    			},
    			"away": {
    				"name": "Terek Grozni",
    				"score": "0",
    				"halfTimeScore": "0",
    				"fullTimeScore": "",
    				"penaltiesScore": "",
    				"penaltiesSequence": [],
    				"games": "",
    				"sets": "",
    				"numberOfYellowCards": 0,
    				"numberOfRedCards": 0,
    				"numberOfCards": 0,
    				"numberOfCorners": 0,
    				"numberOfCornersFirstHalf": 0,
    				"numberOfCornersSecondHalf": 0,
    				"bookingPoints": 0
    			},
    			"numberOfYellowCards": 1,
    			"numberOfRedCards": 0,
    			"numberOfCards": 1,
    			"numberOfCorners": 2,
    			"numberOfCornersFirstHalf": 2,
    			"numberOfCornersSecondHalf": 0,
    			"bookingPoints": 10
    		},
    		"timeElapsed": 46,
    		"elapsedRegularTime": 46,
    		"timeElapsedSeconds": 5,
    		"fullTimeElapsed": {
    			"hour": 0,
    			"min": 0,
    			"sec": 0
    		},
    		"status": "SecondHalfKickOff",
    		"matchStatus": "SecondHalfKickOff"
    	},
    	"matchInfo": {
    		
    	},
    	"inPlayBettingStatus": "InPlay"
    },

    I would like to know please what is Betfair's policy regarding App. writers using this JSON score feed ?

    They may look favourably on it as its just a few hundred bytes to download this zipped JSON string, compared to a 700k download of the full page.

    Is anyone else using this live score feed ?

    Regards Geoff
  • geoffw123
    Senior Member
    • Mar 2014
    • 250

    #2
    Hello Betfair Developer Support

    Any chance of a comment please on whether it is OK to use this service ?

    I will assume that no reply means that it is OK to use in a responsible manner.

    Thanks for your time.

    Geoff

    Comment

    • Lopiner
      Junior Member
      • Feb 2009
      • 117

      #3
      GEOFFW123, you can mimic the request that the browser does when on the website, i think it's fairly straightforward from what i can remember. I dont know the frequency of requests that you are able to do but check out the the frequency that the browser does and follow the same refresh rate.
      fooledbyabet.com

      Comment

      • BetfairDeveloperProgram
        Administrator
        • Oct 2008
        • 679

        #4
        Originally posted by geoffw123 View Post
        Hello Betfair Developer Support

        Any chance of a comment please on whether it is OK to use this service ?

        I will assume that no reply means that it is OK to use in a responsible manner.

        Thanks for your time.

        Geoff
        Hi Geoff,

        Sorry for the late reply.

        This isn't a supported API service and therefore if its used in an automated fashion you may find that your requests are blocked without notice.

        Thanks

        Neil

        Comment

        • geoffw123
          Senior Member
          • Mar 2014
          • 250

          #5
          Hello Neil

          Thanks for the reply.

          It is a little disappointing to read that the request might be blocked.

          The alternative would be to web scrape the score off your main page.

          So for a single game that would mean approximately an 800 kilobyte download every 10 seconds, compared to 800 bytes or so for that web service call. In other words your Server would be getting hammered 1000 times harder per call.

          Isnt that an argument to say that this web service isnt officially supported but it will be tolerated if used responsibly ?

          Any chance you could please raise this issue with Betfair Management to point out the loading argument above and also say it is a feature that has been requested numerous times both on this forum and also by Betfair App users. Sadly, it is a huge obvious feature requirement that is missing from the official API.

          Thanks for your time

          Geoff

          Comment

          • Lopiner
            Junior Member
            • Feb 2009
            • 117

            #6
            Geoff, you can always use it as the browser does, no one will care because it's the same effort on the servers as the browser and no one will know because you can always mimic the request as coming from a browser.
            If you scrape it, the html, it will be exactly the same but as you mention, a lot more bandwidth.
            fooledbyabet.com

            Comment

            • BetfairDeveloperProgram
              Administrator
              • Oct 2008
              • 679

              #7
              Hi Geoff,

              Sadly, it is a huge obvious feature requirement that is missing from the official API.
              Unfortunately, this isn't a feature we've been able to provide for commercial reasons. Although it's something that we'd clearly like to surface via a supported API service.

              Isnt that an argument to say that this web service isnt officially supported but it will be tolerated if used responsibly ?
              Yes, as per Lopiner comments, if usage is the same as that of a web browser.

              Thanks

              Neil

              Comment

              • lawred2
                Junior Member
                • Dec 2015
                • 7

                #8
                Originally posted by geoffw123 View Post
                Hello

                Not sure if this already common knowledge but I stumbled across an interesting discovery today. The Betfair website utilises a JSON feed for live scores. This could be very useful for App writers to display a live score in football or Tennis matches.
                This feature is sadly lacking from the API so I am wondering if I could also use it ?

                For example, here is a snippet for one game I just captured, all sorts of useful information.

                Code:
                [{
                	"eventId": 27610980,
                	"eventTypeId": 1,
                	"marketId": "1.121991682",
                	"marketName": "Match Odds",
                	"relevance": 0,
                	"eventName": "Mordovia Saransk v Terek Grozni",
                	"competitionName": "Premier Division",
                	"competitionId": "101",
                	"numberOfRunners": 3,
                	"countryCode": "RU",
                	"startTime": "2015-12-03T16:00:00.000Z",
                	"runners": {
                		"runner1Name": "Mordovia Saransk",
                		"runner2Name": "Terek Grozni",
                		"drawName": "The Draw",
                		"runner1SelectionId": 4045119,
                		"runner2SelectionId": 939625,
                		"drawSelectionId": 58805
                	},
                	"homeName": "Mordovia Saransk",
                	"awayName": "Terek Grozni",
                	"broadcasts": {
                		"tv": [],
                		"radio": {
                			"url": "http://radio.betfair.com"
                		},
                		"bfLiveVideo": {
                			
                		},
                		"isLiveVideoAvailable": false,
                		"isDataVisualizationAvailable": true
                	},
                	"state": {
                		"eventTypeId": 1,
                		"eventId": 27610980,
                		"score": {
                			"home": {
                				"name": "Mordovia Saransk",
                				"score": "0",
                				"halfTimeScore": "0",
                				"fullTimeScore": "",
                				"penaltiesScore": "",
                				"penaltiesSequence": [],
                				"games": "",
                				"sets": "",
                				"numberOfYellowCards": 1,
                				"numberOfRedCards": 0,
                				"numberOfCards": 1,
                				"numberOfCorners": 2,
                				"numberOfCornersFirstHalf": 2,
                				"numberOfCornersSecondHalf": 0,
                				"bookingPoints": 10
                			},
                			"away": {
                				"name": "Terek Grozni",
                				"score": "0",
                				"halfTimeScore": "0",
                				"fullTimeScore": "",
                				"penaltiesScore": "",
                				"penaltiesSequence": [],
                				"games": "",
                				"sets": "",
                				"numberOfYellowCards": 0,
                				"numberOfRedCards": 0,
                				"numberOfCards": 0,
                				"numberOfCorners": 0,
                				"numberOfCornersFirstHalf": 0,
                				"numberOfCornersSecondHalf": 0,
                				"bookingPoints": 0
                			},
                			"numberOfYellowCards": 1,
                			"numberOfRedCards": 0,
                			"numberOfCards": 1,
                			"numberOfCorners": 2,
                			"numberOfCornersFirstHalf": 2,
                			"numberOfCornersSecondHalf": 0,
                			"bookingPoints": 10
                		},
                		"timeElapsed": 46,
                		"elapsedRegularTime": 46,
                		"timeElapsedSeconds": 5,
                		"fullTimeElapsed": {
                			"hour": 0,
                			"min": 0,
                			"sec": 0
                		},
                		"status": "SecondHalfKickOff",
                		"matchStatus": "SecondHalfKickOff"
                	},
                	"matchInfo": {
                		
                	},
                	"inPlayBettingStatus": "InPlay"
                },

                I would like to know please what is Betfair's policy regarding App. writers using this JSON score feed ?

                They may look favourably on it as its just a few hundred bytes to download this zipped JSON string, compared to a 700k download of the full page.

                Is anyone else using this live score feed ?

                Regards Geoff
                Hi Geoff,

                Have you got any further detail regarding this json feed?

                What's the endpoint etc? Is the request parametrised?

                How are you using it?

                Comment

                Working...
                X