There's not an API directly, but https://www.howlongtobeatsteam.com looks promising. It's got an API that you can use to cache your (or all) games. Zapier might be able to do it as well w/ this scraper: https://www.npmjs.com/package/howlongtobeat (disclosure, I work at Zapier).
I used to have a CLI that would trigger a Zapier webhook that would use [this CLI app](https://github.com/xavdid/zapier-igdb) to populate data into Airtable, but I actually moved the whole process to [Airtable Apps](https://airtable.com/marketplace) since I could customize the UI a little more. I've been meaning to open source it, but it's pretty customized so I'm not sure if it'd be widely useful.
I'm curious to see where you end up with this though! It's something I've put a lot of thought into.
Time to beat is a very difficult metric. Does a Visual Novel take 10 hours to beat, or 2 minutes? I'd argue the latter, but I know plenty of people would disagree with me.
"Alright," says the webadmin, "I'll just implement a voting system and take the average". But now they'll be claiming that it takes 5 hours and 1 minute to beat, which everyone disagrees with.
The best system I've seen is SteamHunters' "Shortest/Median/Average", which gives you a pretty reliable indicator of what's possible, what's typical, and how much of a difference there is between optimal and casual play, respectively. It's by far the most comprehensive dataset out there, but unfortunately only mono-platform so probably not too useful for sites like igdb.