Searches the bundles and returns a list of matching bundles, along with what matched and where for each bundle.
query is used to search for text in the audio and metadata. It uses a simple query language similar to Google. At its simplest, it can be a space separated list of words (ex. open voice
) which will find all bundles matching all the words. To search for a phrase, put it in quotes (ex. "open source"
) You can exclude bundles that contain a word by putting a minus (hyphen) in front of the word (ex. -opaque
) To search for one word or another, use OR
(in uppercase) between the words (ex. pizza OR pasta
). As an alternative to OR
, you can use |
(pipe character). A full query could look something like: restaurant "little italy" pizza OR pasta -mushrooms
query_fields is used to specify what data in a bundle the query will search. It can contain one or more of insights.spoken_words, metadata fields, and/or bundle fields. Multiple values can be either an array of strings or a comma or space separated single string. By default (if the query_fields param is not included in a request or is a single empty string) all data will be searched.
query_fields | Bundle data searched | |
all data | This is the default value. | |
insights.spoken_words | [spoken words] | All audio tracks are searched. |
fieldname | metadata.fieldname | Your custom metadata field. Wildcard metadata. searches all metadata fields. |
bundle.fieldname | bundle.fieldname | The searchable bundle fieldnames are name, id, external_id, created and updated. Wildcard bundle.* searches all bundle fields |
field-name comparison-operator literal-value
where:field-name
is a metadata field or bundle.name
, bundle.id
, bundle.external_id
, bundle.created
, or bundle.updated
.comparison-operator
is ==
, <
, >
, <=
, >=
, or !=
literal-value
is a number (integer or decimal), boolean true
or false
, or a string with either double quotes ("
) or single quotes ('
).&&
(logical AND), ||
(logical OR). A logical NOT is !
and can be placed before a term (or group of terms.)category=="music" && (tag == "soft" || tag == "smooth") && tag != "jazz" && bundle.created > "2014-03-15T00:00:00.0Z"
language parameter specifies the language of the words in the search query. This value is used for word-stemming etc. while searching text. Regardless of what you set for this parameter, all your bundles will be searched, no matter what language content they contain. Supported languages: en, en-UK, en-US, es, fr.
After getting the initial list, use the first, next, prev link relations to get more bundles in the list. Note that next will not be available at the end of the list and prev will not be available at the start of the list. A maximum of limit items will be returned. If the results are exactly one page neither prev nor next will be available.
The embed parameter specifies link relations to embed in the results. For link relations that are curies (ex. "clarify:metadata"), you may simply use the base name (ex. "metadata").
curl --location --request GET 'https://api.clarify.io//v1/search'
{}