Browser Agent
The 'Browser Agent' API allows a browser agent to be identified as a web browser, a web robot or a mobile device.
Important: You will need an API key to use this API. Register for a free account here.
Features:
- browser agent type ( browser / bot / mobile )
Usage
Post a JSON array containing an api_key and and ip_address to http://msapi.com/browser_agent
{"api_key":"abcdefghijklmnopqrstuvwxyz","browser_agent":"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;)"}
Sample outputs
The resulting output is a JSON array containing the original browser agent and the browser agent type
{"response":{"browser_agent":"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;)","browser_agent_type":"web_browser"}}
{"response":{"browser_agent":" Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) ","browser_agent_type":"web_robot"}}
Parameters
| Preference | Default Value | Options | Description |
|---|---|---|---|
| api_key | Required | None | Your API Key |
| browser_agent | Required | None | A browser agent string |
Error codes
| Error notice | Cause |
|---|---|
| Error, Invalid API Key | An invalid API key has been passed to the API |
| Error, Missing API Key | No API Key has been passed to the API |
| Error, Missing browser agent string | No browser agent has been passed to the API |
| Error, Missing API Key & browser agent string | Neither an API Key nor a browser agent string have been passed to the API |