How to Geocode Millions of Records Efficiently

US map densely covered with geocoded address points and a 1,000,000 addresses to batch jobs to coordinates flow
US map densely covered with geocoded address points and a 1,000,000 addresses to batch jobs to coordinates flow

Customer, order and asset tables often hold millions of addresses but no coordinates, which blocks mapping, territory planning and geospatial analytics. The efficient way to fix that is batch geocoding: send up to 1,000 addresses per job and pay half the credits of single requests. After that, it's a choice between time and money:

  • the Free plan geocodes about 6,000 addresses a day;
  • an API plan geocodes up to about 500,000 a day;
  • a dedicated server or a managed job handles tens of millions.

Why is it tricky to geocode millions of records?

At first glance, the process of geocoding seems a fairly simple process. What is the challenge of geocoding a million records, though? Well, once you have limited funds and time, the real challenge begins. In other words, as geocoding of large data sets can be a very time-consuming process, it's essential to decide how much you're willing to pay to get results within the desired time frame.

Trade-off between geocoding cost and processing time for large address datasets

What is the lowest cost of geocoding large datasets?

In theory, you can geocode even the large address batches for Free. Most geocoding services provide a free tier that allows you to process day by day a certain amount of addresses.

For example, the Geoapify Free plan includes 3,000 credits per day, and batch requests cost half a credit per address. That lets you process about 6,000 addresses per day: around 180,000 records in a month and 1,000,000 records within a few months. You can also try our Free Geocoding Tool to test our platform.

What's the fastest way to geocode large data sets?

In contrast, cloud computing allows you to process millions of addresses within days when time is of the essence.

How batch geocoding works

The Batch Geocoding API processes a list of addresses as an asynchronous job, so you don't send and track millions of single requests. A job has three steps:

  1. Create a job with up to 1,000 addresses. The API answers 202 with a job id and "status": "pending".
  2. Check the job with that id. While it's running, you get 202 again; for big jobs, wait at least one minute between checks.
  3. Download the results when the response is 200. They stay available for 24 hours after the job completes.

This request creates a job for five US addresses. The filter=countrycode:us parameter limits matches to the United States:

curl -X POST -H "Content-Type: application/json" \
  -d '["1600 Pennsylvania Avenue NW, Washington, DC 20500", "350 Fifth Avenue, New York, NY 10118", "233 S Wacker Dr, Chicago, IL 60606", "1 Infinite Loop, Cupertino, CA 95014", "400 Broad St, Seattle, WA 98109"]' \
  "https://api.geoapify.com/v1/batch/geocode/search?filter=countrycode:us&apiKey=YOUR_API_KEY"

# Response 202: {"id": "afb178a0cc83474eb32edfebf271296f", "status": "pending", "url": "..."}

curl "https://api.geoapify.com/v1/batch/geocode/search?id=afb178a0cc83474eb32edfebf271296f&apiKey=YOUR_API_KEY"

In our test, the first check returned 202 and the results were ready about 10 seconds later. The result is an array with one object per input address; each object repeats the original query next to the match. This reduced response shows the first two:

[
  {
    "query": {
      "text": "1600 Pennsylvania Avenue NW, Washington, DC 20500",
      "parsed": { "housenumber": "1600", "street": "pennsylvania avenue nw", "postcode": "20500", "city": "washington", "state": "dc", "expected_type": "building" }
    },
    "formatted": "White House, 1600 Pennsylvania Avenue Northwest, Washington, DC 20500, United States of America",
    "lat": 38.8976387,
    "lon": -77.0365528,
    "result_type": "amenity",
    "rank": { "confidence": 1, "confidence_street_level": 1, "confidence_building_level": 1, "match_type": "inner_part" }
  },
  {
    "query": { "text": "350 Fifth Avenue, New York, NY 10118" },
    "formatted": "350 5th Avenue, New York, NY 10118, United States of America",
    "lat": 40.7484288,
    "lon": -73.9850334,
    "result_type": "building",
    "rank": { "confidence": 1, "confidence_street_level": 1, "confidence_building_level": 1, "match_type": "full_match" }
  }
]

