Rules
JustAPIDX provides an API to create and execute specified actions based on certain pre defined rules
Make sure to sign up for a Free API key
here
to
test these examples.
Example Request
Following example request will help us know to whether the request came from a metro city or not.curl "https://justapidx.com/api/data?APIKey=test&dataType=geolocation,asn,carrier,languages,timezone,threat,useragent&IPAddress=42.106.216.176&triggerIds=78172636235497"
Sample Response
{
"IPAddress": "42.106.216.176",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
"geolocation_data": {
"city": "Mumbai",
"region": "maharashtra",
"region_code": "MH",
"country": "India",
"country_code": "IN",
"continent": "Asia",
"continent_code": "AS",
"postal": "400072",
"is_european_union": false,
"latitude": 19.0748,
"longitude": 72.8856,
"dialing_code": "91",
"emoji_flag": "๐ฎ๐ณ",
"emoji_unicode": "U+1F1EE U+1F1F3"
},
"asn_data": {
"as_number": 38266,
"as_name": "Vodafone India Ltd.",
"route": "42.106.0.0/15",
"isp": "VODAFONE INDIA LTD.",
"domain": "vodafone.in",
"usage_type": "MOB"
},
"carrier_data": {
"carrier_name": "Vodafone India",
"mcc": "404",
"mnc": "01"
},
"languages_data": [
{
"name": "Hindi",
"native": "เคนเคฟเคจเฅเคฆเฅ"
},
{
"name": "English",
"native": "English"
}
],
"timezone_data": {
"time_zone_name": "Asia/Kolkata",
"time_zone_abbr": "IST",
"time_zone_offset": "+0530",
"time_zone_is_dst": false,
"time_zone_current_time": "2021-11-06T12:42:28+05:30"
},
"threat_data": {
"is_tor": false,
"is_bogon": false,
"threat": "-",
"vpn": false,
"is_proxy": false,
"is_blacklisted": false,
"is_malware": false,
"is_bot": false,
"is_spam_bot": false,
"is_web_crawler": false,
"crawler_name": "NA",
"incl_rec": false
},
"useragent_data": {
"browser_name": "Chrome",
"browser_version": "87.0.4280",
"browser_version_major": "87",
"os_name": "Linux",
"os_version": "0.0.0",
"device_name": "Other",
"device_version": "0.0.0",
"device_type": "desktop",
"is_mobile": false
},
"new_fields": {
"errors": [],
"isMetroCity": "true"
},
"count": 5
}
Examples
Replace 'test' with your API Keyvar request = new XMLHttpRequest();
request.open('GET', 'https://justapidx.com/api/data?APIKey=test&dataType=geolocation,asn,carrier,languages,timezone,threat,useragent&IPAddress=42.106.216.176&triggerIds=78172636235497');
request.setRequestHeader('Accept', 'application/json');
request.onreadystatechange = function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
};
request.send();
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "https://justapidx.com/api/data?APIKey=test&dataType=geolocation,asn,carrier,languages,timezone,threat,useragent&IPAddress=42.106.216.176&triggerIds=78172636235497")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
require 'uri'
require 'net/http'
url = URI("https://justapidx.com/api/data?APIKey=test&dataType=geolocation,asn,carrier,languages,timezone,threat,useragent&IPAddress=42.106.216.176&triggerIds=78172636235497")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
All calls must be made to the https endpoint. No requests will
be served over unsecured HTTP.