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. Additionally, you can access the client's browser name, version, and type. You can also pass a user agent string to retrieve the parsed information directly.
User Agent API provides the facility to parse the user agent string and extract key information about the client's system. It identifies the operating system (OS) name, its version, and brand, along with the CPU manufacturer. Additionally, the API offers insights into the browser data, including its name, version, and type. All relevant system and browser details are included in the response.
1{
2 "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",
3 "name": "Safari",
4 "type": "Browser",
5 "version": "9.0.2",
6 "version_major": "9",
7 "device": {
8 "name": "Apple Macintosh",
9 "type": "Desktop",
10 "brand": "Apple",
11 "cpu": "Intel"
12 },
13 "engine": {
14 "name": "AppleWebKit",
15 "type": "Browser",
16 "version": "601.3.9",
17 "version_major": "601"
18 },
19 "operating_system": {
20 "name": "Mac OS",
21 "type": "Desktop",
22 "version": "10.11.2",
23 "version_major": "10.11",
24 "build": "??"
25 }
26}User Agent API detects bots, crawlers, and potential attackers by analyzing user agent strings. It helps filter unwanted traffic, prevent scraping, and mitigate security threats by identifying automated systems, ensuring a safer, more secure, and reliable user experience.
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)'1{
2 "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)",
3 "name": "Googlebot",
4 "type": "Robot Mobile",
5 "version": "2.1",
6 "version_major": "2",
7 "device": {
8 "name": "Google",
9 "type": "Robot Mobile",
10 "brand": "Google",
11 "cpu": "Unknown"
12 },
13 "engine": {
14 "name": "Googlebot",
15 "type": "Robot",
16 "version": "537.36",
17 "version_major": "537"
18 },
19 "operating_system": {
20 "name": "Google Cloud",
21 "type": "Cloud",
22 "version": "6.0.1",
23 "version_major": "6",
24 "build": "??"
25 }
26}Our User Agent API allows you to efficiently parse up to 50,000 user agent strings at once, streamlining the process of analyzing large volumes of user data. It saves your time and effort by providing comprehensive insights into the system, device, and browser details from your bulk user agent data.
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)"
]
}'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&fields=location&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'1{
2 "ip": "149.40.62.5",
3 "location": {
4 "continent_code": "NA",
5 "continent_name": "North America",
6 "country_code2": "US",
7 "country_code3": "USA",
8 "country_name": "United States",
9 "country_name_official": "United States of America",
10 "country_capital": "Washington, D.C.",
11 "state_prov": "Washington",
12 "state_code": "US-WA",
13 "district": "King",
14 "city": "Seattle",
15 "locality": "Seattle",
16 "accuracy_radius": "5",
17 "confidence": "High",
18 "zipcode": "98104",
19 "latitude": "47.60357",
20 "longitude": "-122.32945",
21 "is_eu": false,
22 "country_flag":
23 "https://ipgeolocation.io/static/flags/us_64.png",
24 "geoname_id": "11386261",
25 "country_emoji": "🇺🇸"
26 },
27 "user_agent": {
28 "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",
29 "name": "Safari",
30 "type": "Browser",
31 "version": "9.0.2",
32 "version_major": "9",
33 "device": {
34 "name": "Apple Macintosh",
35 "type": "Desktop",
36 "brand": "Apple",
37 "cpu": "Intel"
38 },
39 "engine": {
40 "name": "AppleWebKit",
41 "type": "Browser",
42 "version": "601.3.9",
43 "version_major": "601"
44 },
45 "operating_system": {
46 "name": "Mac OS",
47 "type": "Desktop",
48 "version": "10.11.2",
49 "version_major": "10.11",
50 "build": "??"
51 }
52 }
53}You can retrieve the geolocation information for an IP address in the following languages:
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.
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. By leveraging the User Agent API, you can optimize marketing campaigns, improve targeting precision, and reduce costs, ensuring more effective use of your ad budget.
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.
Enrich every request with precise geolocation and real-time threat intelligence, delivered on a global edge with a 99.99% uptime SLA. Start free and scale when you’re ready.
Get the latest in geolocation tech, straight to your inbox.