-
Notifications
You must be signed in to change notification settings - Fork 5
/
geo-js.yaml
62 lines (62 loc) · 1.9 KB
/
geo-js.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
openapi: 3.0.0
info:
title: GeoJS API
description: Provides endpoints for retrieving country, geo, and PTR information about an IP address
version: 1.0.0
servers:
- url: https://get.geojs.io/v1
paths:
/ip/country.json:
get:
summary: Get country information about an IP
description: Get country information about an IP
operationId: getCountryInfoFromIP
parameters:
- in: query
name: ip
description: |
The IP address to retrieve country information for. Example - 1.1.1.1,8.8.8.8
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
ip:
type: string
description: The requested IP address
example: "8.8.8.8"
country:
type: string
description: Two-letter country code
example: "US"
country_3:
type: string
description: Three-letter country code
example: "USA"
name:
type: string
description: Country name in English
example: "United States"
/ip/geo.json:
get:
summary: Get geographical information about an IP
description: Get geographical information about an IP
operationId: getGeoInfoFromIP
parameters:
- in: query
name: ip
description: The IP address to retrieve geographical information for. Example 1.1.1.1,8.8.8.8
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: object