UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 4.17 kB
{"openapi":"3.0.1","servers":[{"url":"https://api.ip2location.com/v2"}],"info":{"contact":{"x-twitter":"ip2location"},"description":"IP2Location web service providing a service to do a reverse lookup of an IP address to an ISO3166 country code, region or state, city, latitude and longitude, ZIP/Postal code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, usage type, address type and IAB category. There are also 7 categories of additional add-on response fields supported such as metro, olson time zone, translations and more. Refer to https://www.ip2location.com/web-service/ip2location for further information.","title":"IP2Location IP Geolocation","version":"1.0","x-apisguru-categories":["location"],"x-logo":{"url":"https://twitter.com/ip2location/profile_image?size=original"},"x-origin":[{"converter":{"url":"https://github.com/mermade/oas-kit","version":"7.0.4"},"format":"openapi","url":"https://api.swaggerhub.com/apis/ip2location/ip2location-ip-geolocation/1.0","version":"3.0"}],"x-providerName":"ip2location.com","x-serviceName":"geolocation"},"paths":{"/":{"get":{"description":"Get geolocation information via IP address","parameters":[{"description":"Web service package of different granularity of return information.","in":"query","name":"package","schema":{"enum":["WS1","WS2","WS3","WS4","WS5","WS6","WS7","WS8","WS9","WS10","WS11","WS12","WS13","WS14","WS15","WS16","WS17","WS18","WS19","WS20","WS21","WS22","WS23","WS24","WS25"],"type":"string"}},{"description":"Extra information in addition to the above selected package.","explode":false,"in":"query","name":"addon","schema":{"example":"continent,country","items":{"enum":["continent","country","region","city","geotargeting","country_groupings","time_zone_info"],"type":"string"},"type":"array"}},{"description":"IP address (IPv4 or IPv6) for reverse IP location lookup purpose. If not present, the server IP address will be used for the location lookup.","in":"query","name":"ip","required":true,"schema":{"example":"8.8.8.8","type":"string"}},{"description":"Format of the response message.","in":"query","name":"format","schema":{"enum":["json","xml"],"type":"string"}},{"description":"Translation information. The translation only applicable for continent, country, region and city name for the addon package.","in":"query","name":"lang","schema":{"enum":["ar","cs","da","de","en","es","et","fi","fr","ga","it","ja","ko","ms","nl","pt","ru","sv","tr","vi","zh-cn","zh-tw"],"type":"string"}},{"description":"API Key. Please sign up free trial license key at ip2location.com","in":"query","name":"key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json; charset=utf-8":{"examples":{"0":{"value":"{\"country_code\":\"\",\"country_name\":\"\",\"region_name\":\"\",\"city_name\":\"\",\"latitude\":\"\",\"longitude\":\"\",\"zip_code\":\"\",\"time_zone\":\"\",\"isp\":\"\",\"domain\":\"\",\"net_speed\":\"\",\"idd_code\":\"\",\"area_code\":\"\",\"weather_station_code\":\"\",\"weather_station_name\":\"\",\"mcc\":\"\",\"mnc\":\"\",\"mobile_brand\":\"\",\"elevation\":\"\",\"usage_type\":\"\",\"address_type\":\"\",\"category\":\"\",\"category_name\":\"\",\"continent\":{\"name\":\"\",\"code\":\"\",\"hemisphere\":\"\",\"translations\":\"\"},\"country\":{\"name\":\"\",\"alpha3_code\":\"\",\"numeric_code\":\"\",\"demonym\":\"\",\"flag\":\"\",\"capital\":\"\",\"total_area\":\"\",\"population\":\"\",\"currency\":\"{\"code\":\"\",\"name\":\"\",\"symbol\":\"\"}\",\"language\":\"{\"code\":\"\",\"name\":\"\"}\"\",\"idd_code\":\"\",\"tld\":\"\",\"translations\":\"\"},\"region\":{\"name\":\"\",\"code\":\"\",\"translations\":\"\"},\"city\":{\"name\":\"\",\"translations\":\"[]\"},\"geotargeting\":{\"metro\": \"\"},\"country_groupings\":{\"acronym\":\"\",\"name\": \"\"},\"time_zone_info\":{\"olson\":\"\",\"current_time\":\"\",\"gmt_offset\":\"\",\"is_dst\":\"\",\"sunrise\":\"\",\"sunset\":\"\"}}"}},"schema":{"type":"string"}}},"description":"Get response from IP lookup"}}}}}}