Connect GeoNames to Airtable

Enrich your data with geographical reference data — countries, cities, postal codes and coordinates — from the GeoNames database.

What you can pull from GeoNames

GeoNames exposes 1 object you can pull, each as its own job. Every run pulls the records into a flat table, so nested fields arrive as ordinary columns that Airtable can sort, filter and total without further work.

Country information

The default endpoint: one row per country, with population, area, currency and language codes. Useful as a reference table to join your own data against.

Columns returned by country information
ColumnTypeNotes
countryCodestringISO 3166-1 alpha-2 — the usual join key
countryNamestring
isoAlpha3string
fipsCodestring
continentstring
continentNamestring
capitalstring
populationinteger
areaInSqKmfloat
currencyCodestring
languagesstringComma-separated locale codes
geonameIdintegerGeoNames’ own stable identifier

Options you can set

endpoint
Which GeoNames endpoint to call — defaults to countryInfoJSON
base_url
GeoNames API base URL. Validated against SSRF rules before the job saves — defaults to http://api.geonames.org
timeout
Request timeout in seconds, up to 300 — defaults to 30

How it lands in Airtable

Airtable accepts append, upsert writes. Upsert is the one that matters on a schedule: it merges on a key you choose, so matching rows are updated in place and only genuinely new records are created. Append instead, and a daily job multiplies your data.

Upsert merges on up to three key fields. Matching records are updated in place; only genuinely new rows are created.

  • At most 3 merge fields - Airtable rejects more.
  • Writes go 10 records per request, at 4 requests per second by default (Airtable’s own ceiling is 5) - roughly 2,400 records a minute.
  • typecast is on by default, letting Airtable coerce strings into select, number and date fields rather than rejecting the write.
  • unknown_fields defaults to error, so a renamed source column fails loudly instead of silently dropping data. Set it to skip if you would rather drop.

Authentication

GeoNames authenticates with an API key held as a stored connection, so it never appears in a spreadsheet cell, a formula, or a shared copy of a sheet.

Keeping runs incremental

Not for this source: Each run fetches the configured endpoint in full. Where that is expensive, narrow the job itself and run it less often.

Pair a narrowed read with an upsert write and a re-run costs almost nothing: the rows it already knows are updated, and nothing is duplicated. That combination is what makes a frequent schedule affordable.

Limits and pacing

These are the provider-side ceilings that shape a schedule, not ours. Knowing them up front is the difference between a job that runs quietly every morning and one that starts failing the week your data grows.

LimitValueApplies to
Credits GeoNames throttles by username; a free account is generous for reference data, not for per-row lookups.per-account daily and hourly capsGeoNames

Common gotchas

Most of what goes wrong with a scheduled sync is not a bug — it is a detail of how one side behaves that nobody wrote down. These are the ones that come up for this pair.

It is reference data, not a per-row lookup service

Pull the country table once a week and join against it, rather than calling GeoNames once per row of your own data. The credit limits are sized for the former.

The base URL is SSRF-validated

Pointing it at an internal address is rejected at config time, not at run time, so a bad value fails when you save the job.

Do not key an upsert on email

People change their email address. When they do, upsert cannot match, so it creates a second record - the exact duplicate you were trying to prevent, plus a stale one. Use a stable ID from the source system.

The key field has to be written

If you restrict which columns get written and the key field is not among them, there is nothing to match on and every row is treated as new.

A row that is a fact per period needs a compound key

For a daily history, one row is one entity per day. Key on the entity alone and each day overwrites the last, leaving no history at all.

Set it up in four steps

  1. 1

    Connect GeoNames

    A GeoNames username, stored as a connection. The free tier needs registration and an activated account.

  2. 2

    Connect Airtable

    Connect your Airtable account once, then pick a base and table.

  3. 3

    Shape the data

    Select the columns you want, filter rows, cast types and add computed fields. Everything else is dropped before it reaches the destination.

  4. 4

    Schedule it

    Run once, or on a cron. Every run refreshes Airtable with the latest GeoNames data.

Do I need an add-on or extension for this?

No. The job runs server-side and writes into Airtable through its API, so there is nothing installed in the destination itself. It keeps running when nobody has the file open, and a copy of the file does not need anything installed to work.

How often does the data refresh?

On whatever schedule you set with a cron expression — hourly, daily, or a specific time on specific days. Each run pulls the latest from GeoNames.

Do I need to write any code?

No. You connect both sides, map the fields in a wizard and set a schedule. Computed fields accept small expressions — abs, round, min, max, len — but there is nothing to host or maintain.

Is GeoNames free?

The web service is free for registered users, with per-account daily and hourly credit limits. You supply your own username, so the quota is yours rather than shared.

What is this actually for?

Enrichment. Country and place reference data is the sort of thing every team ends up pasting into a tab by hand; pulling it on a schedule means the join key is consistent and nobody is maintaining it.

How do I stop duplicate records appearing?

Use upsert rather than append, and key it on a stable identifier from the source. Append creates new records every run, so a daily job leaves seven copies of every row by the end of the week.

How fast can it write?

Airtable accepts 10 records per request, and writes are paced at 4 requests a second by default against a ceiling of 5 - roughly 2,400 records a minute. That is comfortable for thousands of rows and worth planning around for hundreds of thousands.

Is the GeoNames connector free to use?

You can connect GeoNames and start syncing on the free plan.