Phone Service Carriers Lookup by Phone Number

Looking for a FREE api or method of exactly how to lookup carrier service of a phone by using the phone number only. Does anyone have solutions. Not looking for the paid service or websites.

It may not be possible because of people can move their numbers to another service providers in most of the countries

actually it is, I can do it manually with hundreds of phone numbers I have, but I look up each old fashion email method, plus there are mountains of websites who do it. I want to be able to do it directly myself and not go through the service. Looking for that method.