Use rank.confidence and result_type to flag weak matches for review before you load the coordinates into your database.

How a job is counted: every address, the job request and each result request count as one API call, and batch calls are counted at 0.5. A full job of 1,000 addresses checked once is 1,002 calls, or about 501 credits. One million addresses therefore need about 501,000 credits. For a larger file, split it into jobs of 1,000 and keep track of their IDs; the how-to guide geocode a list of addresses covers splitting, rate limits and resuming. You can also try a job in the Batch Playground.

How long does it take to geocode 1 million records?

With batch jobs, the limit is usually your daily credit quota, not processing speed. At about 501 credits per 1,000 addresses, the pricing plans give these daily volumes:

PlanCredits per dayAddresses per day (batch)1 million records
Free3,000about 6,000about 167 days
API 100100,000about 200,000about 5 days
API 250250,000about 500,000about 2 days
Dedicated serverunmeteredlimited by server capacitysee below

For tens of millions of records, a dedicated server or a managed job is usually faster and cheaper than a credit plan.

Options by budget and deadline

Now, let's look at the practical options for bulk geocoding with the Geoapify Geocoding service, from the most flexible to the most hands-off.

Self-service with API subscription

We recommend subscribing to Geoapify's API to process large batches, as this is the most flexible and easiest way to do so. We offer different pricing plans with different usage volumes. In addition, we offer custom plans when you need something special.

For example, with the API 250 plan (€499 per month), you can process up to about 500,000 addresses daily. So you can finish a few million addresses within a few days. The same job mechanism works for other Geoapify APIs through the Batch API.

You can use the subscription plans even if you have a one-time job. They are billed monthly and can be canceled at any time.

Custom server for unmetered API calls

The more advanced option is a dedicated server: you pay for the resource, not per API call. One server costs €700 per month plus a €200 one-time setup fee and supports up to 50 Geocoding API requests per second. At full load, that is enough for 10 million requests in under three days of continuous processing. Several servers can be combined into a cluster for higher volumes; see the pricing FAQ for details.

Turnkey solutions for large address batches

We also offer turnkey solutions and advice to help you complete your project. We can take your data, process it with our cloud processing clusters, and deliver it in the format you want.

The price depends on the number of addresses, the deadline and the level of support. For datasets of 100 million addresses and more, contact us for a quote.

What about data ownership?

A geocoding service's policies regarding data ownership should be a top priority when choosing a provider. Some API providers have strict policies about the use of their data. For example, they prohibit storing the geocoding data they return.

The best thing about Geoapify is that all its services are based on open data, such as OpenStreetMap. So we allow you to store data in your databases with no restrictions. Just keep the data attribution together with the results.

What's next

Frequently Asked Questions

How long does it take to geocode 1 million addresses?

With batch jobs, it depends mainly on your daily credit quota: about 2 days on the API 250 plan (about 500,000 addresses per day), about 5 days on API 100, and about 167 days on the Free plan. A dedicated server removes the daily quota and is limited only by its capacity.

How much does it cost to geocode 1 million addresses?

Batch requests are counted at half a credit, so 1 million addresses need about 501,000 credits, including the job and result requests. See batch pricing and the Geoapify plans to turn credits into a monthly price.

How many addresses can one batch job contain?

Up to 1,000 addresses per job. Split larger files into several jobs and keep their IDs; results stay available for 24 hours after a job completes. The geocode a list of addresses guide shows how.

Can I store geocoding results in my database?

Yes. Geoapify geocoding is built on open data, so you can cache and store the results and use them in your products. Keep the data attribution together with the results. Read more about OpenStreetMap geocoding.

Should I use the batch API or single geocoding requests for large datasets?

Use the Batch Geocoding API for large lists: it costs half as many credits and you don't have to manage millions of individual requests. Use single Geocoding API requests when you need an answer immediately, for example in a form.