-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabstract-api-ip-geolocation.yaml
More file actions
269 lines (269 loc) · 8.27 KB
/
abstract-api-ip-geolocation.yaml
File metadata and controls
269 lines (269 loc) · 8.27 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
openapi: 3.0.3
info:
title: Abstract API - IP Geolocation API
description: Geolocate any IPv4 or IPv6 address to country, region, city, coordinates, timezone, currency, and flag data covering 4 billion+ IP addresses across 250,000+ cities worldwide.
version: 1.0.0
contact:
url: https://www.abstractapi.com/
x-generated-from: documentation
servers:
- url: https://ipgeolocation.abstractapi.com/v1
description: IP Geolocation API v1
security:
- apiKey: []
tags:
- name: IP Geolocation
description: IP address geolocation operations
paths:
/:
get:
operationId: getIPGeolocation
summary: Abstract API Get IP Geolocation
description: Geolocate an IP address and retrieve location, timezone, currency, and flag data.
tags:
- IP Geolocation
parameters:
- name: api_key
in: query
description: Your unique API key for the IP Geolocation API.
required: true
schema:
type: string
example: abc123def456
- name: ip_address
in: query
description: IPv4 or IPv6 address to geolocate. If omitted, the request IP is used.
required: false
schema:
type: string
example: 8.8.8.8
- name: fields
in: query
description: Comma-separated list of top-level fields to return in the response.
required: false
schema:
type: string
example: city,region,country,latitude,longitude
responses:
'200':
description: Successful IP geolocation response
content:
application/json:
schema:
$ref: '#/components/schemas/IPGeolocationResponse'
examples:
getIPGeolocation200Example:
summary: Default getIPGeolocation 200 response
x-microcks-default: true
value:
ip_address: 8.8.8.8
city: Mountain View
city_geoname_id: 5375480
region: California
region_iso_code: CA
region_geoname_id: 5332921
postal_code: '94043'
country: United States
country_code: US
country_geoname_id: 6252001
country_is_eu: false
continent: North America
continent_code: NA
continent_geoname_id: 6255149
longitude: -122.0838
latitude: 37.386
security:
is_vpn: false
timezone:
name: America/Los_Angeles
abbreviation: PST
gmt_offset: -8
current_time: '2026-04-19 10:30:00'
is_dst: false
flag:
emoji: "🇺🇸"
unicode: U+1F1FA U+1F1F8
png: https://static.abstractapi.com/country-flags/US_flag.png
svg: https://static.abstractapi.com/country-flags/US_flag.svg
currency:
currency_name: US Dollar
currency_code: USD
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized - invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
securitySchemes:
apiKey:
type: apiKey
in: query
name: api_key
schemas:
IPGeolocationResponse:
type: object
description: IP geolocation response data
properties:
ip_address:
type: string
description: The queried IP address
example: 8.8.8.8
city:
type: string
description: City name
example: Mountain View
city_geoname_id:
type: integer
description: Geonames ID for the city
example: 5375480
region:
type: string
description: Region or state name
example: California
region_iso_code:
type: string
description: ISO region code
example: CA
region_geoname_id:
type: integer
description: Geonames ID for the region
example: 5332921
postal_code:
type: string
description: Postal or ZIP code
example: '94043'
country:
type: string
description: Country name
example: United States
country_code:
type: string
description: ISO 3166-1 alpha-2 country code
example: US
country_geoname_id:
type: integer
description: Geonames ID for the country
example: 6252001
country_is_eu:
type: boolean
description: Whether the country is in the EU
example: false
continent:
type: string
description: Continent name
example: North America
continent_code:
type: string
description: Continent code
example: NA
continent_geoname_id:
type: integer
description: Geonames ID for the continent
example: 6255149
longitude:
type: number
format: double
description: Longitude coordinate
example: -122.0838
latitude:
type: number
format: double
description: Latitude coordinate
example: 37.386
security:
$ref: '#/components/schemas/SecurityInfo'
timezone:
$ref: '#/components/schemas/TimezoneInfo'
flag:
$ref: '#/components/schemas/FlagInfo'
currency:
$ref: '#/components/schemas/CurrencyInfo'
SecurityInfo:
type: object
properties:
is_vpn:
type: boolean
description: Whether the IP is a known VPN
example: false
TimezoneInfo:
type: object
properties:
name:
type: string
description: IANA timezone name
example: America/Los_Angeles
abbreviation:
type: string
description: Timezone abbreviation
example: PST
gmt_offset:
type: integer
description: GMT/UTC offset in hours
example: -8
current_time:
type: string
description: Current local time
example: '2026-04-19 10:30:00'
is_dst:
type: boolean
description: Whether daylight saving time is active
example: false
FlagInfo:
type: object
properties:
emoji:
type: string
description: Flag emoji
example: "🇺🇸"
unicode:
type: string
description: Unicode code points for the flag
example: U+1F1FA U+1F1F8
png:
type: string
format: uri
description: URL to PNG flag image
example: https://static.abstractapi.com/country-flags/US_flag.png
svg:
type: string
format: uri
description: URL to SVG flag image
example: https://static.abstractapi.com/country-flags/US_flag.svg
CurrencyInfo:
type: object
properties:
currency_name:
type: string
description: Currency full name
example: US Dollar
currency_code:
type: string
description: ISO 4217 currency code
example: USD
ErrorResponse:
type: object
properties:
message:
type: string
description: Human-readable error message
example: The provided API key is invalid
error:
type: string
description: Error code
example: invalid_api_key