This article references the legacy version of our API (v2). Our newest API version (v3) was released on Sep. 7, 2022 and is available for Enterprise users.
Please feel free to contact email@example.com for more details.
In order not to get confused by different stats reported, make sure you are using the same parameters, modes and targets for your queries:
In above examples I analysed target ahrefs.com in 'subdomains' mode and got the same numbers for both requests.
Moreover, it is worth mentioning that API data is currently available for Live index only, so consider that when comparing results as well.