When I make apple juice, what's in the foam on top?
The foam is probably made up of various proteins and carbohydrates.   If you have a refractometer, you can collect some of the foam and let the bubbles fall down, and then put it on the measuring window of the refractometer, just like you would use it for the must for a wine or wort for a beer.