Skip to content
Bot & Threat Detection

Bot definition (IP)

The bot detection API checks whether an IP belongs to a known crawler or bot range. Returns a flag and the operator name, with no User-Agent involved.

GET https://api2.globus.studio/v2/bot_ip

Reference

Parameters

Name Type Required Description
ip string yes IPv4 or IPv6 address.
format string no plain or json. Default: plain.
is_bbcs bool no Legacy internal mode: return only the bot name. Default: false.

Example request

curl -s "https://api2.globus.studio/v2/bot_ip?ip=8.8.8.8&format=json"
Open documentation

bot detector

The bot detector checks an address against reverse DNS and the crawler lists. It returns a flag and a name when the network belongs to a known bot. The result describes the network, not the client that claims to be there.

What the bot detector returns

The JSON body has bot_detect and bot_name. A hit looks like {"bot_detect":true,"bot_name":"google"}. A miss returns false and undefined. The plain response is the bot name or undefined, and an invalid IP returns Invalid IP.

curl "https://api2.globus.studio/v2/bot_ip?ip=66.249.66.1&format=json"

Why the network is the first signal

A User-Agent string is easy to copy. The network is harder. A residential address that claims to be Googlebot is suspicious. A hosting address that sends a browser string is also worth a look. The bot detector gives the network side, and the UA endpoint gives the claim.

Reverse DNS and caching

The check uses reverse DNS and the crawler lists. PTR results are cached for one hour. The endpoint does not write to the lists; the old self-learning behaviour is disabled. Lists are refreshed by php bin/cron.php botip, so a new crawler can be missing until the next run.

What a hit does not prove

A match means the address is in a known range. It does not prove that the request is friendly or that the same client sent an earlier request. A shared hosting range can contain a crawler and a scraper. A miss does not prove a person is on the other side.

What to do with a hit

Raise or lower a rate limit, add a challenge or write a log line. Do not block on the flag alone. A crawler that respects robots.txt and loads assets is different from a script that hits the same search URL every second. Keep the decision proportional and review it after a week of real traffic.

Verify before you allow

If you grant a crawler a higher budget, verify the range first. Search engines publish their address ranges. A request from outside those ranges should not get the crawler budget even when the User-Agent matches. The bot detector helps, and the published list confirms it.

ASN, hosting and a score

Two addresses can be in the same country and behave very differently. One belongs to a home connection, the other to a cloud provider. The network owner and the hosting flag separate them. A login from a hosting range is more suspicious than a login from a residential range in the same city.

A simple score makes the decision visible. Start at zero. Add one for a bot hit, one for a hosting address and one for a mismatch between the claim and the network. A low score passes, a middle score gets a challenge and a high score gets a review. The numbers are yours; the point is to write them down and adjust them after real traffic.

Limits

The list ages, and new crawlers appear. A bot detector hit on a shared hosting range is weaker than a hit on a range that only one operator uses. The call is fast and rate limited. Cache the result per address for a few hours. A bot detector call on every request adds a network hop to the critical path, so keep it out of the hot loop or cache the answer.

Pair the bot detector with the bot detector UA for the claimed identity and the Tor detector for anonymized traffic. The bot detection guide covers scoring and policy.

Further reading: Google, verifying Googlebot.

Custom work

Need an API that does not exist yet?

Describe the task and the response format. We will estimate the endpoint, the integration and the maintenance.

Start a conversation