Fink Telecom Services GmbH can provide you with a Web API to query HLRs to figure out to which network a specific number belongs to, if the number is active and valid.
Ask us for details.