An API - or Application Program Interface - is a means of sharing data in a meaningful way to other users on the web. This API is a scaled down version of the service that BeliefMedia uses in numerous of our own applications.
If you're a BeliefMedia client and you're looking at API usage information, please login to the client panel on the BM website.
The LocateMyIP API is a RESTful service that provides only basic location data (in various formats) resolved from an IP address. Because the service is free and doesn't require registration, we've mitaged the potential for abuse by rate limiting unreasonable requests and we truncate various types of output.
Usage is simple.
[XX.XXX.XX.XXX] represents a valid IP address. Sample output is as follows:
As an unregistered user, output is fairly basic. Advanced features are unlocked with a key that we generally only make available to clients. Only XML output is available via the public API.
200 Status & Error Codes
If we successfully retrieve a result we'll allocate a status of 200. For anything other than a successful response, we'll include an error code and text message. The most common codes are 400 (bad request), 404 (not available) or 420 (slow down).
To mitigate potential abuse, we've implemented a simple means of rate limiting requests (error code 420). The error message will look something like this:
It's unlikely that you'll see a 420 code in the course of normal usage. If you require unrestricted usage, please let us know and we'll white-list you.