Skip to main content
POST
/
mtr
cURL
curl --request POST \
  --url https://api.geekflare.com/mtr \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "https://example.com",
  "followRedirect": false,
  "proxyCountry": "us"
}
'
{
  "timestamp": 1763372588297,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "url": "siterelic.com",
    "redirectedURL": "https://example.com/",
    "test": {
      "id": "mxqx9v9y0742lap6altwdteqd28t23nq"
    },
    "proxyCountry": "United States",
    "followRedirect": true
  },
  "data": [
    {
      "hop": 1,
      "host": "240.192.18.19",
      "asn": "AS???",
      "loss": 0,
      "sent": 2,
      "last": 0.28,
      "avg": 0.29,
      "best": 0.28,
      "worst": 0.3,
      "stdDev": 0.01
    },
    {
      "hop": 2,
      "host": "240.0.60.49",
      "asn": "AS???",
      "loss": 0,
      "sent": 2,
      "last": 0.28,
      "avg": 0.29,
      "best": 0.28,
      "worst": 0.29,
      "stdDev": 0.01
    }
  ]
}

Authorizations

x-api-key
string
header
required

API Key required for all endpoints

Body

application/json
url
string
required

Target URL

Example:

"https://example.com"

followRedirect
boolean
default:false

Whether to follow redirects when checking site status

Example:

false

proxyCountry
string

Proxy country code to route the request

Example:

"us"

Response

MTR test completed successfully

timestamp
number
required

Timestamp of the request in milliseconds

Example:

1763372588297

apiStatus
enum<string>
required

API status message

Available options:
success,
failure
Example:

"success"

apiCode
number
required

API status code

Example:

200

meta
object
required

Metadata about the MTR test execution

data
object[]
required

Array of hop details observed in the MTR trace route

Example:
[
{
"hop": 1,
"host": "240.192.18.19",
"asn": "AS???",
"loss": 0,
"sent": 2,
"last": 0.28,
"avg": 0.29,
"best": 0.28,
"worst": 0.3,
"stdDev": 0.01
},
{
"hop": 2,
"host": "240.0.60.49",
"asn": "AS???",
"loss": 0,
"sent": 2,
"last": 0.28,
"avg": 0.29,
"best": 0.28,
"worst": 0.29,
"stdDev": 0.01
}
]