Search
Document AI search finds processed content by meaning, exact terms, identifiers, and common spelling variations.
Search returns page-level matches so users can open the most relevant location in a document.
Prerequisite
A document must be processed with embed: true before its content is available to semantic search.
If a document does not appear:
- Confirm its latest applicable run completed.
- Confirm the selected processing configuration enabled embeddings.
- Create a new run with embeddings enabled if needed.
Search in Shipwell
- Open Document AI .
- Enter a phrase, identifier, party name, or document concept in search.
- Apply filters if needed.
- Open a result to review the matched page.
Useful searches include:
-
proof of delivery -
BOL-10482 -
documents mentioning detention - A carrier, shipper, or consignee name
- A sentence describing the information you need
Search through the API
Use one or more q parameters:
curl --get \
"https://sandbox-api.shipwell.com/document-store/documents:search" \
-H "Authorization: Token <user-token>" \
--data-urlencode "q=proof of delivery for SW-1001" \
--data-urlencode "page=1" \
--data-urlencode "page_size=25"import requests
response = requests.get(
"https://sandbox-api.shipwell.com/document-store/documents:search",
headers={"Authorization": "Token <user-token>"},
params={
"q": "proof of delivery for SW-1001",
"page": 1,
"page_size": 25,
},
timeout=30,
)
response.raise_for_status()
results = response.json()The response includes:
-
data— page-level search hits -
count— total matching hits - Pagination links
-
queries— query variants used for the request
A hit includes:
-
document_idandfilename -
page_number -
A matching
content_textsnippet -
relevance -
Match signals such as
exact_score -
run_idandresult_id - Document status and type when available
-
Document associations in
entities
Use document_id, result_id, and page_number to open or inspect the matching source page.
Filter results
Available filters include:
| Parameter | Use |
|---|---|
document_id |
Search within one document. |
content_type |
Restrict results to a MIME type. |
entity_type |
Restrict results by association type. Repeat to include multiple values. |
entity_id |
Restrict results by association identifier. Repeat to include multiple values. |
status |
Restrict results by document status. Repeat to include multiple values. |
document_type |
Restrict results by detected document type. Repeat to include multiple values. |
For example, use entity_type=shipment and entity_id=SW-1001 to search documents associated with one shipment.
Multiple query variants
Repeat q to submit up to eight alternative descriptions:
?q=proof+of+delivery&q=delivery+receipt&q=signed+PODVariants are useful when your application knows domain-specific alternatives. Put the user's original query first.
Relevance controls
-
rerankdefaults totruefor higher-precision ordering. -
Set
rerank=falsewhen lower latency is more important than refined ordering. -
min_relevancecontrols the relevance floor when reranking is enabled. -
min_similaritycontrols the semantic similarity floor. -
snippet_charslimits the returned text for each hit. Set it to0to return scores without snippets.
Start with the defaults. Tune thresholds only after evaluating representative searches; high thresholds can remove useful results.
Pagination
-
pageis 1-indexed. -
page_sizedefaults to 25 and supports up to 100. -
Follow
next,previous, or the structuredlinksobject rather than constructing pagination URLs manually.
Search safety
Search results are evidence, not a final business decision. Before automating a high-impact action:
- Retrieve the matching document and page.
- Verify the relevant extracted value or source text.
- Apply your workflow's validation and authorization rules.