Skip to main content
POST
/
search
Python
import os
from qaip import Qaip

client = Qaip(
    api_key=os.environ.get("QAIP_API_KEY"),  # This is the default and can be omitted
)
response = client.search(
    query="machine learning and artificial intelligence",
)
print(response.created)
{
  "created": 1677649420,
  "results": [
    {
      "id": "<string>",
      "text": "<string>",
      "url": "<string>",
      "title": "<string>",
      "timestamp": 123,
      "page_number": 0,
      "keywords": [
        "<string>"
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
query
string
required

Search query string

Example:

"machine learning and artificial intelligence"

tags
string[]

target tag names to be obtained

tag_ids
string[]

target tag IDs to be obtained

tag_filter_logic
enum<string>
default:OR

Logical operator for combining filter conditions

Available options:
AND,
OR
source_types
enum<string>[]

The type of the source

Available options:
crawl,
local_file,
google_drive,
github,
notion
file_types
enum<string>[]

The type of the source file

Available options:
html,
pdf,
ppt,
pptx,
pptm,
doc,
docx,
docm,
xls,
xlsx,
xlsm,
md,
txt,
jsonl,
png,
jpg,
webp,
heic,
heif,
wav,
mp3,
aiff,
aac,
m4a,
ogg,
flac,
mp4,
mpg,
mov,
avi,
flv,
webm,
wmv,
3gp,
notion_page
date_from
integer

Start date for content search (Unix timestamp in seconds)

Required range: x >= 1735639200
Example:

1735639200

date_to
integer

End date for content search (Unix timestamp in seconds)

Required range: x >= 1735639200
Example:

1735639200

domains
string[]

Array of domains to search within (supports partial matching)

Example:
["example.com", "blog.example.com"]
metadata
object

(reserved for future use) Filter group with nested structure. Supports combining filters with AND/OR logic.

source_metadata
object

Filter by individual source/file metadata from source_metadatas table

chunk_metadata
object

Filter by chunk-level metadata from chunk_metadatas table

limit
integer
default:10

Maximum number of results to return

Required range: 1 <= x <= 100
Example:

10

offset
integer
default:0

Number of results to skip

Required range: x >= 0
Example:

0

use_postfilter
boolean
default:false

Whether to bypass LanceDB prefilter and apply WHERE after the vector search (IVF_PQ) returns top-K. Significantly faster for broad filters that cover most of the table, but may return fewer than limit results when the hit rate is low.

Response

Successful search results

created
integer
required

The Unix timestamp (in seconds) of when the search was performed

Example:

1677649420

results
object[]
required

Array of search results