Device-Analyze API — User-Agent 감지 | YEB

모든 User-Agent 문자열에서 브라우저, 운영체제, 기기 유형 및 봇을 감지합니다. 쿠키 없이 실시간 분석, A/B 타겟팅 및 봇 필터링을 구동하세요.

무엇을 할 수 있나요?
실시간 분석

쿠키 없이 기기 및 브라우저별로 트래픽을 분석합니다.

스마트 A/B 타겟팅

모바일과 데스크톱 사용자에게 다른 레이아웃을 제공합니다.

봇 필터링

합법적인 브라우저를 사칭하는 악성 크롤러를 감지합니다.

라이브 테스트
99.9 % 가동 시간
93.4ms 응답
20 req/s
0.002 크레딧 / 요청

Inspect UA


POST https://api.yeb.to/v1/device-analyze
매개변수유형필수설명
api_key string Your API key
ua string 선택 User-Agent string (defaults to caller UA)

예시

curl -X POST https://api.yeb.to/v1/device-analyze \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "ua"     : "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)..."
}'

응답 예시

{
  "data": {
    "ua_string": "Mozilla/5.0 …",
    "browser": { "name": "Mobile Safari", "version": "17.0" },
    "engine":  { "name": "WebKit", "version": "617" },
    "os":      { "name": "iOS", "version": "17.0" },
    "device":  { "type": "mobile", "brand": "Apple", "model": "iPhone" },
    "is_mobile": true,
    "is_tablet": false,
    "is_bot": false,
    "is_desktop": false
  }
}
{"error":"Missing User-Agent string","code":422}

응답 코드

코드설명
200 Success요청 처리 완료.
400 Bad Request입력 유효성 검사 실패.
401 UnauthorizedAPI 키 누락 또는 오류.
403 Forbidden키 비활성 또는 허용되지 않음.
429 Rate Limit요청이 너무 많습니다.
500 Server Error예기치 않은 오류.

Inspect

device-analyze 0.0020 credits

Parameters

API Key
query · string · required
User-Agent
query · string

Code Samples


                
                
                
            

Response

Status:
Headers

                
Body

                

Device-Analyze API — User-Agent 감지 | YEB — Practical Guide

A hands-on guide to classifying browsers and devices from User-Agent strings. Learn when to send the UA, how to read the output, and what decisions to make in production (security, analytics, UX).

#What Device-Analyze solves

This endpoint parses a User-Agent (UA) string and returns browser, engine, OS, device and bot signals, plus convenient booleans (is_mobile, is_desktop, …). Use it to tailor UX (mobile vs desktop layouts), segment analytics, or flag suspicious UAs.

Works even if you don’t send ua: the API falls back to the current request’s User-Agent header.

#Endpoints & when to use them

# POST /v1/device-analyze

  • Best for: All UA parsing use-cases. Single, simple endpoint.
  • How it works: Provide a ua string (optional). If omitted, we read the request header.
  • Common uses: Feature flags (e.g., disable heavy effects on mobile), funnel analysis, anti-fraud heuristics.

#Quick start

curl -X POST "https://api.yeb.to/v1/device-analyze" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -d '{
    "api_key": "<YOUR_API_KEY>",
    "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
  }'
// JS Fetch example (Node/Browser)
await fetch("https://api.yeb.to/v1/device-analyze", {
  method: "POST",
  headers: {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "X-API-Key": "<YOUR_API_KEY>"
  },
  body: JSON.stringify({
    api_key: "<YOUR_API_KEY>",
    ua: navigator.userAgent // or a server-provided UA
  })
}).then(r => r.json()).then(console.log);

#Parameters that actually matter

Param Required Practical guidance Why it matters
ua No Send the exact UA you want analyzed. If omitted, we’ll use the request header. Gives you control (e.g., batch-analyze stored logs) and avoids proxy/header quirks.
api_key or X-API-Key Yes Either include in JSON payload or in header (preferred: header). Authentication. Header keeps keys out of logs more safely.

#Reading & acting on responses

You typically read data.browser, data.os, data.device, and boolean flags like is_mobile.

{
  "data": {
    "ua_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ... Chrome/141.0.0.0 Safari/537.36",
    "browser": { "name": "Chrome", "version": "141.0.0.0", "vendor": null },
    "engine":  { "name": "Blink",  "version": null },
    "os":      { "name": "Windows","version": "10.0" },
    "device":  { "type": "desktop","brand": null,"model": null },
    "bot": null,
    "is_mobile": false,
    "is_tablet": false,
    "is_bot": false,
    "is_desktop": true
  },
  "response_code": 200,
  "response_time_ms": 118
}

#Key signals & decisions

  • is_mobile / is_tablet / is_desktop — pick layout, image sizes, feature flags.
  • bot object — treat as crawler: skip animations, block login, different rate limits.
  • browser.version — gate advanced features (e.g., WebGPU) behind minimum versions.
  • device.type — “mobile”, “tablet”, “desktop”, etc. for coarse segmentation.

