{"id":950,"date":"2025-03-24T14:28:06","date_gmt":"2025-03-24T14:28:06","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/rest-api-filter-search-results\/"},"modified":"2025-04-03T15:24:27","modified_gmt":"2025-04-03T14:24:27","slug":"rest-api-filter-search-results","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/code-snippets\/rest-api-filter-search-results\/","title":{"rendered":"REST API &#8211; Filter Search Results"},"content":{"rendered":"\n<p>The GeeoDirectory REST API supports search and filtering.<\/p>\n\n\n\n<p>Here are parameters that can be used as filters<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-html\">context\t\t\t\t\t\t&quot;Scope under which the request is made; determines fields present in response.&quot; \npage\t\t\t\t\t\t&quot;Current page of the collection.&quot; \nper_page\t\t\t\t\t&quot;Maximum number of items to be returned in result set.&quot; \nsearch\t\t\t\t\t\t&quot;Limit results to those matching a string.&quot; \nafter\t\t\t\t\t\t&quot;Limit response to posts published after a given ISO8601 compliant date.&quot; \nmodified_after\t\t\t\t\t&quot;Limit response to posts modified after a given ISO8601 compliant date.&quot; \nauthor\t\t\t\t\t\t&quot;Limit result set to posts assigned to specific authors.&quot; \nauthor_exclude\t\t\t\t\t&quot;Ensure result set excludes posts assigned to specific authors.&quot; \nbefore\t\t\t\t\t\t&quot;Limit response to posts published before a given ISO8601 compliant date.&quot; \nmodified_before\t\t\t\t\t&quot;Limit response to posts modified before a given ISO8601 compliant date.&quot; \nexclude\t\t\t\t\t\t&quot;Ensure result set excludes specific IDs.&quot; \ninclude\t\t\t\t\t\t&quot;Limit result set to specific IDs.&quot; \noffset\t\t\t\t\t\t&quot;Offset the result set by a specific number of items.&quot; \norder\t\t\t\t\t\t&quot;Order sort attribute ascending or descending.&quot; \norderby\t\t\t\t\t\t&quot;Sort collection by object attribute.&quot; \nslug\t\t\t\t\t\t&quot;Limit result set to posts with one or more specific slugs.&quot; \nstatus\t\t\t\t\t\t&quot;Limit result set to posts assigned one or more statuses.&quot; \ntax_relation\t\t\t\t\t&quot;Limit result set based on relationship between multiple taxonomies.&quot; \ncountry\t\t\t\t\t\t&quot;Limit results to specific country.&quot; \nregion\t\t\t\t\t\t&quot;Limit results to specific region.&quot; \ncity\t\t\t\t\t\t&quot;Limit results to specific city.&quot; \nneighbourhood\t\t\t\t\t&quot;Limit results to specific neighbourhood.&quot; \nnear\t\t\t\t\t\t&quot;Filter posts by near address. Ex: 230 Vine Street, Philadelphia&quot; \nip\t\t\t\t\t\t&quot;IP to find nearest posts.&quot; \nlatitude\t\t\t\t\t&quot;Filter by latitude. Ex: 39.9558230481.&quot; \nlongitude\t\t\t\t\t&quot;Filter by longitude. Ex: -75.1440811157.&quot; \ndistance\t\t\t\t\t&quot;Filter posts within distance xx miles.&quot; \ngd_place_tags\t\t\t\t\t&quot;Limit result set to all items that have the specified term assigned in the gd_place_tags taxonomy.&quot; \ngd_place_tags_exclude\t\t\t\t&quot;Limit result set to all items except those that have the specified term assigned in the gd_place_tags taxonomy.&quot; \ngd_placecategory\t\t\t\t&quot;Limit result set to all items that have the specified term assigned in the gd_placecategory taxonomy.&quot; \ngd_placecategory_exclude\t\t\t&quot;Limit result set to all items except those that have the specified term assigned in the gd_placecategory taxonomy.&quot;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The GeeoDirectory REST API supports search and filtering. Here are parameters that can be used as filters<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,433],"class_list":["post-950","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-code-snippets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/950","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=950"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/950\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=950"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=950"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}