# EasyDown Video Downloader API Response Inspector (`mrzhangbo/easydown-api-response-inspector`) Actor

Inspect sanitized video downloader API JSON: distinguish missing, null, empty and malformed media collections without fetching posts or downloading files.

- **URL**: https://apify.com/mrzhangbo/easydown-api-response-inspector.md
- **Developed by:** [Bo Zhang](https://apify.com/mrzhangbo) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EasyDown media API response inspector

A successful API response can contain an empty array, omit a media field, or return a field with an unexpected type. Those cases should not collapse into the same “zero files” message in a developer dashboard.

This Actor turns a batch of sanitized media API response fixtures into a small, consistent report. It checks the JSON API-envelope status before inspecting `images`, `videos` and `audios`. It preserves the difference between **missing**, **null**, **empty**, **present** and **unexpected_type**. It is a response-inspection utility, not a scraper or downloader.

### What you can use it for

Use it to compare captured, sanitized API responses before implementing an importer, check a frontend's empty-state logic, or review response-shape changes in a test dataset. It does not fetch social posts, follow media URLs, or use an EasyDown API key.

### Input

Pass a `responses` array containing 1–100 JSON response fixtures. For example:

```json
{
  "responses": [
    {
      "status": 200,
      "data": {
        "platform": "tiktok",
        "images": [],
        "videos": [{ "quality": "synthetic" }],
        "audios": null
      }
    },
    { "status": 401 }
  ]
}
```

Use synthetic or sanitized input. Do not submit API credentials, signed media URLs, private response headers, personal information or private-content data to a public example. The Actor needs none of those fields. Apify stores the run input under your account's storage and retention settings.

### Output

Each input response produces one dataset row in the same order. `response_index` is zero-based. `result` is one of `inspected`, `api_error`, `invalid_response`, `invalid_api_status` or `invalid_data`. Each media group has a `_state` and `_count` column. Counts are available only for arrays; otherwise they are `null`.

For the synthetic first response, images are `empty` with count `0`, videos are `present` with count `1`, and audios are `null` with a null count. The second response is classified as `api_error`; its media fields remain `not_checked` rather than being interpreted as successful empty results.

The default dataset can be exported through Apify's normal JSON or CSV controls. A `SUMMARY` record in the default key-value store reports the response count, inspected count and error-or-shape-problem count. Original input objects and media URLs are not copied into the output.

### Scope and limits

The `status` field is a JSON API-envelope field, not the actual HTTP transport status. Your integration must check HTTP status separately. This utility expects numeric `200` for a successful envelope and an object in `data`; it does not turn a string status into a number. It counts array entries without validating individual files, URLs, availability, permissions or download safety. A non-empty array does not guarantee downloadable media. An omitted field does not prove that the post has no media.

The inspection logic makes no requests to EasyDown, social platforms or media hosts. It performs no automatic retries and does not trigger EasyDown API billing. The Actor only reads its current input and writes the inspection result to the current run's default Apify storage. Apify platform compute and storage usage remain subject to the runner's plan and available allowance.

### EasyDown API context

I build EasyDown. For supported fields and platform endpoints, see the [EasyDown API reference](https://easydown.org/docs/en/api). The developer API is paid and uses an account, a Bearer token and credits; new accounts receive 10 trial credits. The separate browser downloader is free. Integrations should use supported public single-post URLs; this utility does not enable private-content access or profile crawling.

This original developer utility and its documentation were drafted with AI assistance. The offline classifier was checked against synthetic fixtures; no claim of live API integration testing is made.

# Actor input Schema

## `responses` (type: `array`):

Provide 1–100 sanitized or synthetic JSON response objects. Do not include tokens, signed URLs or private headers. This Actor inspects API-envelope status and optional media arrays; it does not call an API.

## Actor input object example

```json
{
  "responses": [
    {
      "status": 200,
      "data": {
        "platform": "tiktok",
        "images": [],
        "videos": [
          {
            "quality": "synthetic"
          }
        ],
        "audios": null
      }
    },
    {
      "status": 401
    },
    {
      "status": 200,
      "data": {
        "platform": "instagram",
        "images": [
          {},
          {}
        ],
        "videos": []
      }
    }
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "responses": [
        {
            "status": 200,
            "data": {
                "platform": "tiktok",
                "images": [],
                "videos": [
                    {
                        "quality": "synthetic"
                    }
                ],
                "audios": null
            }
        },
        {
            "status": 401
        },
        {
            "status": 200,
            "data": {
                "platform": "instagram",
                "images": [
                    {},
                    {}
                ],
                "videos": []
            }
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrzhangbo/easydown-api-response-inspector").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "responses": [
        {
            "status": 200,
            "data": {
                "platform": "tiktok",
                "images": [],
                "videos": [{ "quality": "synthetic" }],
                "audios": None,
            },
        },
        { "status": 401 },
        {
            "status": 200,
            "data": {
                "platform": "instagram",
                "images": [
                    {},
                    {},
                ],
                "videos": [],
            },
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mrzhangbo/easydown-api-response-inspector").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "responses": [
    {
      "status": 200,
      "data": {
        "platform": "tiktok",
        "images": [],
        "videos": [
          {
            "quality": "synthetic"
          }
        ],
        "audios": null
      }
    },
    {
      "status": 401
    },
    {
      "status": 200,
      "data": {
        "platform": "instagram",
        "images": [
          {},
          {}
        ],
        "videos": []
      }
    }
  ]
}' |
apify call mrzhangbo/easydown-api-response-inspector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrzhangbo/easydown-api-response-inspector"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dPctGF5wdbfZvqP0H/builds/7EAn236jBD9UCnZBY/openapi.json
