Please help with phone lookup


I am building a service that allows one to check a phone numbers type. I know tele sign dot com has a phone ID features which will tell if the phone is VOIP or pre-paid, but I would like to start my own service. How is this being done? I’ve been researching for hours to no avail.