Search API
Search
This searches your files for the text provided.
GET
/v1/search
Authorization*
Request
qrequired
string
Your search query.
metadata
string
Include metadata.
user_id
string
Filter used to run isolated queries against individual user’s files.
context
Default: "False"boolean
Indicate where the keyword exists within the body of text from the file.
semantics
Default: "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%"
}
]
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%"
}
]