api.clarify.io
  1. search
api.clarify.io
  • bundles
    • List bundles
      GET
    • Create a bundle
      POST
    • Delete a bundle
      DELETE
    • Get a bundle
      GET
    • Update a bundle
      PUT
    • Get bundle insights
      GET
    • Request an insight to be run
      POST
    • Get bundle insight
      GET
    • Delete bundle metadata
      DELETE
    • Get bundle metadata
      GET
    • Update bundle metadata
      PUT
    • Delete bundle tracks
      DELETE
    • Get bundle tracks
      GET
    • Add a track for a bundle
      POST
    • Update a tracks for a bundle
      PUT
    • Delete a bundle track
      DELETE
    • Get bundle track
      GET
    • Add media to a track
      PUT
  • reports
    • Generate Group Report <span class="label">beta</span>
      GET
    • Generate Trends Report <span class="label">beta</span>
      GET
  • search
    • Search bundles
      GET
  • Schemas
    • Schemas
      • Bundle
      • BundleReport
      • Collection
      • Insight
      • Insights
      • ItemResult
      • MatchHit
      • Metadata
      • Ref
      • Ref (of Bundle)
      • Ref (of Track)
      • Ref_(of_Bundle)
      • Ref_(of_Track)
      • ReportPeriod
      • ReportPeriodBundle
      • SearchCollection
      • SearchTerm
      • TermMatch
      • TermResult
      • Track
      • Track_(array_item)
      • Tracks
      • object
  1. search

Search bundles

GET
/v1/search

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_fieldsBundle data searched
all dataThis is the default value.
insights.spoken_words[spoken words]All audio tracks are searched.
fieldnamemetadata.fieldnameYour custom metadata field. Wildcard metadata. searches all metadata fields.
bundle.fieldnamebundle.fieldnameThe searchable bundle fieldnames are name, id, external_id, created and updated. Wildcard bundle.* searches all bundle fields

As an example, suppose you have metadata fields name and description that you would like to search and other metadata fields you don't want to search. You also want to search the audio words, so you could specify query_fields = "insights.spoken_words, name, description".

filter is used to limit the search results according to specific criteria based on metadata and bundle values. It uses an expression syntax similar to Javascript boolean expressions. An expression is made up of zero or more terms joined by logical operators with each term having a field, a comparison operator, and a literal value. Parentheses can be used to logically group terms.

A filter term is of the form: 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 ==, <, >, <=, &gt=, or !=

literal-value is a number (integer or decimal), boolean true or false, or a string with either double quotes (") or single quotes (').

Logical operators between terms (and groups of terms) can be && (logical AND), || (logical OR). A logical NOT is ! and can be placed before a term (or group of terms.)


An example filter expression (assuming you have used metadata fields category and tag):


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").

Request

Query Params

Responses

🟢200OK
application/json
Body

🟠400Bad request
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.clarify.io//v1/search'
Response Response Example
200 - Example 1
{}
Modified at 2022-09-10 16:56:00
Previous
Generate Trends Report <span class="label">beta</span>
Next
Bundle
Built with