Find My IPv4 Address¶
Overview¶
Returns the IPv4 address detected for the caller. The address is provided as a string in the preview field.
Endpoint¶
| Method | URL |
|---|---|
GET | https://api.apidatatools.com/find-my-ipv4-address |
Authentication¶
Include your API key in the x-api-key header:
x-api-key: YOUR_API_KEY
Headers¶
| Header | Type | Required | Default / values | Description |
|---|---|---|---|---|
x-api-key | string | Yes | None | API key used to authenticate the request. |
Request parameters¶
This endpoint does not require a request body or request parameters.
curl example¶
curl --request GET \
--url "https://api.apidatatools.com/find-my-ipv4-address" \
--header "x-api-key: YOUR_API_KEY"
Success response¶
A successful request returns HTTP 200 with the detected IPv4 address in preview.
{
"status": "success",
"preview": "203.0.113.10"
}
Error handling¶
Errors use an envelope containing status, error, request_id, and details.message. Additional fields may be included in details.
{
"status": "error",
"error": "IP_NOT_FOUND",
"request_id": "example-request-id",
"details": {
"message": "Could not extract IPv4 address from request."
}
}
| HTTP status | Error code | Description |
|---|---|---|
400 | IP_NOT_FOUND | The caller’s IPv4 address could not be determined. |
401 | UNAUTHORIZED | Authentication context is missing or invalid. |
404 | USER_NOT_FOUND | The account associated with the API key could not be found. |
429 | QUOTA_EXCEEDED | The account’s monthly request quota is exhausted. |
429 | RATE_LIMITED | The request rate limit has been exceeded. |
500 | PLAN_NOT_FOUND | The account’s plan configuration could not be found. |
500 | AUTH_ERROR | An unexpected authentication error occurred. |
500 | INTERNAL_ERROR | The request could not be processed. |
Quota and rate limits depend on the account plan. See tool limits.
Notes¶
- This endpoint uses
GET; do not send a request body orx-source-typeheader. previewcontains the caller’s detected IPv4 address.