{"id":2770,"date":"2023-12-22T17:06:01","date_gmt":"2023-12-22T17:06:01","guid":{"rendered":"https:\/\/developers.maplink.global\/building-requests-for-the-geocode-autocomplete-api\/"},"modified":"2024-03-04T13:35:14","modified_gmt":"2024-03-04T13:35:14","slug":"building-requests-for-the-geocode-autocomplete-api","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/building-requests-for-the-geocode-autocomplete-api\/","title":{"rendered":"Building requests for the Geocode Autocomplete API"},"content":{"rendered":"\n<p>Before you can start using the API, you will need to <a href=\"https:\/\/developers.maplink.global\/en\/how-do-i-generate-the-token-for-authentication\/\" data-type=\"post\" data-id=\"999\">obtain the <em>authentication token<\/em><\/a>. <\/p>\n\n<p>The following <em>headers <\/em>will be required, where the word <strong><em>token <\/em><\/strong>must be replaced by the token obtained in the authentication process:<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">--header 'Content-Type: application\/json' \\\n--header 'Authorization: Bearer token'<\/pre>\n\n<p>As we&#8217;ll see below, the <strong>Geocode Autocomplete API<\/strong> has 4 different endpoints for each type of use:<\/p>\n\n<ol class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/developers.maplink.global\/geocode-api\/\" data-type=\"post\" data-id=\"1238\">Geocode:<\/a> <\/strong>To return coordinates from an address.<\/li>\n\n\n\n<li><strong>\n  <a href=\"https:\/\/developers.maplink.global\/reverse-geocode-api\/\" data-type=\"post\" data-id=\"1241\">Reverse Geocode:<\/a>\n<\/strong> To return address from coordinates.<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/developers.maplink.global\/suggestions-api\/\" data-type=\"post\" data-id=\"1257\">Suggestions:<\/a> <\/strong>Autocomplete to return suggestions from addresses or part of them.<\/li>\n\n\n\n<li><strong>\n  <a href=\"https:\/\/developers.maplink.global\/multi-geocode\/\" data-type=\"post\" data-id=\"1260\">Multi Geocode:<\/a>\n<\/strong> To return the coordinates of more than one address.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Before you can start using the API, you will need to obtain the authentication token. The following headers will be required, where the word token must be replaced by the token obtained in the authentication process: As we&#8217;ll see below, the Geocode Autocomplete API has 4 different endpoints for each type of use:<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[168],"tags":[],"class_list":["post-2770","post","type-post","status-publish","format-standard","hentry","category-geocode-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/comments?post=2770"}],"version-history":[{"count":1,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2770\/revisions"}],"predecessor-version":[{"id":2771,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2770\/revisions\/2771"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=2770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=2770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=2770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}