API Integrations

Integrate IP2FY with your favorite platforms and frameworks.

Programming Languages

🟨

JavaScript

Browser and Node.js integration

fetch('https://api.ip2fy.com/8.8.8.8')
  .then(res => res.json())
  .then(data => console.log(data))
View Guide →
🐍

Python

Django, Flask, and standalone

import requests
response = requests.get('https://api.ip2fy.com/8.8.8.8')
data = response.json()
View Guide →
🐘

PHP

Laravel, WordPress, and vanilla PHP

$response = file_get_contents('https://api.ip2fy.com/8.8.8.8');
$data = json_decode($response, true);
View Guide →

Java

Spring Boot and Java applications

URL url = new URL("https://api.ip2fy.com/8.8.8.8");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
View Guide →

Frameworks

⚛️

React

Hooks and component integration

const [ipData, setIpData] = useState(null);

useEffect(() => {
  fetch('https://api.ip2fy.com/')
    .then(res => res.json())
    .then(setIpData);
}, []);
View Guide →
💚

Vue.js

Composition API and Pinia store

const ipData = ref(null);

onMounted(async () => {
  const response = await fetch('https://api.ip2fy.com/');
  ipData.value = await response.json();
});
View Guide →
🅰️

Angular

Services and HTTP client

@Injectable({ providedIn: 'root' })
export class IpService {
  getLocation() {
    return this.http.get('https://api.ip2fy.com/');
  }
}
View Guide →

Next.js

Server-side rendering and API routes

export async function getServerSideProps() {
  const res = await fetch('https://api.ip2fy.com/');
  const data = await res.json();
  return { props: { data } };
}
View Guide →

Platforms

📝

WordPress

Plugin development and themes

$response = wp_remote_get('https://api.ip2fy.com/');
if (is_wp_error($response)) return;
$data = json_decode(wp_remote_retrieve_body($response), true);
View Guide →
🛒

Shopify

Theme and app development

fetch('https://api.ip2fy.com/')
  .then(res => res.json())
  .then(data => {
    // Use location data for shipping, taxes, etc.
  });
View Guide →
🛍️

Magento

Extension and module development

$client = new \GuzzleHttp\Client();
$response = $client->get('https://api.ip2fy.com/');
$data = json_decode($response->getBody(), true);
View Guide →
🛒

WooCommerce

E-commerce geolocation features

$response = wp_remote_get('https://api.ip2fy.com/' . $ip_address);
$data = json_decode(wp_remote_retrieve_body($response), true);
View Guide →

Cloud Platforms

☁️

AWS Lambda

Serverless function integration

const axios = require('axios');

exports.handler = async (event) => {
  const response = await axios.get('https://api.ip2fy.com/');
  return { statusCode: 200, body: JSON.stringify(response.data) };
};
View Guide →

Vercel

Edge functions and deployments

export default async function handler(req, res) {
  const response = await fetch('https://api.ip2fy.com/');
  const data = await response.json();
  res.status(200).json(data);
}
View Guide →
🌐

Netlify

Edge functions and forms

exports.handler = async (event, context) => {
  const response = await fetch('https://api.ip2fy.com/');
  const data = await response.json();

  return {
    statusCode: 200,
    body: JSON.stringify(data)
  };
};
View Guide →
🔥

Firebase

Cloud functions and Firestore

const functions = require('firebase-functions');
const fetch = require('node-fetch');

exports.getLocation = functions.https.onRequest(async (req, res) => {
  const response = await fetch('https://api.ip2fy.com/');
  const data = await response.json();
  res.json(data);
});
View Guide →

Libraries & SDKs

📡

Axios

HTTP client for browser and Node.js

const response = await axios.get('https://api.ip2fy.com/8.8.8.8');
console.log(response.data);
View Guide →
💜

jQuery

AJAX requests and DOM manipulation

$.get('https://api.ip2fy.com/', function(data) {
  console.log(data);
});
View Guide →
📟

cURL

Command line and system integration

curl -X GET "https://api.ip2fy.com/8.8.8.8" \
  -H "accept: application/json"
View Guide →
📮

Postman

API testing and documentation

GET https://api.ip2fy.com/8.8.8.8
Content-Type: application/json
View Guide →

Need Help with Integration?

Our documentation and support team are here to help you integrate IP2FY into your project.

arrow-to