# Search Response

### Interpreting a Search Response

A search may result in zero or many matches. If one or more assets are matched, the search response conveys the following information:

* Matched Assets - the "provided ID" of the matched asset(s)
* Match Details - the details of the match including match duration, match segments and any modification details

Below is an example of a search response for an `audio` search that matched to one asset:

```json
{
  "lookup_ids": [
    "522174538802801153"
  ],
  "query_file_duration_seconds": 158.0,
  "matches": [
    {
      "provided_id": "my_custom_asset_id_123",
      "match_details": {
        "audio": {
          "query_match_duration_seconds": 158.0,
          "query_match_percentage": 100.0,
          "asset_match_duration_seconds": 207.0,
          "asset_match_percentage": 100.0,
          "segments": [
            {
              "query_start": 0,
              "query_end": 158,
              "asset_start": 0,
              "asset_end": 207,
              "audio_pitch": 450,
              "audio_speed": 130,
              "melody_transposition": null,
              "confidence": 100
            }
          ]
        },
        "melody": null,
        "video": null
      }
    }
  ]
}
```

Below is an example of a search response for a `melody` search that matched to one asset:

```json
{
  "lookup_ids": [
    "522174538802801153"
  ],
  "query_file_duration_seconds": 158.0,
  "matches": [
    {
      "provided_id": "my_custom_asset_id_123",
      "match_details": {
        "audio": null,
        "melody": {
          "query_match_duration_seconds": 158.0,
          "query_match_percentage": 100.0,
          "asset_match_duration_seconds": 207.0,
          "asset_match_percentage": 100.0,
          "segments": [
            {
              "query_start": 0,
              "query_end": 158,
              "asset_start": 0,
              "asset_end": 207,
              "audio_pitch": null,
              "audio_speed": null,
              "melody_transposition": 5,
              "confidence": 100
            }
          ]
        },
        "video": null
      }
    }
  ]
}
```

Below is an example of a search response for a `video` search that matched to one asset:

```json
{
  "lookup_ids": [
    "522174538802801153"
  ],
  "query_file_duration_seconds": 158.0,
  "matches": [
    {
      "provided_id": "my_custom_asset_id_123",
      "match_details": {
        "audio": null,
        "melody": null,
        "video": {
          "query_match_duration_seconds": 158.0,
          "query_match_percentage": 100.0,
          "asset_match_duration_seconds": 207.0,
          "asset_match_percentage": 100.0,
          "segments": [
            {
              "query_start": 0,
              "query_end": 158,
              "asset_start": 0,
              "asset_end": 207,
              "audio_pitch": null,
              "audio_speed": null,
              "melody_transposition": null,
              "confidence": 100
            }
          ]
        }
      }
    }
  ]
}
```

### Search Response Glossary

Below is a description of the fields provided in a search response:

<table data-full-width="false"><thead><tr><th width="300">Field</th><th>Description</th></tr></thead><tbody><tr><td>lookup_ids</td><td>Unique identifier(s) representing a particular search</td></tr><tr><td>query_file_duration_seconds</td><td>Total duration of the file submitted for search</td></tr><tr><td>matches</td><td>Match information for assets identified in the search</td></tr><tr><td>.provided_id</td><td>Custom ID of the identified asset</td></tr><tr><td>.match_details</td><td>Match details between the submitted file (query) and the identified asset</td></tr><tr><td>..audio (or ..melody)</td><td>Audio or Melody match details between query and identified asset</td></tr><tr><td>...query_match_duration_seconds</td><td>Match duration of the query that matched to the identified asset</td></tr><tr><td>...query_match_percentage</td><td>Match percentage (query match duration / query duration) of the query that matched to the identified asset</td></tr><tr><td>...asset_match_duration_seconds</td><td>Match duration of the identified asset that matched to query</td></tr><tr><td>...asset_match_percentage</td><td>Match percentage (asset match duration / asset duration) of the identified asset that matched to query</td></tr><tr><td>...segments</td><td>Details about the match segments between the submitted file (query) and the identified asset</td></tr><tr><td>....query_start</td><td>Start point of the query's match segment that matched to the identified asset</td></tr><tr><td>....query_end</td><td>End point of the query's match segment that matched to the identified asset</td></tr><tr><td>....asset_start</td><td>Start point of the asset's match segment that matched to the query</td></tr><tr><td>....asset_end</td><td>End point of the asset's match segment that matched to the query</td></tr><tr><td>....audio_pitch</td><td>For audio matches only: Difference in pitch (in terms of cents) between the query and the identified asset. For example a value of 0 indicates the pitch of both the query segment and the asset segment is the same. A value of 400 indicates the pitch of the query segment is 400 cents higher (or 4 semitones higher) than the speed of the asset segment</td></tr><tr><td>....audio_speed</td><td>For audio matches only: Difference in speed (in terms of %) between the query and the identified asset. For example a value of 100 indicates the speed of both the query segment and the asset segment is the same. A value of 125 indicates the speed of the query segment is 25% faster than the speed of the asset segment</td></tr><tr><td>....melody_transposition</td><td>For melody matches only: Pitch transposition (in terms of semitones) between the query and the identified asset. For example a value of 0 indicates the there is no transposition between the query segment and the asset segment. A value of -2 indicates the query segment is 2 semitones lower than the identified asset segment</td></tr><tr><td>....confidence</td><td>The confidence score reflects the system's certainty about each segment decision, providing a relative measure of certainty for each match, ranging from 85 to 100. While the score indicates how closely a segment matches, it’s intended to aid in QA prioritization rather than serve as a strict measure of match accuracy or consistency.<br>For more information on how best to use the confidence score, please visit our <a href="../../faq/identification-matching">FAQ</a></td></tr></tbody></table>