#Errors you might see

HTTPWhenWhat to do
422 UA missing and no User-Agent header. Send ua explicitly or ensure your proxy forwards the header.
401/403 Invalid/missing API key. Place the key in X-API-Key header.

#Practical recipes

  • Mobile-first UI: if is_mobile → reduce bundle, enable compact nav, lazy-load heavy widgets.
  • Fraud hardening: if is_bot or UA looks impossible (e.g., iOS + Edge legacy) → challenge or block.
  • Analytics buckets: group by device.type and os.name for clean dashboards.

#Troubleshooting & field notes

  1. Empty vendor/version: some UA strings are intentionally reduced. Don’t fail hard; fall back to booleans.
  2. Proxy chains: ensure your edge forwards User-Agent unchanged if you rely on header fallback.
  3. Batch analysis: always pass ua explicitly to avoid environment/header differences.

#More response examples

Android Mobile (Chrome)
{
  "data": {
    "ua_string": "Mozilla/5.0 (Linux; Android 10; K) ... Chrome/138.0.0.0 Mobile Safari/537.36",
    "browser": { "name": "Chrome", "version": "138.0.0.0", "vendor": null },
    "engine":  { "name": "Blink", "version": null },
    "os":      { "name": "Android", "version": "10" },
    "device":  { "type": "mobile", "brand": null, "model": null },
    "bot": null,
    "is_mobile": true,
    "is_tablet": false,
    "is_bot": false,
    "is_desktop": false
  }
}

#API Changelog

2025-10-20
Normalized bot details (name, category, url) and hardened UA fallback to request header when no ua param is sent.
2025-10-15
Improved OS / device detection for Android 9–13 and desktop Linux distributions; added convenience booleans.
2025-10-05
Initial public release of Device-Analyze v1.

자주 묻는 질문

오픈소스 WhichBrowser 데이터베이스를 기반으로 하며, 새로운 기기와 엔진에 대해 매주 업데이트됩니다.

아니요 – 메트릭용으로 해시화합니다. 원시 값은 파싱 직후 즉시 폐기됩니다.

예. 오류가 발생한 요청을 포함하여 모든 요청은 크레딧을 소비합니다. 크레딧은 성공 또는 실패와 관계없이 요청 수에 연결됩니다. 오류가 당사 플랫폼 문제로 인한 것이 분명한 경우 영향을 받은 크레딧을 복원합니다(현금 환불 없음).

[email protected]로 문의하세요. 피드백을 진지하게 받아들입니다—버그 리포트나 기능 요청이 의미 있는 경우 API를 빠르게 수정하거나 개선하고 감사의 표시로 50 무료 크레딧을 제공합니다.

API와 때로는 엔드포인트에 따라 다릅니다. 일부 엔드포인트는 외부 소스의 데이터를 사용하며 더 엄격한 제한이 있을 수 있습니다. 남용을 방지하고 플랫폼 안정성을 유지하기 위해 제한도 적용합니다. 각 엔드포인트의 구체적인 제한은 문서를 확인하세요.

크레딧 시스템으로 운영됩니다. 크레딧은 API 호출과 도구에 사용하는 선불, 환불 불가 단위입니다. 크레딧은 FIFO(오래된 것부터) 방식으로 소비되며 구매일로부터 12개월간 유효합니다. 대시보드에 각 구매 날짜와 만료일이 표시됩니다.

예. 구매한 모든 크레딧(소수 잔액 포함)은 구매일로부터 12개월간 유효합니다. 미사용 크레딧은 유효 기간 종료 시 자동으로 만료되어 영구 삭제됩니다. 만료된 크레딧은 복원하거나 현금 또는 기타 가치로 전환할 수 없습니다. 경과 규칙: 2025년 9월 22일 이전에 구매한 크레딧은 2025년 9월 22일에 구매한 것으로 처리되어 2026년 9월 22일에 만료됩니다(구매 시 더 이른 만료일이 명시되지 않은 한).

예—유효 기간 내에서 이월됩니다. 미사용 크레딧은 계속 사용 가능하며 구매 후 12개월 만료까지 매월 이월됩니다.

크레딧은 환불 불가입니다. 필요한 만큼만 구매하세요—나중에 언제든 충전할 수 있습니다. 플랫폼 오류로 인해 청구가 실패한 경우 조사 후 영향을 받은 크레딧을 복원할 수 있습니다. 현금 환불 없음.

가격은 달러가 아닌 크레딧으로 설정됩니다. 각 엔드포인트에는 자체 비용이 있습니다—위의 "크레딧 / 요청" 배지를 참조하세요. 항상 정확한 지출 금액을 알 수 있습니다.
← API로 돌아가기