View as Markdown
IP2Location icon

IP2Location ACTION

Query IP address

Query IP address using IP2Location API. See the docs here for how to use this API.
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's IP2Location account once, then configure and run Query IP address from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "ip2location-query-ip-info",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    ip2location: { authProvisionId: "apn_xxxxxxx" },
    ipAddress: "IP Address",
    wsPackage: "Package",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Query IP address inputs
Property Type Description
ipAddress IP Address string
IP address (IPv4 or IPv6) for reverse IP location lookup purposes.
Required
wsPackage Package string
Web service package of different granularity of return information. Please refer to the pricing table in our documentation for the information returned.
Required
format Response Format string
Format of the response message. Available values are json or xml. If unspecified, json format will be used for the response message.
Optional
language Translation Language string
Translation information. The translation is only applicable for continent, country, region and city name for the addon package.
Optional
addon Addon string[]
Extra information in addition to the above-selected package. Please refer to the pricing table in our documentation for the information returned. You can query for multiple addons by putting a comma at between of them, for example continent,country. Valid value: continent, country, region, city, geotargeting, country_groupings, time_zone_info
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
ip2location-query-ip-info
Version
0.0.4
App
IP2Location
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes