DDiwigo API

User Agent Parser API

Browser, version, operating system, device type and bot detection from a user agent. Without a value, parses the caller's own user agent.

What is it?

The Diwigo user agent API reads a browser user agent and returns the browser, version, operating system, device type and whether it is a bot.

It answers with JSON and is included in the free plan: 10,000 requests per API key and per month.

Example request

GET https://landing.diwigo.com/api/?key=YOUR_API_KEY&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2018_1%20like%20Mac%20OS%20X)

Parameters

ParameterDescription
keyYour API key (required)
uaUser agent string (optional)

Code examples

cURL
curl "https://landing.diwigo.com/api/?key=YOUR_API_KEY&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2018_1%20like%20Mac%20OS%20X)"
JavaScript
const res = await fetch("https://landing.diwigo.com/api/?key=YOUR_API_KEY&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2018_1%20like%20Mac%20OS%20X)");
const data = await res.json();
console.log(data);
PHP
<?php
$response = file_get_contents("https://landing.diwigo.com/api/?key=YOUR_API_KEY&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2018_1%20like%20Mac%20OS%20X)");
$data = json_decode($response, true);
print_r($data);
Python
import requests

response = requests.get("https://landing.diwigo.com/api/?key=YOUR_API_KEY&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2018_1%20like%20Mac%20OS%20X)")
print(response.json())

Use cases

  • Analytics without heavy libraries
  • Adapt pages to mobile or desktop
  • Detect bots in logs

User agent parser: questions and answers

What does the User agent parser API do?

The Diwigo user agent API reads a browser user agent and returns the browser, version, operating system, device type and whether it is a bot.

How do I call the User agent parser API?

Send a GET request to https://landing.diwigo.com/api/?key=YOUR_API_KEY&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2018_1%20like%20Mac%20OS%20X) with your own API key instead of YOUR_API_KEY. It answers with JSON.

Is the User agent parser API free?

Yes, it is included in the free plan: 10,000 requests per API key and per calendar month, shared by all Diwigo endpoints. Higher limits are available on request.