Skip to main content
POST
/
v2
cURL
curl --request POST \
  --url https://{appUniqueId}.fast.sparq.ai/v2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "fields": "<array>",
  "textFacets": "<array>",
  "searchFields": "<array>",
  "filter": "<string>",
  "sort": "<array>",
  "skip": 0,
  "count": 123,
  "collection": "<string>",
  "facetCount": 123,
  "groupCount": 123,
  "typoTolerance": 123,
  "textFacetFilters": {},
  "numericFacets": {},
  "numericFacetFilters": {},
  "groupBy": "<string>"
}
'
{
  "query": {},
  "results": "<array>",
  "textFacets": "<array>",
  "numericFacets": "<array>",
  "responseTime": 123,
  "totalHits": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

appUniqueId
string
required

Unique identifier for the application.

Body

application/json

Data for searching records within the collection.

query
string

The search query string.

fields
array

Fields to be returned in the search results.

textFacets
array

Text-based facets to be included in the search results for filtering and categorization.

searchFields
array

Fields to be searched against for the given query.

filter
string

Additional filtering criteria for the search.

sort
array

Sorting criteria for the search results.

skip
integer
default:0

Number of results to skip.

count
integer

Number of results to return.

collection
string

The collection or dataset to search within.

facetCount
integer

Maximum number of facet values to return for each facet.

groupCount
integer

Number of groups to return for grouping results.

typoTolerance
integer

Level of tolerance for typos in the search query.

textFacetFilters
object

Filters to be applied to text-based facets.

numericFacets
object

Numeric-based facets to be included in the search results for filtering and categorization.

numericFacetFilters
object

Filters to be applied to numeric-based facets.

groupBy
string

Field for grouping search results.

Response

Successful search response.

query
object

The request query sent to the server.

results
array

The response sent from the server matching the search query.

textFacets
array

Text-based facets response received after the search.

numericFacets
array

Numeric-based facets response received after the search.

responseTime
integer

Response time taken by the server to send the response.

totalHits
integer

Number of results fulfilling the search criteria.