{"id":667,"date":"2021-09-20T00:00:00","date_gmt":"2021-09-20T00:00:00","guid":{"rendered":"https:\/\/wp3.geodatasource.com\/tutorials\/what-is-location-search-web-service\/"},"modified":"2026-01-15T02:40:37","modified_gmt":"2026-01-15T02:40:37","password":"","slug":"what-is-location-search-web-service","status":"publish","type":"docs","link":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/","title":{"rendered":"What is Location Search Web Service"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"600\" src=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png\" alt=\"What is Location Search Web Service in details with sample codes\" class=\"wp-image-293\" style=\"width:600px;height:300px\" srcset=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png 1200w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-300x150.png 300w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-1024x512.png 1024w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-768x384.png 768w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-50x25.png 50w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-920x460.png 920w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-600x300.png 600w, https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner-320x160.png 320w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>A Web Service is a software service used to communicate between two electronic devices over a network.<\/p>\n\n\n\n<p>GeoDataSource Location Search Web Service is a REST API that allows the user to lookup for city information by providing the location coordinate in the latitude and longitude form. It will return the result in either JSON or XML format which contains the information of the nearest country, region, city, latitude, longitude, currency code, currency name, currency symbol, time of sunrise, time of sunset, time zone and distance of input coordinate with the city.<\/p>\n\n\n\n<p>The plan of this Web Service consists of different packages depends on the number of credits. Paid plan of this Web Service will be auto-renewed and auto-recharged monthly. Below are the details of the Web Service package.<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td><strong>Package<\/strong><\/td><td><strong>Price<\/strong><\/td><\/tr><tr><td>Location Search Web Service (500 credits)<\/td><td>FREE<\/td><\/tr><tr><td>Location Search Web Service (10,000 credits)<\/td><td>$50.00 USD\/month<\/td><\/tr><tr><td>Location Search Web Service (50,000 credits)<\/td><td>$125.00 USD\/month<\/td><\/tr><tr><td>Location Search Web Service (250,000 credits)<\/td><td>$300.00 USD\/month<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The GeoDataSource Location Search Web Service consists of two APIs, <strong>Nearest City API<\/strong> and <strong>Nearest Cities API<\/strong>. Nearest City API will only return one result whereas the Nearest Cities API will return the list of cities within 20km. The benefit of using a Web Service is that no database is required to be downloaded, to be installed or to be upgraded on the server side. In order to get the city information, the Web Service can be called by the following syntax.<\/p>\n\n\n\n<p>The syntax for<strong> Nearest City API<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GET https:\/\/api.geodatasource.com\/v2\/city<\/pre>\n\n\n\n<p>The syntax for <strong>Nearest Cities API<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GET https:\/\/api.geodatasource.com\/v2\/cities<\/pre>\n\n\n\n<p>Both API requests accept the following parameters:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Parameter<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>key<\/td><td>string<\/td><td>(required) API key.<\/td><\/tr><tr><td>lat<\/td><td>double<\/td><td>(required) Latitude of a location.<\/td><\/tr><tr><td>lng<\/td><td>double<\/td><td>(required) Longitude of a location.<\/td><\/tr><tr><td>format<\/td><td>string<\/td><td>(optional) Return the result in json (default) or xml format.<br>Valid values: json | xml<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The example of response message:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n\t\"country\":\"US\",\n\t\"region\":\"California\",\n\t\"city\":\"Mountain View\",\n\t\"latitude\":37.3861,\n\t\"longitude\":-122.084,\n\t\"currency_code\":\"USD\",\n\t\"currency_name\":\"United States Dollar\",\n\t\"currency_symbol\":\"$\",\n\t\"sunrise\":\"06:45\",\n\t\"sunset\":\"19:35\",\n\t\"time_zone\":\"-08:00\",\n\t\"distance_km\":0.0001\n}\n<\/code><\/pre>\n\n\n\n<p>For more details about the GeoDataSource Location Search Web Service, please check it out at:<br><a href=\"https:\/\/www.geodatasource.com\/web-service\/location-search\">https:\/\/www.geodatasource.com\/web-service\/location-search<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Web Service is a software service used to communicate between two electronic devices over a network. GeoDataSource Location Search [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[20],"doc_tag":[],"class_list":["post-667","docs","type-docs","status-publish","hentry","doc_category-general-topics"],"year_month":"2026-06","word_count":351,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"hexasoft","author_nicename":"hexasoft","author_url":"https:\/\/www.geodatasource.com\/resources\/author\/hexasoft\/"},"doc_category_info":[{"term_name":"General Topics","term_url":"https:\/\/www.geodatasource.com\/resources\/categories\/general-topics\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is Location Search Web Service |<\/title>\n<meta name=\"description\" content=\"This article shows the definition What is Location Search Web Service. Read about it to learn more details.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Location Search Web Service |\" \/>\n<meta property=\"og:description\" content=\"This article shows the definition What is Location Search Web Service. Read about it to learn more details.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/geodatasource\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-15T02:40:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@_geodatasource\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/\",\"name\":\"What is Location Search Web Service |\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/gds-banner.png\",\"datePublished\":\"2021-09-20T00:00:00+00:00\",\"dateModified\":\"2026-01-15T02:40:37+00:00\",\"description\":\"This article shows the definition What is Location Search Web Service. Read about it to learn more details.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/gds-banner.png\",\"contentUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/gds-banner.png\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/what-is-location-search-web-service\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is Location Search Web Service\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\",\"name\":\"GeoDataSource Articles & Tutorials\",\"description\":\"Resources About GeoDataSource Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#organization\",\"name\":\"GeoDataSource.com\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-e1564122827936.png\",\"contentUrl\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/logo-e1564122827936.png\",\"width\":220,\"height\":27,\"caption\":\"GeoDataSource.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.geodatasource.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/geodatasource\\\/\",\"https:\\\/\\\/x.com\\\/_geodatasource\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Location Search Web Service |","description":"This article shows the definition What is Location Search Web Service. Read about it to learn more details.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/","og_locale":"en_US","og_type":"article","og_title":"What is Location Search Web Service |","og_description":"This article shows the definition What is Location Search Web Service. Read about it to learn more details.","og_url":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/","article_publisher":"https:\/\/www.facebook.com\/geodatasource\/","article_modified_time":"2026-01-15T02:40:37+00:00","og_image":[{"url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_site":"@_geodatasource","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/","url":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/","name":"What is Location Search Web Service |","isPartOf":{"@id":"https:\/\/www.geodatasource.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/#primaryimage"},"image":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png","datePublished":"2021-09-20T00:00:00+00:00","dateModified":"2026-01-15T02:40:37+00:00","description":"This article shows the definition What is Location Search Web Service. Read about it to learn more details.","breadcrumb":{"@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/#primaryimage","url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png","contentUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2021\/09\/gds-banner.png","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.geodatasource.com\/resources\/tutorials\/what-is-location-search-web-service\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.geodatasource.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/www.geodatasource.com\/resources\/tutorials\/"},{"@type":"ListItem","position":3,"name":"What is Location Search Web Service"}]},{"@type":"WebSite","@id":"https:\/\/www.geodatasource.com\/resources\/#website","url":"https:\/\/www.geodatasource.com\/resources\/","name":"GeoDataSource Articles & Tutorials","description":"Resources About GeoDataSource Services","publisher":{"@id":"https:\/\/www.geodatasource.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.geodatasource.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.geodatasource.com\/resources\/#organization","name":"GeoDataSource.com","url":"https:\/\/www.geodatasource.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geodatasource.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2019\/07\/logo-e1564122827936.png","contentUrl":"https:\/\/www.geodatasource.com\/resources\/wp-content\/uploads\/2019\/07\/logo-e1564122827936.png","width":220,"height":27,"caption":"GeoDataSource.com"},"image":{"@id":"https:\/\/www.geodatasource.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/geodatasource\/","https:\/\/x.com\/_geodatasource"]}]}},"_links":{"self":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/comments?post=667"}],"version-history":[{"count":2,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/667\/revisions"}],"predecessor-version":[{"id":704,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/docs\/667\/revisions\/704"}],"wp:attachment":[{"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/media?parent=667"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/doc_category?post=667"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.geodatasource.com\/resources\/wp-json\/wp\/v2\/doc_tag?post=667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}