While calling any Salesforce Maps API (like Geocoding, GetHostedData, etc.), you may sometimes receive 4xx status codes. These codes indicate that requests need to be revised, and any problems need to be corrected, before trying again.
This article answers a common question about the Salesforce Maps API: what do 429 and 400 status codes mean, and how do you resolve them? The API returns these codes to protect itself from abuse, either by informing you that you are sending too many requests at once (429), or that you are sending bad requests that cannot be processed (400).
A 429 error code, as stated in the message body, means the requests were throttled because you exceeded the number of requests per minute the API allows. You can resolve this by spacing out your requests over a longer period of time.
A 400 error code signifies a bad request or an invalid request. The response body includes a message to help you correct the request. One common cause is sending over 50 addresses in a single Geocoding API call.
If the geocoder's match score falls at 50 or below, your code may be set to automatically retry the call. However, making repeated calls with the same input data won't produce a different match value, and repeated retries can in turn trigger a 429 error from too many requests. To avoid this cycle, confirm that the correct address information is being provided before making the call again.
You can automate this correction process based on the API's responses. For example, if a record returns `{ success: false, message: "Invalid address" }`, you could have your Apex code flag that record for manual review to ensure the address is corrected before retrying.
Bad requests (400 errors) still count against your total allowed request limit, so repeated bad requests can contribute to hitting a 429 error as well.
000989526

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.