Get your IP

Save your IP information for further usage.

100.26.176.111

IP Details For Developers

Oftentimes developers are required to obtain IP related details for different application scopes, either for tracking, validation and/or authorization. Paid services usually provide those details via an exposed endpoints that developers can leverage to obtain the information, but the endpoints are ofter restricted after a number of requests. Carepoi Hub provides a free endpoint that can be leveraged completely free and incorporates additional snippets for you to use, boosting productivity and flexibility across multiple programming languages.


Details & Usage

Details Value
Request Method GET
Payload Not required.
Request URL https://apps.carepoi.com/v2/html/api/ip.php
Response
{
    "ip": "84.254.47.28",
    "dns": "adsl-28.84.254.47.tellas.gr",
    "location": "Athens, Attica, Greece",
    "latitude": "37.9842",
    "longitude": "23.7353",
    "browser": " ",
    "os": null,
    "language": "en-US,en;q=0.9",
    "connection_type": "keep-alive",
    "referrer": "Direct",
    "screen_resolution": "Unknown",
    "time_human": "2024-05-15 09:37:17",
    "time_unix": 1715765837
}
Python

import requests

url = 'https://apps.carepoi.com/v2/html/api/ip.php'
response = requests.get(url)
print(response.json())
C++

#include <iostream>
#include <curl/curl.h>

int main() {
    CURL *curl;
    CURLcode res;
    std::string url = "https://apps.carepoi.com/v2/html/api/ip.php";

    curl_global_init(CURL_GLOBAL_ALL);
    curl = curl_easy_init();
    if (curl) {
        curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
        res = curl_easy_perform(curl);
        if (res != CURLE_OK) {
            std::cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << std::endl;
        }
        curl_easy_cleanup(curl);
    }
    curl_global_cleanup();

    return 0;
}
Java

import java.net.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        String url = "https://apps.carepoi.com/v2/html/api/ip.php";
        URL obj = new URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
        con.setRequestMethod("GET");
        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String inputLine;
        StringBuffer response = new StringBuffer();
        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();
        System.out.println(response.toString());
    }
}
Rust

extern crate reqwest;

fn main() {
    let url = "https://apps.carepoi.com/v2/html/api/ip.php";
    let client = reqwest::blocking::Client::new();
    let response = client.get(url).send().unwrap();
    let json = response.json().unwrap();
    println!("{:?}", json);
}
Ruby

require 'net/http'
require 'uri'
require 'json'

url = URI.parse('https://apps.carepoi.com/v2/html/api/ip.php')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true if url.scheme == 'https'

request = Net::HTTP::Get.new(url.request_uri)
response = http.request(request)
puts JSON.parse(response.body)
JavaScript

fetch('https://apps.carepoi.com/v2/html/api/ip.php', {
    method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Go

package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {
    url := "https://apps.carepoi.com/v2/html/api/ip.php"
    req, _ := http.NewRequest("GET", url, nil)
    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)
    fmt.Println(string(body))
}