Search API
Search
GET

/v1/search

Authorization*
curl --request GET \
  --url https://api.mixpeek.com/v1/search \
  --header 'Authorization: <authorization>'

Request

qrequired
string

Your search query.

metadataoptional
string

Include metadata.

user_idoptional
string

Filter used to run isolated queries against individual user’s files.

contextoptionalDefault: "False"
boolean

Indicate where the keyword exists within the body of text from the file.

semanticsoptionalDefault: "False"
boolean

Include the semantically similar terms in your results.

Response

file_idrequired
string

Your uploaded files’ unique identifier. BETA

filenamerequired
string

Name of the file.

importancerequired
string

The calculated importance or relevance of the file. Internally, the algorithms are a combination of TF-IDF, BM25, and Cosine Similarity (if Semantics is enabled).

from mixpeek import Mixpeek

mix = Mixpeek(api_key="API_KEY")

# simple search
mix.search(query="system")

# search with additional parameters
mix.search(
    "system",
    # everything below is optional
    user_id="john_smith_123",
    context="true",
    tags="legal, document"
)
[
  {
    "file_id": "123",
    "filename": "prescription.pdf",
    "importance": "100%"
  }
]