Depending on what you need ip2location might fit. They have free versions that are country-level and sell more detailed versions as well.
We used them until we moved to fastly, which does iplocation stuff as part of their service.