Semantic content search
| Method | Path | Summary |
|---|---|---|
POST | /search | Search content |
GET | /search/quick | Quick search |
POST | /search/semantic | Semantic search |
GET | /search/suggest | Get search suggestions |
{% api-endpoint method=“POST” path=“/search” /%}
Search content
Operation ID: search
Content-Type: application/json
| Required
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | - |
types | string[] | No | - |
filters | object | No | - |
sort | object | No | - |
highlight | boolean | No | Default: true |
fuzzy | boolean | No | Default: false |
semanticSearch | boolean | No | Default: false |
page | integer | No | Default: 1 |
perPage | integer | No | Default: 20 |
Search results
| Field | Type | Required | Description |
|---|---|---|---|
data | object[] | No | - |
pagination | object | No | - |
facets | object[] | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.search.search({
query: "example-value",
types: [],
filters: {},
sort: {},
highlight: true,
fuzzy: false,
semanticSearch: false,
page: 1,
perPage: 20,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.search.search(
query="example-value",
types=[],
filters={},
sort={},
highlight=True,
fuzzy=True,
semantic_search=True,
page=1,
per_page=1
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/search' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "example-value",
"types": [],
"filters": {},
"sort": {},
"highlight": true,
"fuzzy": false,
"semanticSearch": false,
"page": 1,
"perPage": 20
}'
{% /tab %} {% /tabs %}
{% api-endpoint method=“GET” path=“/search/quick” /%}
Quick search
Operation ID: quickSearch
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | - |
limit | integer | No | Default: 10 |
Search results
| Field | Type | Required | Description |
|---|---|---|---|
results | object[] | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.search.quickSearch({
q: "example-value",
limit: 20,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.search.quick_search(
q="example-value",
limit=20
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X GET 'https://api.wave.online/search/quick?q=example-value&limit=20' \
-H 'Authorization: Bearer YOUR_API_KEY'
{% /tab %} {% /tabs %}
{% api-endpoint method=“POST” path=“/search/semantic” /%}
Semantic search
Operation ID: semanticSearch
Content-Type: application/json
| Required
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | - |
types | string[] | No | - |
limit | integer | No | Default: 10 |
Semantic search results
| Field | Type | Required | Description |
|---|---|---|---|
results | object[] | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.search.semanticSearch({
query: "example-value",
types: [],
limit: 10,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.search.semantic_search(
query="example-value",
types=[],
limit=20
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/search/semantic' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"query": "example-value",
"types": [],
"limit": 10
}'
{% /tab %} {% /tabs %}
{% api-endpoint method=“GET” path=“/search/suggest” /%}
Get search suggestions
Operation ID: searchSuggest
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | - |
limit | integer | No | Default: 5 |
Search suggestions
| Field | Type | Required | Description |
|---|---|---|---|
suggestions | object[] | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.search.searchSuggest({
q: "example-value",
limit: 20,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.search.search_suggest(
q="example-value",
limit=20
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X GET 'https://api.wave.online/search/suggest?q=example-value&limit=20' \
-H 'Authorization: Bearer YOUR_API_KEY'
{% /tab %} {% /tabs %}