Article suggestions
  1. Home
  2. Section: Developer Hub
  3. How to "Search" for members through the API

How to "Search" for members through the API

How to "Search" for members through the API
  • avatar
Written by Chan Nier
Updated on February 19, 2025

 Link: https://support.brilliantdirectories.com/support/solutions/articles/12000102884

In this article, we will be going over how to "Search" members using the /search API .

What this API endpoint allows to do is to send information to the endpoint, just like it would emulate the functionality of using one of the member search features on the site.

How to "Search" Members

The user search API leverages various parameters to retrieve data displayed the same way as on member search results pages on the site.

Parameters

There are 10 parameters that can be used to filter the results.

  1. dynamic: Set to 1 to simulate a Dynamic Category Filter search.
  2. q: Enter a keyword to search for in member data.
  3. pid: Enter member Top Level Category ID to search for. Enter a comma-separated list of IDs if the Dynamic Category Filter search is enabled.
  4. tid: Enter member Sub Level Category ID to search for. Enter a comma-separated list of IDs if the Dynamic Category Filter search is enabled.
  5. ttid: Enter member Sub-Sub Level Category ID to search for. Enter a comma-separated list of IDs if the Dynamic Category Filter search is enabled.
  6. address: Enter the location to search for. Example: Los Angeles, California, United States.
  7. output_type: Enter the type of response to receive. Valid options - html, array. By default the results will show in HTML similar to the search results page on the site. If set to Array the results will show in a JSON array.
  8. limit: Enter the maximum number of search results to return per page of results.
  9. sort: Set the Order the data would be display. The options here are : reviews, name ASC, name DESC, last_name_asc, last_name_desc
  10. page: Enter the page number of results to return. For Example, enter 2 to return the second page of results.

Example with Postman

When endpoint is sent by default the results will show in the HTML format, the same as the search results page:

When selecting Array as the output_type, the results will show in a Json Array format:

Important Note

When using the address field, it is required for the site to have the Pretty URL advanced setup enabled. For more information on how to do so: Set Up Pretty URLs with Google Maps


Thank you for leaving a rating!
Did you find this article helpful?
0 out of 0 people found this article helpful so far
Can't find what you're looking for? Get in touch
How can we help?
Send your question below and we'll get back to you as soon as possible.
Cancel
translation missing: en.kb.default.contact_form_error
×
Thanks for your message!
Thanks for your message!
×