Smart URLs

Here is an example API documentation for the endpoint used for checking visitors status of Smart URLs.

REQUEST

Endpoint

https://stopbot.net/api/shortlink?apikey={APIKEY}&ip={IP}&keyname={keyname from Stopbot Smart URLs}&ua={url-encode-useragent}&url={url-encode-url}

Method

GET

Parameters

  • apikey (string, required): The API key provided to the user.

  • ip (string, required): The IP address of the visitor.

  • keyname (string, required): The keyname obtained from STOPBOT.NET Smart URLs.

  • ua (string, required): The useragent used by the visitor.

  • url (string, required): The URL opened by the visitor, REQUEST_URI from your website or APP).

Example Request

curl "https://stopbot.net/api/shorterlink?apikey=9ca6f45b2e9821b3a964c0f79cb67dc3&ip=1.1.1.1&keyname=44CSRK&ua=Mozilla%2F5.0%20%28Windows%20NT%2010.0%3B%20Win64%3B%20x64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F113.0.0.0%20Safari%2F537.36&url=some_script.php%3Fid%3D1"

Example Response

Success Response

If the HTTP response is 200 (success response), it will generate the following response:

{
  "IP": "1.1.1.1",
  "IPInfo": {
    "hostname": "",
    "asn": 13335,
    "company": "Cloudflare, Inc.",
    "isp": "Cloudflare, Inc.",
    "city": "Marble Bar",
    "district": "East Pilbara",
    "region": "Western Australia",
    "postcode": "",
    "country": "AU",
    "latitude": -20.5,
    "longitude": 120.15,
    "timezone": "Australia\/Perth"
  },
  "IPStatus": {
    "isBot": 1,
    "BlockAccess": 1,
    "ThreatURL": 0,
    "DetectActivity": "BLOCKED BY IP DATABASE."
  },
  "UA": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/113.0.0.0 Safari\/537.36",
  "redirectTo": "STOPBOTNET 404",
  "jsResponse": "0",
  "status": "success",
  "timeResponse": "2023-07-21 04:17:49"
}

Description on successful response

  • IP: The visitor's IP address.

  • IPInfo: Information about the visitor's IP.

    • hostname: The visitor's hostname.

    • asn: The Autonomous System Number (ASN) that identifies the internet service provider.

    • company: The company associated with the visitor's IP.

    • isp: The Internet Service Provider (ISP) name.

    • city: The city where the visitor is located.

    • district: The district or area associated with the IP address.

    • region: The region where the visitor is located.

    • postcode: The postal code associated with the IP address.

    • country: The country where the visitor is located.

    • latitude: The latitude coordinate of the IP address location.

    • longitude: The longitude coordinate of the IP address location.

    • timezone: The timezone of the IP address location.

  • IPStatus: Information about the visitor's IP status.

    • isBot: Indicates whether the visitor is a bot (1) or not (0).

    • BlockAccess: Indicates whether access is blocked (1) or not (0).

    • ThreatURL: Indicating whether the visitor is performing suspicious actions on your URL, result true (1) or false (0).

    • DetectActivity: Describes the visitor's status. There are 13 possible statuses:

      1. BLOCK BY IP DATABASE

      2. BLOCK BY MALICIOUS ACTIVITY

      3. BLOCK BY HOSTNAME DATABASE

      4. BLOCK BY PROXY/VPN/TOR

      5. BLOCK BY COUNTRY

      6. BLOCK BY IP NON-ISP

      7. BLOCK BY SPIDER CRAWLER

      8. BLOCK BY THREAT URL

      9. BLOCK BY INVALID KEYNAME (This notification will be redirected to the BLOCKER panel.)

      10. BLOCK BY DEVICE DESKTOP

      11. BLOCK BY DEVICE MOBILE

      12. BLOCK BY BLACKLIST IP (USER)

      13. ALLOW BY WHITELIST IP (USER)

      14. VISITOR

  • UA: The useragent used by the visitor.

  • redirectTo: Proceeding to the page that the all visitor will receive.

  • jsResponse: The setting in STOPBOT.NET Smart URLs for JavaScript is enabled (1) or disabled (0).

  • status: Indicates the success or failure of the request.

  • timeResponse: Date and time when the response was sent.

Failed Response

If the HTTP response is 400 or 401 (failed response), it will generate the following response:

{
  "status": "failed",
  "timeResponse": "2023-06-8 23:00"
}

Description on failed response:

  • status: Response Status: The value is "failed" if the request fails.

  • timeResponse: Date and time when the response was sent.

To determine the result of JavaScript identification, whether it is active or not in the panel, we need you to update the result to us (such as the ShortenerLink app that you can download by clicking here). Please note that we will not count this API request usage towards your total usage. Additionally, the response we can receive for the js = 1 parameter is as follows.

Endpoint

https://stopbot.net/api/shortlink?apikey={APIKEY}&ip={IP}&keyname={keyname from Stopbot Smart URLs}&js=1

Method

GET

Parameters

  • apikey (string, required): The API key provided to the user.

  • ip (string, required): The IP address of the visitor.

  • keyname (string, required): The useragent used by the visitor.

  • js (string, required): Set '1' for active JavaScript. We only accept a value of '1' to determine if visitors are using JavaScript.

Example Request

CURL "https://stopbot.net/api/shortlink?apikey=9ca6f45b2e9821b3a964c0f79cb67dc3&ip=1.1.1.1&keyname=44CSRK&js=1"

Example Response

Success Response

If the HTTP response is 200 (success response), it will generate the following response:

{
  "status": "success",
  "AddVisitorStatus": 1,
  "timeResponse": "2023-06-8 23:00"
}

Description on successful response

  • status: Indicates the success or failure of the request.

  • AddVisitorStatus: If the update of JavaScript to your IP on the keyname in your Smart URLs is successful, the result will be success (1); otherwise, it will be failure (0).

  • timeResponse: Date and time when the response was sent.

Failed Response

If the HTTP response is 400 (failed response), it will generate the following response:

{
  "status": "failed",
  "timeResponse": "2023-06-8 23:00"
}

Description on failed response:

  • status: Response Status: The value is "failed" if the request fails.

  • timeResponse: Date and time when the response was sent.

Last updated