Bot detector (UA)

The Bot Detect (UA) API identifies bots using a comprehensive database of suspicious user-agents, returning detection results in JSON or plain text
10ms

About

The Bot Detect (UA) API accurately identifies bots and automated scripts by analyzing their User-Agent strings against an extensive, continuously updated database of gray and blacklisted user-agents. The API returns either a plain-text result or a structured JSON response, clearly indicating bot detection status, ensuring effective filtering and security enhancements for web applications
by GLOBUS.studio

Endpoint

				
					/**
 * Bot Detect (UA) API
 * GET https://api.globus.studio/v2/bot_ua?user_agent=...&format=json|plain
 * Response (json): { "bot": "true" | "false" }
 * Response (plain): true | false | empty UA
 */

async function checkBot(userAgent, format = 'json') {
    const url = new URL('https://api.globus.studio/v2/bot_ua');
    url.searchParams.set('user_agent', userAgent);
    url.searchParams.set('format', format);

    const res = await fetch(url);
    return format === 'json' ? (await res.json()).bot === 'true' : (await res.text()).trim() === 'true';
}

// Bot UA
checkBot('WebCrawler').then(isBot => console.log('Is bot:', isBot));

// Real browser UA
checkBot('Mozilla/5.0 (Windows NT 10.0; Win64; x64)').then(isBot => console.log('Is bot:', isBot));