{"id":2669,"date":"2026-10-20T08:35:26","date_gmt":"2026-10-20T07:35:26","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/google-geocode-failed-request-denied\/"},"modified":"2026-10-20T08:40:41","modified_gmt":"2026-10-20T07:40:41","slug":"google-geocode-failed-request-denied","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/troubleshooting\/google-geocode-failed-request-denied\/","title":{"rendered":"Google geocode failed: REQUEST_DENIED"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">REQUEST_DENIED means Google refused a geocoding request made with your API key. On a GeoDirectory site you&#8217;ll usually see it as &#8220;Google geocode failed: REQUEST_DENIED&#8221; during a CSV import, when some rows have an address but no latitude and longitude and GeoDirectory asks Google to look them up.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your maps can work perfectly at the same time, because maps and geocoding use the key in different places.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why the map works but geocoding fails<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Maps load in the visitor&#8217;s browser, so a key restricted to your website (an HTTP referrer restriction) is accepted. Import geocoding runs on your web server, which doesn&#8217;t send your website as a referrer, so Google denies the same key. A Geocoding API that isn&#8217;t enabled, or a Google Cloud project without billing, gives the same error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to fix it<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the Google Cloud console, open the project that owns your key and check the Geocoding API is enabled and billing is set up.<\/li>\n\n\n\n<li>Create a second API key for geocoding. Restrict it by API (Geocoding API) or by your server&#8217;s IP address, not by website.<\/li>\n\n\n\n<li>Paste it into Google Geocoding API Key at GeoDirectory &gt; Settings &gt; General, under Map Settings (click Show Advanced to see it). GeoDirectory then uses this key for geocoding and timezone requests and keeps your main key for maps.<\/li>\n\n\n\n<li>Import the rows that failed again.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">GeoDirectory&#8217;s import looks up missing coordinates with Google even if your site displays OpenStreetMap maps, so you still need a working Google geocoding key for those rows. The simplest way to avoid the lookup is to include latitude and longitude in your CSV. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/csv-imports-useful-tips\/\">CSV imports: useful tips<\/a> and <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/installation\/get-a-google-api-key\/\">Get a Google API key<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the error is OVER_QUERY_LIMIT instead, the key works but has hit a quota. Check the quotas for the Geocoding API in the Google Cloud console.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>REQUEST_DENIED means Google refused a geocoding request made with your API key. On a GeoDirectory site you&#8217;ll usually see it as &#8220;Google geocode failed: REQUEST_DENIED&#8221; during a CSV import, when some rows have an address but no latitude and longitude and GeoDirectory asks Google to look them up. Your maps can work perfectly at the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,437],"class_list":["post-2669","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-troubleshooting"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2669"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2669\/revisions"}],"predecessor-version":[{"id":2812,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2669\/revisions\/2812"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2669"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2669"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}