Skip to main content

Endpoint

GET https://api.voyantcloud.com/v1/products/search
Search for products across your catalog with full-text search and faceting. Results include both workspace-owned products and marketplace products from providers you have access to, with automatic workspace isolation and provider filtering.

Authentication

Authorization
string
required
Bearer token (e.g. Authorization: Bearer YOUR_API_KEY)

Query parameters

q
string
Search query string. If omitted, returns all products matching filters.
locale
string
default:"en"
Locale for search. Options: en, ro
page
integer
default:"0"
Zero-based page number (for page-based pagination)
pageSize
integer
default:"20"
Number of results per page (1-100)
offset
integer
Starting offset (for offset-based pagination). Takes precedence over page if provided.
length
integer
Number of results (for offset-based pagination). Defaults to pageSize if not provided.
type
string
Filter by product type (e.g., tour, cruise, accommodation)
status
string
Filter by status (e.g., active, draft, archived)
organizationId
string
B2B: Filter by organization visibility (UUID format)

Request example

curl "https://api.voyantcloud.com/v1/products/search?q=paris&locale=en" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

items
array
required
Array of product search results
page
integer
Current page number (page-based pagination only)
nbPages
integer
Total number of pages (page-based pagination only)
hitsPerPage
integer
Number of results per page (page-based pagination only)
offset
integer
Current offset (offset-based pagination only)
length
integer
Number of results returned (offset-based pagination only)
total
integer
required
Total number of matching results
tookMs
integer
required
Query execution time in milliseconds
facets
object
Facet buckets and counts for the current query (all facet attributes returned).
exhaustiveFacetsCount
boolean
Whether facet counts are exact (true) or approximate (false).
{
  "items": [
    {
      "id": "main:550e8400-e29b-41d4-a716-446655440000:en",
      "title": "Paris City Tour",
      "source": "main",
      "locale": "en",
      "snippet": "Discover the beauty of <em>Paris</em> with our guided city tour",
      "workspaceId": "wksp_01h8z3y4x2w1v0u9t8s7r6q5p4",
      "type": "tour",
      "score": 1234,
      "priceFrom": {
        "value": 89.99,
        "currency": "EUR"
      },
      "thumbnailUrl": "https://cdn.voyantcloud.com/products/paris-tour.jpg"
    },
    {
      "id": "marketplace:provider_prod_123:en",
      "title": "Louvre Museum Skip-the-Line",
      "source": "marketplace",
      "locale": "en",
      "snippet": "Skip the lines at the <em>Paris</em> Louvre Museum",
      "providerId": "provider_abc",
      "type": "experience",
      "score": 1123
    }
  ],
  "page": 0,
  "nbPages": 5,
  "hitsPerPage": 20,
  "total": 87,
  "tookMs": 42,
  "facets": {
    "type": {
      "tour": 56,
      "experience": 22
    },
    "status": {
      "active": 70,
      "draft": 17
    }
  },
  "exhaustiveFacetsCount": true
}

Error handling

Invalid query parameters.Possible causes:
  • pageSize exceeds 100
  • Invalid locale value
  • Invalid organizationId format
Solution: Check your query parameters match the documented formats and constraints.
Missing or invalid API key.Solution: Check your Authorization: Bearer header is set correctly.
Search service is temporarily unavailable.Solution: Retry the request after a short delay. If the issue persists, contact support.

Features

Workspace isolation

All search results are automatically filtered to include only:
  • Products owned by your workspace (source: "main")
  • Marketplace products from providers you have active connections or grants for

Override precedence

If your workspace has created overrides for a marketplace product, the override version is returned instead of the base marketplace product, automatically de-duplicated.

Relevance ranking

Results are ranked by Algolia’s relevance algorithm, which considers:
  • Text matching (query terms in title, description)
  • Popularity signals
  • Custom ranking factors

Use cases

Product search autocomplete

Build a search-as-you-type experience:
let searchTimeout

async function searchProducts(query) {
  clearTimeout(searchTimeout)

  searchTimeout = setTimeout(async () => {
    const response = await fetch(
      `https://api.voyantcloud.com/v1/products/search?q=${encodeURIComponent(query)}&pageSize=10`,
      {
        headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
      }
    )

    const results = await response.json()
    displayResults(results.items)
  }, 300) // Debounce 300ms
}
Search with type and status filters:
async function searchTours(query, status = 'active') {
  const params = new URLSearchParams({
    q: query,
    type: 'tour',
    status,
    pageSize: 20,
    locale: 'en',
  })

  const response = await fetch(
    `https://api.voyantcloud.com/v1/products/search?${params}`,
    {
      headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
    }
  )

  return await response.json()
}