My apologies for not responding sooner; I cannot post from my work computer so I have to wait until I get home.
The short answer is "it depends".
If your car is modern, it will use OBD2 running on CANbus. If so, Carloop can do the job, or at least most of it.
If you look here, there is some good information on the OBD2 PIDs:
You can see the Fuel Tank Level is Service 01 PID 2F. It is a percentage, so you can calculate the change in fuel level between the beginning and end of the trip if you know the capacity of the tank of your car.
There is another way of doing it by calculation based on the mass air flow (MAF) and integrating over time.
If you need help with further detail, then let us know here.