- pass a set of parameters and conditions in a structure similar to a traditional SQL query, and
- get matching files and folders along with the corresponding Metadata.
Using the Metadata API
Use the Metadata Query API when you want to- find content based strictly on Box Metadata and not document content,
- find results that immediately reflect creates, updates, and deletes to metadata values,
- leverage SQL-like logic to find content.
Using the Search API
Use the Search API when you want- fuzzy matching,
- results based on document text and metadata,
- enterprise-wide search.
- The indexing process is not instantaneous and therefore content is not immediately searchable. Indexing typically occurs within ten minutes, but can take longer depending on system load.
- The supported operations for metadata filters are limited. The Search API doesn’t perform comparisons on multiple metadata fields.
Metadata Query versus Search Scenarios
With both these tools at your disposal, you now can choose which to use and when. But which should you use? Here are a few situations illustrating when to use the Search API, and when to use Metadata Query API.| Scenario | Which to use |
|---|---|
| You want to find all content in an enterprise with document text or metadata that matches the keyword “Guarantee” for eDiscovery. | Search API
|
You want to find all documents with the metadata template “Contract” that have
| Metadata Query
|
You want to find all documents with the metadata template “Contract” that have
| This is not supported.
|