Skip to Content
BuddyGeoDocs

Bulk processing

Add coordinates to a spreadsheet of addresses, or addresses to a spreadsheet of coordinates, in the upload wizard or through the /v1/batch endpoints. Preview is free; only matched rows cost a credit.

When you have a list of addresses or coordinates rather than a stream of single requests, send it as one job. A job works in one of two directions:

DirectionEach row hasEach matched row getsResolved like
Addresses → coordinatesAn address or place name, in one column or in separate street, city, region, postcode and country columnsLatitude and longitude of the best matching place, its normalised address and the number of candidates/v1/search
Coordinates → addressesA latitude and a longitudeThe address of the nearest mapped feature and its distance from the point/v1/reverse

There are two ways to submit a job, with the same rules and the same pricing:

  • The upload wizard, for people with a spreadsheet and no wish to write code.
  • The batch endpoints, for systems that produce the list themselves.

What it costs

  • Previewing is free. Uploading, mapping columns and reading the estimate cost nothing, with or without an account.
  • One credit per matched row. An address that matches a place, or a point that comes back with an address, costs one credit. An address that matches several places also costs one credit: the best match is used.
  • Everything else is free. Invalid rows (no address, or an unusable coordinate), addresses that match no place, points with nothing mapped nearby, and rows a cancelled or interrupted job never reached cost nothing.

Before you confirm, the wizard shows the maximum the job can cost: one credit per valid row. That amount is reserved from your balance while the job runs, so the job cannot be starved by other traffic, and whatever is not used is released. See Credits and billing.

The upload wizard

Open it at /bulk/new without an account, or under Bulk jobs → New batch when signed in. Two built-in samples show each direction: customer addresses and delivery stops with coordinates.

Choose a file

Drag in a CSV or XLSX file, browse for one, or pick a built-in sample. The file is read in your browser. For a workbook with several sheets, choose the worksheet to use. The first row is treated as the header.

Choose the direction and map the columns

The wizard reads the column names and values and suggests a direction, Addresses → coordinates or Coordinates → addresses, with the columns it would use and a note on how sure it is. Columns named like lat and lon (or holding values that read as coordinates) suggest coordinates; columns named like address, street, city, postcode, zip, country, location or place, or a column of free text, suggest addresses. You can change the direction and every column, and optionally pick a row identifier column, such as a customer or stop number.

For addresses, choose how the address is stored:

  • One column with the full address, such as 290 Bremner Boulevard, Toronto. City, region, postcode and country columns can be added to it.
  • Separate columns: house number, street, city, region, postcode and country. Each is optional; map at least one.

The mapped cells of a row are joined in that order into one search, for example 290 Bremner Boulevard, Toronto, Canada. A part that repeats a whole part of the search is not added again, so a city column next to a full address that ends in that city adds nothing. A part that only shares a word is kept: 15 London Road with the city London is searched as 15 London Road, London.

A row is invalid, and never charged, when:

  • every mapped cell is empty ("No address in the mapped columns");
  • it has only a house number, region, postcode or country, which does not name a place ("No street, city or full address in the mapped columns");
  • the search is longer than 200 characters, the same limit as /v1/search.

Country spellings such as USA, UK and Deutschland are understood. Leave apartment or suite prefixes (Suite 100, …) out of mapped street columns for best matching accuracy.

For coordinates, choose the latitude and the longitude column. Values that are evidently swapped or malformed are flagged before you go on. See Coordinate order.

Either way, original columns are kept as they are, including leading zeros in text identifiers such as 0001. In the columns BuddyGeo adds, any text that starts with =, +, - or @ gets a leading apostrophe, so a spreadsheet app shows it as text instead of running it as a formula.

Read the preview and the estimate

The preview validates every row and shows total, valid and invalid rows with the reason for each invalid one, your current balance, the maximum credits the job can use and the balance you would have left if every valid row matched. For addresses it lists the first searches exactly as they will be sent; their coordinates are only known once the job runs. For coordinates it plots a sample of the points on a map. Invalid rows can be left in the file, where they come back marked invalid, or removed from processing.

If the estimate exceeds your available credits, the wizard says so here, before anything is charged.

Confirm and process

Confirming needs a workspace. If you started without an account, you are asked to sign up at this point and return to the same draft with your mapping intact. The job gets an ID that starts with job_ and moves through its states on its own. You can leave the page: the job is listed under Bulk jobs.

Inspect and download

