Core APIs
Zipcodes API
List
5min
list zipcodes get get /zipcodes to list zipcodes to your account you should make an http get request to the list zipcodes endpoint you can list zipcodes for a specific domain and perform a search using the search term querystring parameter zipcode licensing to view how many zipcodes you can add to your account you can use the account api https //docs trajectdata com/rainforestapi/account api zipcodes can also be listed and edited visually via the dashboard https //app rainforestapi com/zipcodes for more information about using zip & postal codes with rainforest api please see the zipcodes overview https //docs trajectdata com/rainforestapi/zipcodes api/overview parameters the following querystring (http get) parameters allow you to refine the results returned by the list zipcodes api parameter required description api key required the api key for your account search term optional limits the returned zipcodes to just those containing the search term i e search term=455 (to return only zipcodes containing the string 455 ) domain optional filters the zipcodes returned to only those from the domain specified page optional the page of results to return a maximum of 10 results are returned per page example in the example below we list all the zipcodes on your account $ curl "https //api rainforestapi com/zipcodes?api key=demo"const axios = require('axios'); axios get('https //api rainforestapi com/zipcodes?api key=demo') then(response => { const apiresponse = response data; console log("zipcodes ", json stringify(apiresponse, 0, 2); }) catch(error => { console error(error); });import requests import json params = { 'api key' 'demo' } api result = requests get('https //api rainforestapi com/zipcodes', { params }) api response = api result json() print "zipcodes ", json dumps(api response)\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init('https //api rainforestapi com/zipcodes', $querystring); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); print r($api result); ?> an example of a successful response to the list zipcodes api is shown below { "request info" { "success" true }, "usage" { "used" 2, "limit" 10, "available" 8 }, "zipcodes" { "amazon com" \[ { "zipcode" "10550", "status" "preparing" } ] } } next steps zipcodes overview https //docs trajectdata com/rainforestapi/zipcodes api/overview deleting a zipcode via the zipcodes api https //docs trajectdata com/rainforestapi/zipcodes api/delete add a zipcode via the zipcodes api https //docs trajectdata com/rainforestapi/zipcodes api/add