Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Thread Tools Search this Thread Display Modes
Old 1st July 2020, 07:45 AM
thorns thorns is offline
Join Date: Aug 2007
Posts: 490
Default Betfair API data

Asking a bit of a favour or guidance. I have just downloaded this years horse racing historical data via betfair and it comes as a *.tar file.

Is there a simple way to convert this to open in excel?
Reply With Quote
Old 1st July 2020, 10:48 AM
walkermac walkermac is offline
Join Date: Nov 2013
Posts: 763

A .tar file is a compressed archive of multiple individual files. You can use something like the free program 7Zip to extract it. The Betfair .tar file is composed of .bz2 files, which are themselves compressed, so they'll have to be extracted once again to get the base JSON file. *phew*!

There's a bit more info here: https://betfair-datascientists.gith...storicDataSite/.

There are JSON to CSV converters to subsequently get the data into Excel.

Another option that may suit your purposes is this tool from Betfair, which seems to automate the process:

*NB - this is theory from me, haven't done it myself.
Reply With Quote
Old 3rd July 2020, 07:52 AM
thorns thorns is offline
Join Date: Aug 2007
Posts: 490

thanks, managed to extract it all, seems like there is a lot of data still missing though when I get it into excel so will need to go back through it seems, not sure if I need to run some script to piece everything back together once extracted.
Reply With Quote
Old 11th July 2020, 01:26 PM
chook chook is offline
Join Date: Jan 2019
Posts: 21

While you can use a number of third-party applications like 7-Zip and PeaZip, sometimes these applications don’t play well with files created on another platform, and they’re slow to uncompressed a large number of files. However, Windows 10 includes native support for tar that you can use with Command Prompt to extract these files. Also, you can even use the Windows Subsystem for Linux (WSL) that brings native support for Ubuntu, Fedora, and SUSE, and therefore you can also access many Linux tools, including tar to quickly extract content from tarballs.

windows has native tar
mm unix
tar -xf filename.tar

start .. command prompt .. run as admin

Open Start.

Search for Command Prompt, right-click the first result and select the Run as administrator option.

Type the following command to use tar to extract the files and press Enter:


hope that does it for you
Reply With Quote
Old 12th July 2020, 08:10 AM
UselessBettor UselessBettor is offline
Join Date: Sep 2011
Posts: 1,602


The betfair historical data isn't going to be very useful unless you are looking at trading and trying to plot the distribution of prices.

It could be useful to get some historical data to line up with other data you have as well but that isn't great unless you are just using the BSP prices.

How are you intending to use the data?
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump

All times are GMT +10. The time now is 06:34 AM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655