---
title: Read and filter results
description: "Get the full result of an analysis, filter it in your own code, and what the language parameter does today."
url: "https://mediaseer.ai/docs/guides/read-results/"
---

# Read and filter results

Once an analysis is `FINISHED`, [`getVodAnalysisResults`](https://mediaseer.ai/docs/api/operations/getvodanalysisresults/) returns its full result: the video as a whole, its scenes, and the camera shots of each scene. The [result format](https://mediaseer.ai/docs/results/) page has the shape, what an absent or `UNKNOWN` value means, and how the API’s answer differs from the app’s JSON download ([two shapes](https://mediaseer.ai/docs/results/#two-shapes)).

The examples need bash, curl and jq, and read `MEDIASEER_API_URL`, `MEDIASEER_API_KEY` and `ANALYSIS_ID` from the environment; see the [quickstart](https://mediaseer.ai/docs/guides/quickstart/#prepare). The examples keep credentials off curl’s command line and ignore your curl configuration.

## Optional browser observations

Fetching results through an API, CLI or MCP tool is not a browser view or download signal. With effective permission, the web app records a foreground rendered-results view once per navigation and explicit JSON-report or `MP4`-clip download intent. Polling, URL refreshes, retries and late opt-in do not replay a view or imply a saved download. See [analytics settings](https://mediaseer.ai/docs/guides/analytics/).

## Filter in your code

The API has no filter: no parameter picks scenes, scene types or a time range. You get the whole result and filter it in your own code. The example keeps the scenes that start in the first half of the video:

```bash title="results.sh"
#!/usr/bin/env bash
#
# Gets the result of the analysis ANALYSIS_ID and keeps the scenes that start in the first half of the
# video, each with its id, title, type, start and end. The API has no filter: this happens here.
set -euo pipefail

base="${MEDIASEER_API_URL:?the API origin, without /api/v1}"
base="${base%/}/api/v1"
: "${MEDIASEER_API_KEY:?your API key}"
id="${ANALYSIS_ID:?the id of a finished analysis}"

api() { curl -q -sS -H @- "$@" <<<"X-Api-Key: $MEDIASEER_API_KEY"; }

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

status="$(api -o "$tmp/results.json" -w '%{http_code}' "$base/vod-analysis/$id/results")" || {
  echo "results got no answer: curl exit $?" >&2
  exit 1
}
if [[ "$status" != 200 ]]; then
  echo "results answered $status $(jq -r '.code // empty' "$tmp/results.json" 2>/dev/null || true)" >&2
  exit 1
fi

# A field without a value is left out, never null, so a scene can lack a start. Without the video's
# duration, every scene with a start is kept.
jq '.analysis
  | (if .duration then .duration / 2 else infinite end) as $half
  | [.scenes[]
      | select(.startInSeconds != null and .startInSeconds < $half)
      | {id, title, type, startInSeconds, endInSeconds}
      | with_entries(select(.value != null))]' "$tmp/results.json"
```

Other filters work the same way over `analysis.scenes`, for example `select(.type == "ADS")` for the scenes the analysis took for advertisements. A field without a value is left out, not sent as `null`, so a filter has to allow for missing fields. The result doesn’t change once the analysis is `FINISHED`: read it once and keep it.

## No translations

Translated results are not available; see [result format](https://mediaseer.ai/docs/results/#translations).
