---
title: "Download Media"
method: POST
path: "/v2/media"
tags: ["Media"]
---

# Download Media

`POST /v2/media`

Download media from a URL. Waits for the result before responding.

## Request body

- MediaPayload
  - `country` string
  - `expected_mime_types` string[]
  - `locale` string
  - `storage` object
    - `object_name` string
    - `type` 's3' | 'gcs' | 'do' | 'oci'
    - `url` string, required
  - `url` string, uri, required

## Response `200`

Successful Response

- object
  - `data` object, required
    - `browser_actions` object — Browser actions execution results. Present only when browser_actions were specified in the request.
      - `results` object[], required
        - `duration` number, required
        - `error` string
        - `name` 'goto' | 'wait' | 'wait_for_element' | 'wait_for_navigation' | 'click' | 'fill' | 'press' | 'scroll' | 'auto_scroll' | 'screenshot' | 'get_cookies' | 'eval' | 'fetch', required
        - `result` unknown
        - `status` 'no-run' | 'in-progress' | 'done' | 'error' | 'skipped', required
      - `success` boolean, required
      - `total_duration` number, required
    - `cookies` unknown[] — The cookies collected from browser actions during the task.
      - unknown
    - `eval` unknown[] — The evaluation results from browser actions during the task.
      - unknown
    - `fetch` unknown[] — The http requests from browser actions made during the task.
      - unknown
    - `headers` object — The headers received during the task.
    - `html` string — The HTML content of the page.
    - `links` string[] — List of all unique URLs found on the page.
    - `markdown` string — The Markdown version of the HTML content.
    - `network_capture` object[] — The network capture data collected during the task.
      - `errorMessage` string
      - `filter` object, required
        - `method` 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'
        - `resource_type` union
          - 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm' — Resource type for network capture filtering
          - string[]
        - `status_code` union
          - number
          - number[]
        - `url` object
          - `type` 'exact' | 'contains', required
          - `value` string, required
        - `validation` boolean, required
        - `wait_for_requests_count` number, required
        - `wait_for_requests_count_timeout` number
      - `results` object[], required
        - `request` object, required
          - `body` string
          - `headers` object, required
          - `method` string, required
          - `resource_type` 'document' | 'stylesheet' | 'image' | 'media' | 'font' | 'script' | 'texttrack' | 'xhr' | 'fetch' | 'prefetch' | 'eventsource' | 'websocket' | 'manifest' | 'signedexchange' | 'ping' | 'cspviolationreport' | 'preflight' | 'other' | 'fedcm', required — Resource type for network capture filtering
          - `url` string, required
        - `response` object, required
          - `body` string, required
          - `headers` object, required
          - `serialization` 'none' | 'base64', required
          - `status` number, required
          - `status_text` string, required
    - `pages_html` string[] — Individual HTML content of each pagination page, before merging.
    - `parsing` union — The parsing results extracted from the HTML & network content.
      - ParsingSuccessResult
        - `entities` object, required
        - `status` 'success', required
      - ParsingErrorResult
        - `error` string, required
        - `status` 'error', required
      - object
    - `redirects` object[] — The list of redirects that occurred during the task.
      - `status_code` number, required
      - `url` string, required
    - `screenshots` unknown[] — Screenshots taken during the task, from browser actions, or the screenshot format.
      - unknown
  - `debug` object
    - `performance_metrics` object — Performance metrics collected during the task.
    - `proxy_total_bytes_usage` number — Total bytes used by the proxy during the task.
    - `transformed_output` unknown
    - `userbrowser` unknown
  - `metadata` object, required
    - `agent` string — The name of the agent used for the query.
    - `driver` string — The driver used for the task.
    - `localization_id` string — The localization identifier for the query.
    - `query_duration` number — The duration in milliseconds of the query processing.
    - `query_time` string — The time when the query was received.
    - `response_parameters` unknown
    - `tag` string — A tag associated with the query.
  - `pagination` union — Pagination information if applicable.
    - object
      - `next_page_params` object, required
    - object[]
      - `next_page_params` object, required
  - `status` 'success' | 'skipped' | 'fatal' | 'error' | 'postponed' | 'ignored' | 'rejected' | 'blocked', required — The status of the task.
  - `status_code` number — The HTTP status code of the task.
  - `task_id` string, required — Unique identifier for the task.
  - `url` string, required — The final URL.
  - `warnings` string[] — List of warnings generated during the task.

---

[API](https://skmtc.net/nimbleway/apis/api-gateway.md) · [All operations](https://skmtc.net/nimbleway/apis/api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nimbleway/api-gateway/revisions/9bfe220b7a29/schema)