The job page shows the direction, matched, no-match, invalid and unprocessed counts, the credits used and every row with its outcome, in the original order: for addresses, the search sent, the coordinates and address found and the number of candidates. Matched rows are plotted on a map. Download:

  • the enriched file as CSV or XLSX: all original columns, followed by the result columns below;
  • an errors-only CSV with just the rows that have no result, each with its reason.

Result columns

The export appends result columns to yours. Rows without a match keep their original cells and leave the result columns empty, apart from the status, credits and reason.

Addresses → coordinates, in this order:

ColumnContent
bg_statusmatched, no_match, invalid, failed or unprocessed
bg_latitude, bg_longitudeCoordinates of the best matching place
bg_formatted_addressThe normalised address on one line
bg_house_number, bg_street, bg_locality, bg_region, bg_postcode, bg_country, bg_country_codeThe address as separate fields
bg_match_levelPrecision of the match, for example address or locality
bg_candidatesHow many places matched (0 for no match). With more than one, the best is used
bg_credits1 for a matched row, otherwise 0
bg_reasonWhy a row has no result, or a note such as 4 candidates; best match used

Coordinates → addresses, in this order:

ColumnContent
bg_statusmatched, no_match, invalid, failed or unprocessed
bg_formatted_addressThe address on one line
bg_house_number, bg_street, bg_locality, bg_region, bg_postcode, bg_country, bg_country_codeThe address as separate fields
bg_match_levelPrecision of the match, for example address or locality
bg_result_latitude, bg_result_longitudeCoordinate of the returned feature
bg_distance_mMetres between the submitted point and the returned feature
bg_credits1 for a matched row, otherwise 0
bg_reasonWhy a row has no address

Job states

StateMeaning
queuedAccepted, credits reserved, waiting to start
runningRows are being processed
partialStopped part-way: some rows failed for a reason that can be retried
completedEvery valid row was processed
cancelledStopped on request. Processed rows keep their result, the rest are unprocessed
failedStopped before any row was processed. Nothing was charged
  • Cancel is available while rows remain. It keeps what is done, marks the rest unprocessed and releases their reserved credits.
  • Retry is available on a partial job. It processes only the rows that failed for a retryable reason, such as a geocoder timeout.
  • Downloads are kept for 30 days after a job finishes. After that the job stays in the history with its counts, and its rows are removed.

Limits

A job can be as large as your available credits allow. Every valid row reserves one credit when you confirm, so the monthly allowance of the plan is the only plan-level limit on a job. There is no separate row limit per plan.

PlanPriceMonthly creditsMonthly AI actionsThroughputOverage / Pack rates
FreeFree2,5002501 request / second$1.00 / 1,000 spatial · $5.00 / 1,000 AI (prepaid packs, never expire)
Developer$19 / month100,0005,0005 requests / second$0.35 / 1,000 spatial · $3.00 / 1,000 AI (opt-in metered, hard cap default)
Growth$29 / month1,000,00015,00010 requests / second$0.10 / 1,000 spatial · $2.00 / 1,000 AI (opt-in metered, hard cap default)

Worked examples

Addresses → coordinates

The built-in sample "address-list" has eleven customer rows with the street address, the city and the country in separate columns. Open it in the wizard or download the CSV (XLSX) to follow along.

customer_id,name,address,city,country
00017,Harbourfront Books,290 Bremner Boulevard,Toronto,Canada
00018,Café Anatole,5 Avenue Anatole France,Paris,France
00203,Shibakoen Trading,東京タワー,東京,日本
00204,Clock Tower Tours,Big Ben,London,United Kingdom
00095,Harbourfront Books (second account),290 Bremner Boulevard,Toronto,Canada
00342,Springfield Hardware,,Springfield,United States
00415,Midtown Deli,350 5th Avenue,New York,United States
00500,Sea Breeze Imports,1 Nowhere Lane,Atlantis,
00611,Pending signup,,,
00720,Pariser Platz Gallery,Pariser Platz 1,Berlin,Germany
00721,Lakeshore Storage,,Toronto,Canada

The wizard suggests Addresses → coordinates with address as the full address, city and country added to it, and customer_id as the row identifier.

RowsCredits
Invalid (00611: no address in the mapped columns)10
Valid10at most 10, shown in the preview
Matched99
No match (00500: no matching place found)10

Starting from 10 available credits, the preview shows a maximum of 10, the finished job shows 9 used, and 1 remains. Row 00342 (Springfield, United States) matches four places; the best is used, bg_candidates is 4 and the reason says so. Rows 00017 and 00095 share an address and stay two rows. 00203 is written in Japanese and finds Tokyo Tower; 00721 has only a city and gets the coordinates of the city.

Coordinates → addresses

