User Agent API and Client Environment Detection
Our User Agent API provides detailed client system information, allowing for the detection of bots, crawlers, and potential attackers on your website. It offers parsed data, including the operating system's name, type, and version, as well as the device name and CPU brand. You can also get the browser's name, version and type, or pass a user agent string to retrieve the parsed information directly.
User Agent String Lookup
The User Agent API parses a user agent string into the browser, device, layout engine and operating system behind it. The response gives the browser or bot name, type and version, the device name, type, brand and CPU, the engine name and version, and the OS name, version and build. Send the string in the User-Agent header or as JSON in a POST request.
{
"user_agent_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
"name": "Chrome",
"type": "Browser",
"version": "58.0.3029.110",
"version_major": "58",
"device": {
"name": "Desktop",
"type": "Desktop",
"brand": "Unknown",
"cpu": "Intel x86_64"
},
"engine": {
"name": "Blink",
"type": "Browser",
"version": "58.0",
"version_major": "58"
},
"operating_system": {
"name": "Windows NT",
"type": "Desktop",
"version": "10.0",
"version_major": "10",
"build": "??"
}
}Detecting Bots, Crawlers and Attackers
The User Agent API spots bots, crawlers and attack sources in the user agent string and names them, for example Googlebot with the type Robot Mobile. Use it to filter automated traffic and scraping before it reaches your app.
curl -X GET 'https://api.ipgeolocation.io/v3/user-agent?apiKey=API_KEY' \
-H 'User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'{
"user_agent_string": "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
"name": "Googlebot",
"type": "Robot Mobile",
"version": "2.1",
"version_major": "2",
"device": {
"name": "Google",
"type": "Robot Mobile",
"brand": "Google",
"cpu": "Unknown"
},
"engine": {
"name": "Googlebot",
"type": "Robot",
"version": "??",
"version_major": "??"
},
"operating_system": {
"name": "Google Cloud",
"type": "Cloud",
"version": "??",
"version_major": "??",
"build": "??"
}
}Parse Bulk UA Strings at Once
Send up to 50,000 user agent strings in one POST request. Each string comes back with the same browser, device, engine and operating system fields as a single lookup, at 1 credit per parsed string. Bulk parsing is available on paid plans.
curl -X POST 'https://api.ipgeolocation.io/v3/user-agent-bulk?apiKey=API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"uaStrings": [
"Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36",
"Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+",
"Mozilla/5.0 (Linux; U; en-US) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) Version/4.0 Kindle/3.0 (screen 600x800; rotate)"
]
}'Combine User Agent API with IP Geolocation API
Enhance your insights by combining the User Agent API with the IP Geolocation API. This allows you to retrieve detailed user agent information, such as browser and system specs, along with precise geolocation data of the client requesting your website. You can also customize the response by specifying or omitting certain fields as needed.
curl -X GET 'https://api.ipgeolocation.io/v3/ipgeo?apiKey=API_KEY&ip=8.8.8.8&include=user_agent' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9'{
"ip": "8.8.8.8",
"user_agent": {
"user_agent_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9",
"name": "Safari",
"type": "Browser",
"version": "9.0.2",
"version_major": "9",
"device": {
"name": "Apple Macintosh",
"type": "Desktop",
"brand": "Apple",
"cpu": "Intel"
},
"engine": {
"name": "AppleWebKit",
"type": "Browser",
"version": "601.3.9",
"version_major": "601"
},
"operating_system": {
"name": "Mac OS",
"type": "Desktop",
"version": "10.11.2",
"version_major": "10.11",
"build": "??"
}
},
"location": {
"continent_code": "NA",
"continent_name": "North America",
"country_code2": "US",
"country_code3": "USA",
"country_name": "United States",
"country_name_official": "United States of America",
"country_capital": "Washington, D.C.",
"state_prov": "California",
"state_code": "US-CA",
"district": "Santa Clara",
"city": "Mountain View",
"zipcode": "94043-1351",
"latitude": "37.42240",
"longitude": "-122.08421",
"is_eu": false,
"country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
"geoname_id": "6301403",
"country_emoji": "🇺🇸"
},
"country_metadata": {
"calling_code": "+1",
"tld": ".us",
"languages": [
"en-US",
"es-US",
"haw",
"fr"
]
},
"network": {
"connection_type": "",
"route": "8.8.8.0/24",
"is_anycast": true,
"is_cdn": false,
"cdn_provider_name": ""
},
"currency": {
"code": "USD",
"name": "US Dollar",
"symbol": "$"
},
"asn": {
"as_number": "AS15169",
"organization": "Google LLC",
"country": "US",
"type": "HOSTING",
"domain": "google.com",
"date_allocated": "2000-03-30",
"rir": "ARIN"
},
"company": {
"name": "Google LLC",
"type": "HOSTING",
"domain": "google.com"
},
"time_zone": {
"name": "America/Los_Angeles",
"offset": -8,
"offset_with_dst": -7,
"current_time": "2026-10-29 03:33:56.900-0700",
"current_time_unix": 1793270036.9,
"current_tz_abbreviation": "PDT",
"current_tz_full_name": "Pacific Daylight Time",
"standard_tz_abbreviation": "PST",
"standard_tz_full_name": "Pacific Standard Time",
"is_dst": true,
"dst_savings": 1,
"dst_exists": true,
"dst_tz_abbreviation": "PDT",
"dst_tz_full_name": "Pacific Daylight Time",
"dst_start": {
"utc_time": "2026-03-08 TIME 10:00",
"duration": "+1.00H",
"gap": true,
"date_time_after": "2026-03-08 TIME 03:00",
"date_time_before": "2026-03-08 TIME 02:00",
"overlap": false
},
"dst_end": {
"utc_time": "2026-11-01 TIME 09:00",
"duration": "-1.00H",
"gap": false,
"date_time_after": "2026-11-01 TIME 01:00",
"date_time_before": "2026-11-01 TIME 02:00",
"overlap": true
}
}
}Use Cases
Traffic Analysis and Trend Monitoring
Analyze the type of traffic coming to your website by examining which devices are more frequently used to access your content. This understanding enables you to make data-driven decisions to enhance the user experience on those platforms at scale, ensuring that your content is optimized for the preferences and behaviors of your audience.
Advertising and Marketing Analysis
Gain valuable insights by analyzing your website traffic to identify device types most likely to engage with your ads. Display targeted ads tailored to different platforms, and showcase premium ads on high-end devices for better engagement. Use the User Agent API to split traffic by device and browser, and stop paying for bot clicks.
Bug Report Submission
Easily collect detailed bug reports from your customers across any platform, automatically gathering parsed information about their device, browser, and operating system. Pinpoint the root cause of issues on the user's end system for faster and more efficient problem resolution.
Ready to get started? Add the User Agent API to your stack today
Parse user agent strings to identify browsers, devices, operating systems, and bots with a simple API. Start free and get the insights you need to build better user experiences and smarter traffic analysis.