Given a Salesforce Org Id, how can I determine the name and serverUrl to use with APIs?*
For example, given the Org Id 00DE00001234ooT I can get the Pod/Server identifier from the first character after the keyPrefix. In this case it is E, which I know is NA9.
There are some more details about the Pod identifier in the question What are Salesforce ID's composed of?
Why might this be useful? From the comments... If you have a Salesforce Username, Password and OrgId and want to establish a Salesforce Session it is useful to know if you are dealing with a Sandbox or Production/Dev org. You can use the Pod Id from the OrgId to determine if it is a Sandbox and then call the correct login URL (login.salesforce.com versus test.salesforce.com).
* this will not work correctly for orgs that were previously migrated to other instances as the OrgId will still reference the original pod.