Every whois service provides different option to specify which information you want. I have most experience with the RIPE database. There is a web interface available, but the most direct way to access the information is using the command line. You can request help using this command:
$ whois -h whois.ripe.net -- -h
There you can see the option that you need:
% -L, --all-less <ip-lookup>
% Returns all level less specific inetnum, inet6num or route(6)
% objects, including exact matches.
If I request information about my own address (yes, I am my own ISP):
$ whois -h whois.ripe.net -- '--all-less 37.77.56.75'
[...]
inetnum: 0.0.0.0 - 255.255.255.255
netname: IANA-BLK
descr: The whole IPv4 address space
[...]
inetnum: 37.0.0.0 - 37.255.255.255
netname: EU-ZZ-37
descr: RIPE NCC
descr: European Regional Registry
[...]
inetnum: 37.77.56.0 - 37.77.63.255
netname: NL-STEFFANN-20120201
descr: S.J.M. Steffann
[...]
inetnum: 37.77.56.64 - 37.77.56.127
netname: STEFFANN-OFFICE1
descr: S.J.M. Steffann Office
[...]
And you can see the whole hierarchy. The web interface shows exactly the same information.