Home API Reference Topic Guides

Search¶

The search endpoint lets you perform search on transcripts of Conversation objects associated with your account. There are three types of searches you can perform in Sift.

Standard search is the default search mode for Sift. This mode computes search rankings based on word matchings between the search query and the transcript.

Phonetic search uses the double metaphone phonetic encoding algorithm to perform searches based on the pronounciation of words. For example, the search query “fair” would match with any appearances of “fare” in transcripts.

Semantic search is fuzzy search mode that matches excerpts in transcripts with similar semantic contexts. For example, the search queries “canine” and “cat” would match with the word “dog” in a transcript.

Search Conversations¶

Request¶

url:https://api.gridspace.com/v0/search
method:POST
Property Type Description
At Least One Required Properties
query string The query you want to search for in the audio and conversation name.
missing_query string The words you want to be missing from the audio and conversation name.
conversation_ids list A list of ids of Conversation objects to search in. If this parameter is not supplied, then we search through all conversations.
tags list A list of conversation tags.
before string Find Conversation that have a start time before the provided value. ISO 8601 formatted date and time.
after string Find Conversation that have a start time after the provided value. ISO 8601 formatted date and time.
Optional Properties
is_phonetic boolean Whether or not to enable phonetic search for searching the audio only. Defaults to False. (Note: turning on phonetic search could drastically increase the number of false matches)
is_semantic boolean Whether or not to enable semantic search for searching the audio only. Defaults to False. (Note: turning on semantic search could drastically increase the number of false matches)
offset int The start position of the search results. Defaults to 0.
size int The number of search results to return. Defaults to 10.

Response¶

content-type:application/json

The response body contains a JSON object representing a paginated list of search results. See Paginated Results for more information. They are sorted by their relavance score if a query is provided. Otherwise they are sorted on the start time of the conversation with the most recent one first.

Property Type Description
Required Properties
next string URL of the next page of results, or null if this is the last page.
previous string URL of the previous page of results, or null if this is the first page.
total int The total number of search hits.
results list A list of search results.
results[]. conversation_id string The id of a conversation object where at least one search result is found.
results[].name string Name of Conversation.
results[].start_time string ISO 8601 formatted date and time.
results[].transcript string  
results[].tags list List of tags.
results[].tags.tag string A tag that was applied to the Conversation.
results[]. matched_transcript list List of dictionaries.
results[]. matched_transcript. index int The index of the word in the transcript.
results[]. matched_transcript. word string The word that was matched in the transcript.
results[]. matched_transcript. start_ms int The start time of the word in the audio file. Units are milliseconds.

Example¶

{
  "next" : null,
  "previous" : null,
  "total" : 2,
  "hits" : [
    {
      "conversation_id" : "2af22188c5c97256",
      "total" : 1,
      "hits" : [
        {
          "excerpt" : "this was searched",
          "start_ms" : 230,
          "duration_ms" : 2420
        }
      ]
    },
    {
      "conversation_id" : "5d3dc73fc8cf34be",
      "total" : 1,
      "hits" : [
        {
          "excerpt" : "another search query",
          "start_ms" : 28220,
          "duration_ms" : 30020,
        }
      ]
    }
  ]
}
  • Topic Guides
  • API Reference
    • REST API Reference
      • API Authentication
      • Paginated Results
      • Core Resources
      • Routines
      • Conversation Processors
      • Conversation Events
      • Search
    • VOIP Client Reference
    • Helper Libraries
    • Hosted Javascript API
© Copyright 2016, Gridspace. Created using Sphinx 1.5.6.