Skip to content

Commit cc4f0c6

Browse files
GeoIP Exchange reports can be downloaded
1 parent fdad3b9 commit cc4f0c6

File tree

3 files changed

+175
-39
lines changed

3 files changed

+175
-39
lines changed

content/geoip/geoip-exchange.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
draft: false
3+
title: GeoIP Exchange documentation
4+
---
5+
6+
## Overview
7+
8+
GeoIP Exchange is a platform for network operators to recieve automated feedback
9+
about how MaxMind codes their networks. To learn more and join, please
10+
[sign up on our website](https://www.maxmind.com/en/geoip-exchange).
11+
12+
## Download GeoIP Exchange geofeed report
13+
14+
If you are a current GeoIP Exchange user, you can automate downloads of the
15+
GeoIP Exchange geofeed report. In order to download the report from a script or
16+
program, please use the permalinks found on the GeoIP Exchange page on your
17+
account portal. Please note that you will be redirected from these permalinks.
18+
We will redirect requests using HTTPS on the following hostname
19+
20+
Please note that you will be redirected from these permalinks to the hostname
21+
`storage.googleapis.com`.
22+
23+
### Download best practices
24+
25+
At a high-level, the best practice is to write an automated script that
26+
periodically checks the `last-modified` header for the report's build date, and
27+
downloads the resulting report when the `last-modified` time is later than the
28+
`last-modified` time of the latest local copy of the report.
29+
30+
It is good to check periodically throughout the day for a new report so that you
31+
do not rely on an update schedule, and so that you catch off-schedule reports.
32+
33+
### Checking for the latest release date
34+
35+
You can check the date of the GeoIP Exchange geofeed report's latest release by
36+
issuing a HEAD request for that report's download permalink URL. The download
37+
permalink can be found in the GeoIP Exchange section of your account portal.
38+
39+
The basic steps are:
40+
41+
1. In the “Report links” row for the geofeed, click “Get Permalinks”.
42+
2. Copy the permalink provided in the modal window.
43+
3. Provide your
44+
[account ID](https://support.maxmind.com/hc/en-us/articles/4412951066779-Find-my-Account-ID)
45+
and
46+
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
47+
using
48+
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
49+
to authenticate.
50+
4. If you are using `wget` or `curl` from a shell script, please be sure to
51+
quote the URL.
52+
53+
For example, you can issue a `curl` command like the following:
54+
55+
```bash
56+
curl -I -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY \
57+
'https://download.maxmind.com/geofeed/reports/v1.0/3/free'
58+
```
59+
60+
Or a `wget` command like the following:
61+
62+
```bash
63+
wget -S \
64+
--method HEAD \
65+
--user=YOUR_ACCOUNT_ID \
66+
--password=YOUR_LICENSE_KEY \
67+
'https://download.maxmind.com/geofeed/reports/v1.0/3/free'
68+
```
69+
70+
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
71+
`YOUR_LICENSE_KEY` is a placeholder for your license key.
72+
[Learn more about license keys on our knowledge base](https://support.maxmind.com/hc/en-us/articles/4407116112539-Using-License-Keys).
73+
74+
In the response, you can check the `last-modified` header for the file’s build
75+
date. These checks can be incorporated into your own script or program,
76+
according to your needs.
77+
78+
### Automating downloads
79+
80+
The steps for automating downloads of the report are similar to the steps for
81+
checking the latest release date. Instead of checking the file HEAD, you will
82+
download the file.
83+
84+
1. In the “Report links” row for the geofeed, click “Get Permalinks”.
85+
2. Copy the permalink provided in the modal window.
86+
3. Provide your
87+
[account ID](https://support.maxmind.com/hc/en-us/articles/4412951066779-Find-my-Account-ID)
88+
and
89+
[your license key](https://www.maxmind.com/en/accounts/current/license-key)
90+
using
91+
[Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
92+
to authenticate.
93+
4. If you are using `wget` or `curl` from a shell script, please be sure to
94+
quote the URL.
95+
96+
For example, you can issue a `curl` command like the following:
97+
98+
```shell
99+
curl -O -J -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY 'https://download.maxmind.com/geofeed/reports/v1.0/3/free'
100+
```
101+
102+
Or a `wget` command like the following:
103+
104+
```shell
105+
wget --user=YOUR_ACCOUNT_ID --password=YOUR_LICENSE_KEY 'https://download.maxmind.com/geofeed/reports/v1.0/3/free'
106+
```
107+
108+
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
109+
`YOUR_LICENSE_KEY` is a placeholder for your license key.
110+
[Learn more about license keys on our knowledge base](https://support.maxmind.com/hc/en-us/articles/4407116112539-Using-License-Keys).
111+
112+
This example will save the database to a file called `free.csv`. Depending on
113+
the path of your permalink, you may recieve a file called `free.csv`,
114+
`geolocation.csv`, or `intelligence.csv` matching the final part of the path of
115+
your permalink.

content/geoip/updating-databases.md

Lines changed: 55 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,61 @@ servers can make HTTPS connections to the following hostname:
134134
This is only recommended for systems unable to use GeoIP Update or for clients
135135
using the CSV-format databases.
136136

137+
### Download best practices
138+
139+
At a high-level, the best practice is to write an automated script that
140+
periodically checks the `last-modified` header for the database's build date,
141+
and downloads the database when the `last-modified` time is later than the
142+
`last-modified` time of the latest local copy of the database.
143+
144+
It is good to check periodically throughout the day for a release so that you do
145+
not rely on an update schedule, and so that you catch off-schedule releases.
146+
147+
### Checking for the Latest Release Date
148+
149+
You can check the date of a given database’s latest release by issuing a HEAD
150+
request for that database’s download permalink URL. The download permalink can
151+
be found in the
152+
[Download Databases](https://www.maxmind.com/en/accounts/current/geoip/downloads)
153+
section of your account portal.
154+
155+
For example, using the permalink for the GeoIP2 City CSV database, you can issue
156+
a `curl` command like the following:
157+
158+
```bash
159+
curl -I -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY \
160+
'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
161+
```
162+
163+
Or a `wget` command like the following:
164+
165+
```bash
166+
wget -S \
167+
--method HEAD \
168+
--user=YOUR_ACCOUNT_ID \
169+
--password=YOUR_LICENSE_KEY \
170+
'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
171+
```
172+
173+
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
174+
`YOUR_LICENSE_KEY` is a placeholder for your license key.
175+
[Learn more about license keys on our knowledge base](https://support.maxmind.com/hc/en-us/articles/4407116112539-Using-License-Keys).
176+
177+
In the response, you can check the `last-modified` header for the file’s build
178+
date, or you can check the `content-disposition` header for the date that would
179+
appear in the file name. These checks can be incorporated into your own script
180+
or program, according to your needs.
181+
182+
This method only issues a HEAD request, rather than a download request, so
183+
running this check won’t count against your
184+
[daily database download limit](https://support.maxmind.com/hc/en-us/articles/4408216129947).
185+
186+
### Automating downloads
187+
188+
The steps for automating downloads of the databases are similar to the steps for
189+
checking the latest release date. Instead of checking the file HEAD, you will
190+
download the file.
191+
137192
In order to download the databases from a script or program, please use the
138193
permalinks found on the
139194
[GeoIP download page](https://www.maxmind.com/en/accounts/current/geoip/downloads).
@@ -190,45 +245,6 @@ documentation pages (see
190245
and
191246
[tutorials for importing CSV databases into SQL](/geoip/importing-databases).
192247

193-
### Checking for the Latest Release Date
194-
195-
You can check the date of a given database’s latest release by issuing a HEAD
196-
request for that database’s download permalink URL. The download permalink can
197-
be found in the
198-
[Download Databases](https://www.maxmind.com/en/accounts/current/geoip/downloads)
199-
section of your account portal.
200-
201-
For example, using the permalink for the GeoIP2 City CSV database, you can issue
202-
a `curl` command like the following:
203-
204-
```bash
205-
curl -I -L -u YOUR_ACCOUNT_ID:YOUR_LICENSE_KEY \
206-
'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
207-
```
208-
209-
Or a `wget` command like the following:
210-
211-
```bash
212-
wget -S \
213-
--method HEAD \
214-
--user=YOUR_ACCOUNT_ID \
215-
--password=YOUR_LICENSE_KEY \
216-
'https://download.maxmind.com/geoip/databases/GeoIP2-City-CSV/download?suffix=zip'
217-
```
218-
219-
Where `YOUR_ACCOUNT_ID` is a placeholder for your account ID and
220-
`YOUR_LICENSE_KEY` is a placeholder for your license key.
221-
[Learn more about license keys on our knowledge base](https://support.maxmind.com/hc/en-us/articles/4407116112539-Using-License-Keys).
222-
223-
In the response, you can check the `last-modified` header for the file’s build
224-
date, or you can check the `content-disposition` header for the date that would
225-
appear in the file name. These checks can be incorporated into your own script
226-
or program, according to your needs.
227-
228-
This method only issues a HEAD request, rather than a download request, so
229-
running this check won’t count against your
230-
[daily database download limit](https://support.maxmind.com/hc/en-us/articles/4408216129947).
231-
232248
## Changes to file size between updates
233249

234250
It is expected for database files to increase or decrease in size from time to

hugo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ title = 'MaxMind'
206206
pageRef = '/geoip/geolite2-free-geolocation-data'
207207
parent = 'GeoIP'
208208
weight = 80
209+
[[menus.geoip]]
210+
name = 'GeoIP Exchange'
211+
pageRef = '/geoip/geoip-exchange'
212+
parent = 'GeoIP'
213+
weight = 80
209214
[[menus.geoip]]
210215
name = 'Privacy Exclusions API'
211216
pageRef = '/geoip/privacy-exclusions-api'

0 commit comments

Comments
 (0)