Skip to content

Search API

Andrew Maclean edited this page Jun 25, 2024 · 4 revisions

There's three main search APIs for Sunday Peak, searchUsers, searchAdventures, and searchZones. This section describes how to call each of the search endpoints to retrieve data.

The searchAdventures and searchZones APIs don't require an AuthToken and are meant to be used without logging in. The searchUsers API requires a token and returns data about a given user. The userId of the user making the search is also logged with every search call.

Search Users

This query sends a full-text search string and gets back a list of users matching the string.
Note: The string must include full words expected in the result

This query returns user data and needs an auth token to be used.

Endpoint

https://api.sundaypeak.com/search/users?q=<SearchString>

Content-Type: application/json
HTTP Method: GET

SearchString is a string type

Response

{
  data: {
    search_results: ShortUser[]
  },
  status_code: Int
  timestamp: Int
}
Key Type Description
search_results ShortUser[] A list of shortened user objects that meet the search criteria
status_code Int
timestamp Int

Search Adventures

This query sends a full-text search string and gets back a list of adventures matching the string.
Note: The string must include full words expected in the result

Endpoint

https://api.sundaypeak.com/search/adventures?q=<SearchString>

Content-Type: application/json
HTTP Method: GET

SearchString is a string type

Response

{
  data: {
    search_results: ShortAdventure[]
  },
  status_code: Int
  timestamp: Int
}
Key Type Description
search_results ShortAdventure[] A list of shortened adventure objects that meet the search criteria
status_code Int
timestamp Int

Search Zones

This query sends a full-text search string and gets back a list of zones matching the string.
Note: The string must include full words expected in the result

Endpoint

https://api.sundaypeak.com/search/zoens?q=<SearchString>

Content-Type: application/json
HTTP Method: GET

SearchString is a string type

Response

{
  data: {
    search_results: ShortZone[]
  },
  status_code: Int
  timestamp: Int
}
Key Type Description
search_results ShortZone[] A list of shortened zone objects that meet the search criteria
status_code Int
timestamp Int

Clone this wiki locally