[0] https://asnumber.tuxli.ch/asnumber/asnum?ip=2001:67c:99c::1
Another more manual method would be to look IP's up in bgp.he.net [2] but there are for sure rate limits. That site can give you all the IPv6/IPv4 CIDR blocks for each AS number. This site is very handy for spotting the shady netblock resellers.
[Edit] Here is an old apache module but I have never tested it and it appears to be unsupported. [3] There may be libraries to do this in LUA/Python/Rust.
Something else that you may find useful is this route summarization script that can merge CIDR blocks into their bigger block notation. [4]
[1] - https://askubuntu.com/questions/595403/how-to-find-the-asn-o...
[2] - https://bgp.he.net/
[3] - https://github.com/poeml/mod_asn
[4] - https://adrianpopagh.blogspot.com/2008/03/route-summarizatio...