1. Search API
  2. Search
GET

/v1/search

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%"
  }
]