The IP2Location.io connector lets your AI agent act in each user's IP2Location.io account. Each user connects their own IP2Location.io access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 4 tools.
- Tools
- 4
- What they doRead · write · destructive
- 3 · 1 · 03 read1 write0 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the IP2Location.io connection
In AgentKit > Connections, create an IP2Location.io connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'ip2locationio'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize IP2Location.io:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'ip2locationio_ip_lookup',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "ip2locationio"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize IP2Location.io:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="ip2locationio_ip_lookup",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their IP2Location.io credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolip2locationio_domain_whois_getLook up the WHOIS record of a domain name through IP2WHOIS.Read-onlyGet Domain WHOIS
Look up the WHOIS record of a domain name through IP2WHOIS. Returns domain, domain_id, status, create_date, update_date, expire_date, domain_age, whois_server, registrar, registrant, admin, tech and billing contacts, and nameservers. Use this for domain ownership and expiry. Use ip2locationio_hosted_domains_list for the domains on an IP address.
Inputs
domainstringrequired- Domain name to look up, without a protocol or path. Example: locaproxy.com.
ip2locationio_hosted_domains_listList the domain names hosted on an IP address.Read-onlyList Hosted Domains
List the domain names hosted on an IP address. Returns ip, total_domains, page, per_page, total_pages and domains. Use this to see what sites share a server. Increase page until total_pages to read them all.
Inputs
ipstringrequired- IPv4 or IPv6 address to look up. Example: 8.8.8.8.
pageinteger- Page of hosted domains to return. Defaults to the first page. Example: 1.
ip2locationio_ip_lookupLook up the geolocation, network and proxy details of one IPv4 or IPv6 address.Read-onlyLook Up IP Geolocation
Look up the geolocation, network and proxy details of one IPv4 or IPv6 address. Returns ip, country_code, country_name, region_name, city_name, latitude, longitude, zip_code, time_zone, asn, as and is_proxy; Starter, Plus and Security plans add ISP, domain, usage type, proxy, fraud score and more. Use this for one address. Use ip2locationio_ip_bulk_lookup for many addresses at once.
Inputs
ipstring- IPv4 or IPv6 address to look up. Defaults to the address making the request. Example: 8.8.8.8.
langstring- ISO 639-1 language for continent, country, region and city name translations. Plus and Security plans only; other plans return error 10004. Example: de.one of
arcsdadeenesetfifrgaitjakomsnlptrusvtrvizh-cnzh-tw
ip2locationio_ip_bulk_lookupLook up the geolocation, network and proxy details of many IP addresses in one request.WriteBulk Look Up IP Geolocation
Look up the geolocation, network and proxy details of many IP addresses in one request. Needs a paid IP2Location.io plan. Returns one result object per IP address with the same fields as a single lookup, limited to fields if you set it. Use this for a list of addresses. Use ip2locationio_ip_lookup for one address.
Inputs
ipsarrayrequired- IPv4 or IPv6 addresses to look up. Example: ["1.1.1.1", "2.2.2.2"]
fieldsstring- Comma-separated response fields to return, such as country_code, city_name, isp, proxy.is_vpn or time_zone_info.olson. Defaults to every field your plan includes. Example: country_code,city_name,isp,proxy.is_vpn.
No tools match.