The built-in sample "acceptance-8-rows" has eight rows. Open it in the wizard to follow along.

stop_id,driver,latitude,longitude,note
0001,Ana Lima,43.6426,-79.3871,CN Tower pickup
0002,Kenji Sato,35.6586,139.7454,Tokyo Tower drop-off
0003,Bruna Costa,-23.5614,-46.6559,MASP delivery
0004,Omar Haddad,N/A,-0.1276,GPS signal lost
0005,Ella Wright,51.5007,-0.1246,Westminster handover
0006,Noor Rahman,30.0,-40.0,Mid-ocean test ping
0007,Luc Martin,48.8584,2.2945,Eiffel Tower pickup
0008,Ana Lima,43.6426,-79.3871,CN Tower return
RowsCredits
Invalid (0004: latitude is not a number)10
Valid7at most 7, shown in the preview
Matched66
No match (0006: open ocean)10

Starting from 10 available credits, the preview shows a maximum of 7, the finished job shows 6 used, and 4 remain. Rows 0001 and 0008 share a coordinate but stay separate rows with their own identifiers, in their original positions.

The batch endpoints

The same jobs, without the spreadsheet. A row is a point, {"id", "lat", "lon"}, looked up like /v1/reverse, or an address, {"id", "address"}, searched like /v1/search. Both /v1/batches and the /v1/batch alias are accepted. Full schemas are in the API reference.

EndpointPurpose
POST /v1/batchesSubmit rows with an Idempotency-Key header. Answers 202 with a job summary (200 on idempotent replay)
GET /v1/batches/{job_id}Status, progress, row counts and credits
GET /v1/batches/{job_id}/resultsRow-level results in the submitted order (?format=json|csv|xlsx|errors)
DELETE /v1/batches/{job_id}Cancel the rows that have not been processed

Submit (with Idempotency-Key)

Send the rows as JSON along with a unique workspace-scoped Idempotency-Key header (4–128 characters). id (or row_id) is optional and returned unchanged; send it as text to keep leading zeros.

curl -X POST "https://api.buddygeo.com/v1/batches" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: batch-2026-11-30-stop-list-01" \
  -H "Content-Type: application/json" \
  -d '{"direction":"coordinates","rows":[{"id":"0001","lat":43.6426,"lon":-79.3871},{"id":"0004","lat":"N/A","lon":-0.1276},{"id":"0006","lat":30,"lon":-40}]}'
  • Safe retries without double reservation: Re-sending the same Idempotency-Key with the identical payload returns HTTP 200 with idempotent_replay: true and the original job instead of creating a duplicate job or double-reserving credits.
  • Fingerprint mismatch protection: Re-using an existing Idempotency-Key with a different payload or row set is rejected with HTTP 409 so accidental key reuse cannot silently overwrite or lose a submission.
  • Invalid rows do not reject the batch: The row with "lat": "N/A" is accepted and counted as invalid at 0 credits.

Address rows use "direction": "address" (or omit direction when sending only address fields):

curl -X POST "https://api.buddygeo.com/v1/batches" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Idempotency-Key: batch-2026-11-30-customers-01" \
  -H "Content-Type: application/json" \
  -d '{"direction":"address","rows":[{"id":"00017","address":"290 Bremner Boulevard, Toronto, Canada"},{"id":"00342","address":"Springfield, United States"},{"id":"00611","address":""}]}'

A blank address makes the row invalid with 0 credits reserved. Jobs are persisted in PostgreSQL and private object storage and processed asynchronously by the background worker.

Poll the status

curl "https://api.buddygeo.com/v1/batches/{job_id}" \
  -H "X-API-Key: YOUR_API_KEY"

Poll until job.status is completed, partial, cancelled, or failed. A few seconds between polls is enough.

Fetch the results

# JSON results
curl "https://api.buddygeo.com/v1/batches/{job_id}/results" \
  -H "X-API-Key: YOUR_API_KEY"

# Download enriched CSV, XLSX, or errors-only CSV
curl -o results.csv "https://api.buddygeo.com/v1/batches/{job_id}/results?format=csv" \
  -H "X-API-Key: YOUR_API_KEY"

Results preserve the original row order and carry per-row status, credit treatment, and matched address or coordinate fields.

Cancel if you need to

curl -X DELETE "https://api.buddygeo.com/v1/batches/{job_id}" \
  -H "X-API-Key: YOUR_API_KEY"

Rows already processed keep their result and their charge. Remaining queued or in-flight rows stop, become unprocessed, and release their reserved credits immediately.

Open in the app

On this page