Getting the most recent builds via API

From https://travis-ci.org/phpseclib/benchmarks/branches you can see the latest builds for each branch. If I hover over one of the check marks (or exes, if the build failed) I get a URL like https://travis-ci.org/phpseclib/benchmarks/builds/606747051 where the 606747051 is presumably the build #.

My question is how can I get the build # of the most recent builds for each branch in my repo?

I tried to an HTTP GET request to https://api.travis-ci.com/repo/phpseclib%2Fbenchmarks/builds but that returned a lot of data. I did Ctrl + F to search for the build # (606747051) and didn’t find anything so that doesn’t seem that helpful. And I’m seeing 21 builds when I only have 7 branches.

I guess I can also write a screen scrapper to do it. I can parse the HTML at https://travis-ci.org/phpseclib/benchmarks/branches but since an API exists I’d just assume use that.

Any ideas?