Search API
Last updated
Was this helpful?
Was this helpful?
POST /v1/search HTTP/1.1
Host: us-east-1-prod-aws-data.spiceai.io
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 157
{
"datasets": [
"app_messages"
],
"text": "Tokyo plane tickets",
"where": "user=1234321",
"additional_columns": [
"timestamp"
],
"limit": 3,
"keywords": [
"plane",
"tickets"
]
}{
"results": [
{
"matches": {
"message": "I booked use some tickets"
},
"dataset": "app_messages",
"primary_key": {
"id": "6fd5a215-0881-421d-ace0-b293b83452b5"
},
"data": {
"timestamp": 1724716542
},
"score": 0.914321
},
{
"matches": {
"message": "direct to Narata"
},
"dataset": "app_messages",
"primary_key": {
"id": "8a25595f-99fb-4404-8c82-e1046d8f4c4b"
},
"data": {
"timestamp": 1724715881
},
"score": 0.83221
},
{
"matches": {
"message": "Yes, we're sitting together"
},
"dataset": "app_messages",
"primary_key": {
"id": "8421ed84-b86d-4b10-b4da-7a432e8912c0"
},
"data": {
"timestamp": 1724716123
},
"score": 0.787654321
}
],
"duration_ms": 42
}