Actions3
- IP Lookup Actions
Overview
This node integrates with the IPstack API to retrieve geolocation and related data about IP addresses. Specifically, the "Check Requester IP" operation fetches geolocation information for the IP address of the requester (the machine or service making the API call). This is useful in scenarios where you want to automatically detect and log the location or security details of the client accessing your workflow without manually specifying an IP.
Practical examples include:
- Automatically tagging incoming requests with geographic metadata.
- Enhancing security workflows by checking if the requester's IP has any associated threats.
- Localizing content or services based on the detected location of the requester.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | A collection of optional parameters: |
| - Fields | Comma-separated list of specific fields to return from the IPstack API response. |
| - Language | Language code for the API response; options include Chinese, English, French, German, Japanese, Portuguese (Brazil), Russian, Spanish. Default is English. |
| - Enable Hostname Lookup | Boolean flag to include hostname information in the response. |
| - Enable Security Module | Boolean flag to include security threat information in the response. |
Note: For the "Check Requester IP" operation, no IP address input is required since it automatically uses the requester's IP.
Output
The node outputs a JSON object containing the IP geolocation data returned by the IPstack API for the requester’s IP address. The structure includes standard geolocation fields such as country, city, latitude, longitude, and optionally hostname and security threat details if enabled.
If additional fields are specified, only those fields will be included in the output.
Binary data is not produced by this node.
Example output JSON snippet (simplified):
{
"ip": "203.0.113.195",
"country_name": "United States",
"region_name": "California",
"city": "Los Angeles",
"latitude": 34.0522,
"longitude": -118.2437,
"hostname": "example-hostname.com", // if hostname lookup enabled
"security": { // if security module enabled
"is_proxy": false,
"threat_level": "low"
}
}
Dependencies
- Requires an API key credential for the IPstack service.
- The node makes HTTP GET requests to the IPstack API endpoint, using HTTPS or HTTP depending on the credential configuration.
- No other external dependencies.
Troubleshooting
Error: "Maximum of 50 IPs per request."
This error occurs if more than 50 IP addresses are provided in bulk lookup operations. For "Check Requester IP," this does not apply.API Errors from IPstack:
If the API returns an error (e.g., invalid API key, quota exceeded), the node throws an error with details from the IPstack response. Check that the API key is valid and has sufficient permissions.Empty or Unexpected Response:
Ensure that the IPstack API credentials are correctly configured and that the IPstack service is reachable from your environment.Language or Field Parameters Not Working:
Verify that the language codes and field names conform to IPstack API documentation.