User Agent API Documentation

Just add your API KEY





v3

HTTP response codes to indicate API errors

JSON is returned by all API responses, including errors

HTTPS support

CURL support

HTTP
http or https
APIKEY
Unique account identifier received after signup
USERAGENT
urlencoded() Useragent string
https://useragentapi.com/api/v3/json/APIKEY/USERAGENT



Example Request GET


https://useragentapi.com/api/v3/json/APIKEY/CCBot%2F2.0+%28http%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29
Success Response JSON

{
    "error": {
        "code": "useragent_not_found",
        "message": "Useragent Not Found"
    }
}



Errors


The API makes use of standard HTTP errors to indicate the success or failure of a request. The 2xx series of response codes indicate a success, 4xx indicates an error from the client side, and a 5xx error indicates a server side error. Here are the HTTP response codes the API utilizes:

  • 200 - OK Everything worked as expected.
  • 400 - Bad Request The request was unacceptable, often due to missing a required parameter.
  • 404 - Not Found The requested resource doesn't exist.
  • 500 - Internal Server Error Something went wrong on our end.
Error Response JSON

{
    "error": {
        "code": "useragent_not_found",
        "message": "Useragent Not Found"
    }
}

Error Messages

  • type_invalid - API response type invalid, must be json
  • key_invalid - API Key Invalid
  • useragent_invalid - Useragent Invalid
  • useragent_not_found - Useragent Not Found