{
  "openapi": "3.1.0",
  "info": {
    "title": "User Agent Parser API",
    "version": "1.0.0",
    "description": "Browser, engine, OS, device and CPU from any User-Agent string, or from the caller's own.\n\nParse any User-Agent string into structured details — browser, rendering engine, operating system, device (vendor/model/type), and CPU architecture. Pass a string explicitly or let it read the caller's own User-Agent header.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/user-agent.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/user-agent-parser"
  },
  "servers": [
    {
      "url": "https://api-user-agent.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Tools",
      "description": "User Agent Parser API belongs to the Tools category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/parse": {
      "get": {
        "operationId": "parseUserAgent",
        "summary": "Parse User Agent",
        "description": "Parse User Agent endpoint of the User Agent Parser API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/user-agent-parser/parse-user-agent"
        },
        "parameters": [
          {
            "name": "ua",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",
                  "browser": {
                    "name": "Mobile Safari",
                    "version": "17.0",
                    "major": "17"
                  },
                  "engine": {
                    "name": "WebKit",
                    "version": "605.1.15"
                  },
                  "os": {
                    "name": "iOS",
                    "version": "17.0"
                  },
                  "device": {
                    "vendor": "Apple",
                    "model": "iPhone",
                    "type": "mobile"
                  },
                  "cpu": {}
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}