Search API

Search for products

post

Search for products

Authorizations
Body
strategystring · enumRequired

Strategy to use for search

Example: SEMANTICPossible values:
schemaIdstringRequired

ID of the product schema you're querying against

Example: ticketed-events
querystringRequired

The search term

Example: speakeasy venues to listen to live music and have a cocktail
topNintegerRequired

Number of results to retrieve

Example: 10
pageintegerOptional

Page number to retrieve (defaults to 1 if not provided)

Example: 3
profileIdstringOptional

Unique identifier of the anonymous or known profile. Only required when using a geo filter on the profile's location.

Example: abcd-1234-abcd-1234
Responses
200

Fetched search results successfully

No content

post
/search
POST /search HTTP/1.1
Host: product-api.userflux.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 847

{
  "strategy": "SEMANTIC",
  "schemaId": "ticketed-events",
  "query": "speakeasy venues to listen to live music and have a cocktail",
  "topN": 10,
  "page": 3,
  "searchFields": [
    {
      "path": "description",
      "weight": 1.5
    }
  ],
  "propertyFilters": {
    "join": "AND",
    "groups": [
      {
        "join": "AND",
        "conditions": [
          {
            "property": "category",
            "operator": "EQUAL",
            "dataType": "STRING",
            "value": "music"
          }
        ]
      }
    ]
  },
  "geoFilter": {
    "type": "RADIUS",
    "radius": {
      "source": "CUSTOM",
      "distance": 25,
      "distanceUnit": "KILOMETERS",
      "latitude": 51.5074,
      "longitude": -0.1278
    },
    "geoBox": {
      "pair": "NE_SW",
      "northLatitude": 51.5074,
      "northLongitude": -0.1278,
      "southLatitude": 51.5074,
      "southLongitude": -0.1278
    }
  },
  "postFilter": {
    "verifyDateRange": {
      "startDateProperty": "startDate",
      "endDateProperty": "endDate",
      "dateRange": [
        "2025-09-27T00:00:00.000000000Z",
        "2025-09-28T23:59:59.999999999Z"
      ]
    },
    "distinctBy": "merchantId"
  },
  "profileId": "abcd-1234-abcd-1234"
}

No content

Last updated