# useragent

> GET https://api.yescaptcha.com/useragent returns the browser User-Agent to use (plain text). The userAgent field of hCaptcha tasks accepts only this value.

Source: https://docs.yescaptcha.com/en/api/useragent/ · Last verified: 2026-10-15

`/useragent` returns the browser User-Agent we currently recommend, as plain text. It needs no `clientKey` and is free. The `userAgent` field of [hCaptcha](https://docs.yescaptcha.com/en/tasks/hcaptcha/) tasks accepts only this value, and using it when you visit the target site also helps tokens pass.

- GET `https://api.yescaptcha.com/useragent` (Global endpoint)
- GET `https://cn.yescaptcha.com/useragent` (China endpoint)

## Example

```bash
curl -s https://api.yescaptcha.com/useragent
```

Response (value on 2026-10-15; it changes with browser releases):

```text
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36
```

-   The value changes over time. Don’t hard-code it; fetch it when your program starts.
-   If a result contains a `userAgent`, submit the token with that value.
