التوثيق / مرجع الواجهة
فحص عنوان IP
يفحص أي عنوان IPv4 أو IPv6 ويُرجع موقعه الجغرافي ومالك الشبكة والمنطقة الزمنية والعملة ومؤشرات الأمان.
نظرة عامة#
lookup/ip هي النظير الخلفي لـالموقع الجغرافي للزائر. فبدل قراءة عنوان المتصل، تمرّر العنوان المطلوب في المعامل ip. للاستجابة البنية نفسها: الموقع وasn وtimezone وcurrency وكتلة security التي تصف حركة البروكسي وTor والروبوتات والمُرحِّلات والاستضافة.
متى تستخدمه#
- افحص العنوان المسجَّل عند التسجيل أو الدخول أو الدفع من خادمك.
- أثرِ سجل التدقيق أو تذكرة الدعم بدولة المستخدم وشبكته.
- أعد تقييم العناوين المخزّنة في نظامك.
لفحص عدة عناوين دفعة واحدة راجع فحص عناوين IP بالجملة. وللمؤشرات التهديدية فقط بحمولة أصغر راجع سمعة عنوان IP.
قراءة النتيجة#
security.isProxyوsecurity.proxyTypeيبيّنان هل العنوان لخدمة VPN أو بروكسي أو ما شابه وما نوعها. البروكسي وحده إشارة ضعيفة؛ اجمعه مع أدلة أخرى كاختلاف الدولة عن عنوان الفوترة.security.isHostingتلميح قوي إلى الأتمتة لأن العملاء الحقيقيين نادرًا ما يتصفحون من نطاقات مراكز البيانات. أماisTorوisBotفأقوى.security.blacklistedيعكس قوائمك السوداء. وعند تطابق قاعدة أو إدخال في قائمة تُسرد التفاصيل فيsecurity.custom_rules_applied.zipCodeهو الرمز البريدي للموقع. يُطابَق باسم المدينة، وإلا بأقرب نقطة بريدية ضمن نحو 25 كم، فهو تقريب للمنطقة لا للشارع. ويكونnullحيث لا توجد بيانات بريدية (مثل معظم السعودية ومصر والإمارات).asn.emailوasn.phoneهما بيانات الاتصال المنشورة في سجل الشبكة، مع تفضيل جهتي الإساءة والدعم الفني. ويكونانnullإذا لم ينشر السجل أيًّا منهما أو تعذّر الوصول إليه.bogon: trueيعني عنوانًا خاصًا أو محجوزًا لا تستطيع Gurdx تحديد موقعه، فتحقق من العنوان الذي يمرره خادمك.- استخدم
paramsلطلب بعض الوحدات فقط؛ راجع تخصيص الوحدات.
ملاحظات#
- طلب واحد لكل استدعاء. وضع الاختبار (
mode=testأو مفتاحgx_test_) يُرجع بيانات وهمية مجانًا ولا يطلق أحداثًا. - مشمول في كل الباقات. وحدتا
securityوdeviceتحتاجان ميزتي الباقة المقابلتين. - يمكن لـالقواعد المخصصة في مجموعة IP اختبار الدولة والقارة والمنطقة والمدينة وASN وكل مؤشر أمني، وإضافة العنوان إلى قائمة سوداء أو بيضاء.
- يُطلَق حدث
suspicious_ipعند بلوغ الخطورة 50 من 100 ويُرسل إلى الويب هوك. - العنوان الفارغ أو غير الصحيح يُرجع الخطأ 112 (
invalid_ip) مع HTTP 200.
الطلب#
GET
https://gurdx.cretip.com/api/lookup/ip
- صادِق بمعامل key أو بترويسة Authorization: Bearer.
- تُحتسب طلباً واحداً.
- متاحة في: تجربة مجانية القياسية المميّزة الدفع حسب الاستخدام
المعاملات#
| الاسم | النوع | الوصف |
|---|---|---|
ip
مطلوب
استعلام |
string |
The ip command is used to specify the IP address you want to lookup. Expected values: an IP address (IPv4 or IPv6) Sample value: 1.1.1.1
|
params
اختياري
استعلام |
string |
The params command can be used to specify the required modules you want to get in the response. Expected values: security, currency, timezone, and/or location. Sample value: security,timezone,currency For more information please refer to Customize response modules.
|
تقبل كل خدمة أيضاً format, lang, mode, userID, callback. راجع الخيارات.
أمثلة برمجية#
curl -G "https://gurdx.cretip.com/api/lookup/ip" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "ip=1.1.1.1"
<?php
$response = file_get_contents('https://gurdx.cretip.com/api/lookup/ip?'.http_build_query(['key' => 'YOUR_API_KEY', 'ip' => '1.1.1.1']));
$result = json_decode($response, true);
if ($result['status'] === 'success') {
print_r($result['data']);
} else {
echo $result['code'].': '.$result['description'];
}
const params = new URLSearchParams({"key":"YOUR_API_KEY","ip":"1.1.1.1"});
const res = await fetch(`https://gurdx.cretip.com/api/lookup/ip?${params}`);
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.code, result.description);
}
import requests
res = requests.get("https://gurdx.cretip.com/api/lookup/ip", params={"key": "YOUR_API_KEY", "ip": "1.1.1.1"})
result = res.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["code"], result["description"])
الاستجابة#
نجاح#
{
"data": {
"ip": "165.227.149.217",
"ipType": "IPv4",
"IPNumber": 2783155673,
"bogon": false,
"continentName": "Europe",
"continentCode": "EU",
"countryCode": "DE",
"continentGeoNameID": 6255148,
"countryName": "Germany",
"countryGeoNameID": 2921044,
"regionName": "Hessen",
"cityName": "Frankfurt am Main",
"zipCode": "65931",
"latitude": "50.115520",
"longitude": "8.684170",
"location": {
"capital": "Berlin",
"population": 83783942,
"language": {
"name": "German",
"code": "de",
"native": "Deutsch"
},
"flag": {
"emoji": "🇩🇪",
"unicode": "U+1F1E9 U+1F1EA",
"png": {
"1000px": "https://gurdx.cretip.com/flags/png1000px/de.png",
"250px": "https://gurdx.cretip.com/flags/png250px/de.png",
"100px": "https://gurdx.cretip.com/flags/png100px/de.png"
},
"svg": "https://gurdx.cretip.com/flags/svg/de.svg"
},
"phoneCode": "49",
"countryIsEU": true,
"countryNeighbours": "CH,PL,NL,DK,BE,CZ,LU,FR,AT",
"tld": ".de"
},
"currency": {
"currencyName": "Euro",
"currencyCode": "EUR",
"currencySymbol": "€"
},
"asn": {
"asn": "AS14061",
"name": "DIGITALOCEAN-ASN",
"org": "DigitalOcean, LLC",
"phone": "+1-347-875-6044",
"email": "noc@digitalocean.com",
"domain": "digitalocean.com",
"created": "2012-05-14",
"type": "hosting"
},
"timezone": {
"name": "Europe/Berlin",
"abbreviation": "CET",
"offset": 3600,
"currentTime": "03:33:13",
"currentTimestamp": 1709519593,
"isDST": false,
"sunInfo": {
"sunset": "18:14:11",
"sunrise": "06:59:29",
"transit": "12:36:50",
"civilTwilightBegin": "06:28:47",
"civilTwilightEnd": "18:44:53",
"nauticalTwilightBegin": "05:51:20",
"nauticalTwilightEnd": "19:22:21",
"astronomicalTwilightBegin": "05:13:27",
"astronomicalTwilightEnd": "20:00:13",
"dayLength": "11:14:42"
}
},
"security": {
"isProxy": true,
"proxyType": "VPN",
"isTor": false,
"isBot": false,
"isRelay": false,
"isHosting": true,
"blacklisted": false
},
"custom_rules_applied": {
"total": 0,
"rules": []
}
},
"status": "success",
"executionTime": 4
}خطأ#
تُسلَّم الأخطاء بحالة HTTP 200 — افحص دائماً حقل status.
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}حقول الاستجابة#
| الاسم | النوع | الوصف |
|---|---|---|
data.ip |
string |
IP address you're looking up. |
data.ipType |
string |
Type of IP address (IPv4, or IPv6).
|
data.IPNumber |
integer |
Numeric representation of the IP address. |
data.bogon |
boolean |
Indicates if the IP address is a bogon. |
data.continentName |
string |
Name of the continent where the IP address is. |
data.continentCode |
string |
Code representation of the continent. |
data.countryCode |
string |
Code representation of the country in ISO-3166 format.
|
data.continentGeoNameID |
integer |
GeoName ID of the continent. |
data.countryName |
string |
Name of the country. |
data.countryGeoNameID |
integer |
GeoName ID of the country. |
data.regionName |
string |
Name of the region. |
data.cityName |
string |
Name of the city. |
data.zipCode |
string |
ZIP code of the location where the IP address belong. |
data.latitude |
string |
Latitude coordinate of the location. |
data.longitude |
string |
Longitude coordinate of the location. |
data.location.capital |
string |
Capital city of the country. |
data.location.population |
integer |
Population of the country. |
data.location.language.name |
string |
Official language of the country. |
data.location.language.code |
string |
Language code in ISO-639 format.
|
data.location.language.native |
string |
Native name of the language. |
data.location.language |
object |
— |
data.location.flag.emoji |
string |
Flag emoji representation. |
data.location.flag.unicode |
string |
Flag Unicode representation. |
data.location.flag.png.1000px |
string |
URL to 1000px PNG flag. |
data.location.flag.png.250px |
string |
URL to 250px PNG flag. |
data.location.flag.png.100px |
string |
URL to 100px PNG flag. |
data.location.flag.png |
object |
— |
data.location.flag.svg |
string |
URL to SVG flag. |
data.location.flag |
object |
— |
data.location.phoneCode |
string |
International dialing code for the country. |
data.location.countryIsEU |
boolean |
Indicates if the country is in the EU. |
data.location.countryNeighbours |
string |
List of neighboring countries' codes. |
data.location.tld |
string |
Top-level domain of the country. |
data.location |
object |
— |
data.currency.currencyName |
string |
Name of the currency. |
data.currency.currencyCode |
string |
Currency code in ISO-4217 format.
|
data.currency.currencySymbol |
string |
Symbol of the currency. |
data.currency |
object |
— |
data.asn.asn |
string |
Autonomous System Number. |
data.asn.name |
string |
Name of the ASN. |
data.asn.org |
string |
Organization associated with the ASN. |
data.asn.phone |
string |
Phone contact for the ASN. |
data.asn.email |
string |
Email contact for the ASN. |
data.asn.domain |
string |
Domain associated with the ASN. |
data.asn.created |
string |
Date of ASN creation. |
data.asn.type |
string |
Type of organization ("isp", "hosting", "business", "education", or "government"). |
data.asn |
object |
— |
data.timezone.name |
string |
Timezone name. |
data.timezone.abbreviation |
string |
Timezone abbreviation. |
data.timezone.offset |
integer |
Timezone offset from UTC. |
data.timezone.currentTime |
string |
Current time in the timezone. |
data.timezone.currentTimestamp |
integer |
Current timestamp in the timezone. |
data.timezone.isDST |
boolean |
Indicates if Daylight Saving Time is active. |
data.timezone.sunInfo.sunset |
string |
Sunset time. |
data.timezone.sunInfo.sunrise |
string |
Sunrise time. |
data.timezone.sunInfo.transit |
string |
Solar transit time. |
data.timezone.sunInfo.civilTwilightBegin |
string |
Civil twilight begin time. |
data.timezone.sunInfo.civilTwilightEnd |
string |
Civil twilight end time. |
data.timezone.sunInfo.nauticalTwilightBegin |
string |
Nautical twilight begin time. |
data.timezone.sunInfo.nauticalTwilightEnd |
string |
Nautical twilight end time. |
data.timezone.sunInfo.astronomicalTwilightBegin |
string |
Astronomical twilight begin time. |
data.timezone.sunInfo.astronomicalTwilightEnd |
string |
Astronomical twilight end time. |
data.timezone.sunInfo.dayLength |
string |
Length of the day. |
data.timezone.sunInfo |
object |
— |
data.timezone |
object |
— |
data.security.isProxy |
boolean |
Indicates if the IP address is a proxy service. |
data.security.proxyType |
string |
Type of proxy used. |
data.security.isTor |
boolean |
Indicates if accessed through Tor network. |
data.security.isBot |
boolean |
Indicates if the user is a bot. |
data.security.isRelay |
boolean |
Indicates if it's a Apple's Private Relay connection. |
data.security.isHosting |
boolean |
Indicates if the IP address belong to a hosting provider. |
data.security.blacklisted |
boolean |
Indicates if the IP address is blacklisted due to applying custom rules or were found in one of your blacklists. |
data.security.custom_rules_applied.total |
integer |
The total number of custom rules applied to this request. |
data.security.custom_rules_applied.rules.id |
string |
The rule ID as shown in the dashboard (e.g: CR104).
|
data.security.custom_rules_applied.rules.title |
string |
The rule title you set when creating the rule. |
data.security.custom_rules_applied.rules |
object |
The custom rules applied to this request, learn more. |
data.security.custom_rules_applied |
object |
The custom rules applied to this request, learn more. |
data.security |
object |
— |
data.status |
string |
Response status (success/error). |
data.executionTime |
integer |
Time taken to process the data (in milliseconds). |
data |
object |
— |
وجدت خطأ؟ أخبرنا عبر صفحة التواصل. تواصل معنا