# User Agent Generator API

> User Agent Generator creates realistic user agent strings for desktop, mobile, and tablet devices. Each request outputs the complete string with parsed browser and operating system names and versions, while paid plans add engine and CPU details.

**Endpoint:** `GET https://api.apiverve.com/v1/useragentgenerator`  
**Category:** Data Generation  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/useragentgenerator

## Overview

User Agent Generator works by generating a random user agent string based on the browser, operating system, and device. It returns the generated user agent string in a structured format. Agents are drawn from a list of real browser traffic, weighted toward the most common ones, and Chrome, Edge, Firefox and Opera builds more than six major versions behind the newest in the list are left out, since outdated browsers are a common bot signal.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/useragentgenerator?device=desktop&browser=chrome&os=windows" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `device` | string | No | The device type: desktop, mobile (phones) or tablet. default desktop. One of: desktop, mobile, tablet |
| `browser` | string | No | Only user agents of this browser. One of: chrome, firefox, safari, edge, opera, samsung |
| `os` | string | No | Only user agents of this operating system. iPads send the macOS desktop user agent. One of: windows, macos, linux, chromeos, android, ios |

## Response fields

- `ua` — string · Complete user agent string representing browser environment
- `browser` — object
  - `browser.name` — string · Name of the browser (e.g., Chrome, Firefox, Safari)
  - `browser.version` — string · Full browser version number including all segments
  - `browser.major` — string · Major version number of the browser
- `engine` — object
  - `engine.name` — string · JavaScript engine name (e.g., Blink, WebKit, Gecko) · (premium)
  - `engine.version` — string · JavaScript engine version number · (premium)
- `os` — object
  - `os.name` — string · Operating system name (e.g., Windows, macOS, Linux)
  - `os.version` — string · Operating system version number
- `device` — object · Device information object containing vendor and model details · (premium)
- `cpu` — object · CPU architecture and processor information · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "ua": "Mozilla/5.0 (Windows NT 6.4) AppleWebKit/537.36.0 (KHTML, like Gecko) Chrome/94.0.0.0 Safari/537.36.0",
    "browser": {
      "name": "Chrome",
      "version": "94.0.0.0",
      "major": "94"
    },
    "engine": {
      "name": "Blink",
      "version": "94.0.0.0"
    },
    "os": {
      "name": "Windows",
      "version": "10"
    },
    "device": {},
    "cpu": {}
  }
}
```

## Use cases

- **Web Scraping Rotation** — Rotate header strings across crawler requests by passing mobile or desktop targets to mimic different visitors and reduce detection.
- **Cross Browser QA** — QA engineers feed randomized browser versions and operating systems into automated test suites to verify responsive UI rendering without physical devices.
- **Analytics Parser Benchmarking** — To test telemetry parsers, supply generated strings into internal pipelines to check whether software accurately detects incoming browser and operating system families.
- **Honeypot Client Simulation** — When staging decoy network services, configure mock client sessions with realistic tablet and desktop signatures to inspect incoming bot behavior.

## SDKs

- **npm** — `npm install @apiverve/useragentgenerator` (https://www.npmjs.com/package/@apiverve/useragentgenerator)
- **PyPI** — `pip install apiverve-useragentgenerator` (https://pypi.org/project/apiverve-useragentgenerator/)
- **NuGet** — `dotnet add package APIVerve.API.UserAgentGenerator` (https://www.nuget.org/packages/APIVerve.API.UserAgentGenerator)
- **Source** — https://github.com/apiverve/useragentgenerator-api

## More

- Full reference: https://docs.apiverve.com/ref/useragentgenerator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
