kyuurzy

Detail Info IP

Oct 9th, 2025
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.58 KB | Source Code | 0 0
  1. const fetch = require("node-fetch")
  2.  
  3. async function getIPInfo(ipAddress) {
  4.   const response = await fetch(`https://db-ip.com/demo/home.php?s=${ipAddress}`, {
  5.     headers: {
  6.       'Accept': '*/*',
  7.       'X-Requested-With': 'XMLHttpRequest',
  8.       'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36',
  9.       'Referer': 'https://db-ip.com/'
  10.     }
  11.   });
  12.  
  13.   const result = await response.json();
  14.   return result;
  15. }
  16.  
  17. const ipInfo = await getIPInfo("1.1.1.1");
  18. console.log(JSON.stringify(ipInfo, null, 2));
Tags: Scrape
Advertisement
Add Comment
Please, Sign In to add comment