how to check for iPhone battery replacement eligibility under warranty? In the Apple Store they have a special software program that will check the remaining strength of your battery, and replace it under AppleCare warranty if it goes beneath 80%. Is there any way to check that on my own short of calling them and having them rerun the tests over the phone? It's not totally clear how the figures are actually calculated.
Call Apple or request an evaluation from their support web site. They are the final judge of warranty status and can run a check on your device remotely - generally while you wait.

The API to get that data is private and generally doesn't work on iOS - Is there an iPhone app (as opposed to desktop software) that shows actual battery cycles - cycles number

You can use computers to get FCC and cycle counts - How to figure out iOS device battery health?

Whether you can get the 80% value like apple isn't guaranteed with that data since I believe they read far more internal counters and often offer a replacement even when you aren't at 80% in many cases.