On-premise customers can use the batch geocoding endpoint to submit CSV files of up to 10,000 lookups at a time. This is in addition to the existing JSON support.
Geocodio’s batch geocoding endpoint supports synchronous geocoding of up to 10,000 lookups at the time. The existing API documentation for batch geocoding support can be found here: https://www.geocod.io/docs/#batch-geocoding
In order to geocode a CSV file, the Content-Type
header needs to be set to text/csv
.
The CSV file's first row should contain header names, which designate the names for each column.
The batch geocoding endpoint expects either a column named q
containing the full address, or individual address components in columns named street
, city
, state
, postal_code
and/or country
.
CSV file format requirements:
,
"
\\
\n
Fields can also be requested.
For example, to request the USPS ZIP+4 append:
sample.csv
id,q
1,"240 East Hampton Avenue, 53217"
2,"1109 N Highland St, Arlington VA"
curl -X POST \
-H "Content-Type: text/csv" \
-d @sample.csv \
http://YOUR_SERVER_IP_ADDRESS/v1.7/geocode?api_key=YOUR_API_KEY&fields=zip4
id,q,Latitude,Longitude,"Accuracy Score","Accuracy Type",Number,Street,"Unit Type","Unit Number",City,State,County,Zip,Country,Source,"ZIP+4 Range Start","ZIP+4 Range End (or blank if no range)","ZIP 9 Range Start","ZIP 9 Range End (or blank if no range)","Record Type Code","Record Type Description","Carrier Route ID","Carrier Route Description","Building or Firm Name","Government Building Code","Government Building Description","Facility Code","Facility Description","City Delivery?","Valid delivery area?","Exact Match?"
1,"240 East Hampton Avenue, 53217",43.103872,-87.908182,1,range_interpolation,240,"E Hampton Ave",,,Milwaukee,WI,"Milwaukee County",53217,US,"TIGER/Line® dataset from the US Census Bureau",5805,,53217-5805,,S,Street,C002,"City Delivery",,,,P,"Post Office",Yes,Yes,No
2,"1109 N Highland St, Arlington VA",38.886672,-77.094735,1,rooftop,1109,"N Highland St",,,Arlington,VA,"Arlington County",22201,US,Arlington,2890,,22201-2890,,S,Street,C007,"City Delivery",,,,P,"Post Office",Yes,Yes,Yes