# YouTube Scraper & API | EveryInfra (`blushing_parachute/everyinfra-youtube-api`) Actor

YouTube data via one Actor: search, profile, user_posts, video, comments, followers, transcript, shorts. Pay per request, no start fee. First 3 requests free across EveryInfra Actors.

- **URL**: https://apify.com/blushing_parachute/everyinfra-youtube-api.md
- **Developed by:** [ECHO](https://apify.com/blushing_parachute) (community)
- **Categories:** Social media, Developer tools
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 search requests

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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

## YouTube Scraper & API | EveryInfra

Retrieve YouTube videos, Shorts, comments, captions, subscriber counts, and channel metadata.

Provide channel handles or video URLs. Subscriber counts are totals, not subscriber lists.

### Actions

| Action | What you get | Required | Optional | Results per request | Price per request |
|---|---|---|---|---|---|
| `search` | Search YouTube videos by keyword, up to 50 per call. Get channel, description, views, likes, comments, duration and publish date. `sort` orders by relevance, newest, most views or top rating. Results are not complete, and the ranking is not explained. | keyword | sort | 10 (up to 50) | $0.0010 |
| `profile` | Get a YouTube channel from its channel URL. Get bio, subscriber, video and view counts, verification, location, avatar, banner and creation date. It does not expose YouTube Analytics or a list of subscribers. | url | — | 1 | $0.0009 |
| `user_posts` | List videos from a YouTube channel URL, up to 50 per call. Get title, description, views, likes, comments, duration and publish date. Use `since` for a start date and `sort` for newest, oldest or popular. One batch may not cover the whole channel archive. | url | since, sort | 10 (up to 50) | $0.0014 |
| `video` | Fetch the title, description, channel, views, likes, comment count, duration and publish date of one YouTube video from its watch or share link. Comments and the transcript come from their own actions, `comments` and `transcript`. | url | — | 1 | $0.0010 |
| `comments` | Read comments on a YouTube video, up to 100 per call. Each comment has text, author, likes, reply count, date and a reply flag. Sort by newest or popular, and set a start date with `since`. Use `reply_to_id` to link replies. The full thread is not promised. | url | since, sort | 20 (up to 100) | $0.0014 |
| `followers` | Check the subscriber count of a YouTube channel from its handle. Get following, post, like and connection counts and a precision flag for rounded figures. Pass the @handle in `username`. It returns aggregate counts, not a list of subscribers. | username | channel | 1 | $0.0013 |
| `transcript` | Pull the captions of a YouTube video as full text and timestamped segments, with the track language, available languages and channel details. `language` requests a track, but not every video has captions and automatic translation is not guaranteed. | url | language | 1 | $0.0008 |
| `shorts` | Browse the Shorts of a YouTube channel by handle, up to 100 per call. Get title, thumbnail, views, likes, duration and publish date. Pass a handle in `username`, not a UC channel ID. One batch may not include every Short on the channel. | username | channel, since, sort | 20 (up to 100) | $0.0016 |

### Input

Pick an `action` and fill the fields it uses. Example:

```json
{
  "action": "search",
  "keyword": "espresso"
}
```

Fields that another action needs are ignored when left empty. API users can also pass `{"action": ..., "params": {...}}`.

### Output

Each result is one dataset row. Rows keep every field the source page exposes for that action; a field the platform hides or leaves empty for a record is omitted rather than filled with a placeholder. When there is a next page, the run's `OUTPUT` record holds `next_page_token`.

- `search`: `id`, `url`, `title`, `text`, `author_name`, `author_username`, `author_id`, `author_url`, `like_count`, `comment_count`, `view_count`, `duration`, `posted_at`, `thumbnail_url`, `hashtags`, `is_comments_disabled`, `is_members_only`, `is_paid_partnership`, `author_follower_count`, `author_video_count`, `author_view_count`, `author_created_at`, `description_links`, `search_rank`, `platform`
- `profile`: `channel_id`, `name`, `url`, `bio`, `subscriber_count`, `video_count`, `view_count`, `is_verified`, `location`, `avatar_url`, `banner_url`, `created_at`, `platform`
- `user_posts`: `id`, `url`, `title`, `text`, `author_name`, `author_username`, `author_id`, `author_url`, `like_count`, `comment_count`, `view_count`, `duration`, `posted_at`, `thumbnail_url`, `hashtags`, `is_comments_disabled`, `is_members_only`, `is_paid_partnership`, `author_follower_count`, `author_video_count`, `author_view_count`, `author_created_at`, `description_links`, `search_rank`, `platform`
- `video`: `id`, `url`, `title`, `text`, `author_name`, `author_username`, `author_id`, `author_url`, `like_count`, `comment_count`, `view_count`, `duration`, `posted_at`, `thumbnail_url`, `hashtags`, `is_comments_disabled`, `is_members_only`, `is_paid_partnership`, `author_follower_count`, `author_video_count`, `author_view_count`, `author_created_at`, `description_links`, `search_rank`, `platform`
- `comments`: `id`, `text`, `author_name`, `like_count`, `reply_count`, `posted_at`, `is_reply`, `reply_to_id`, `platform`
- `followers`: `id`, `username`, `url`, `follower_count`, `following_count`, `post_count`, `like_count`, `connection_count`, `precision`, `platform`
- `transcript`: `id`, `url`, `title`, `text`, `segments`, `language`, `available_languages`, `channel_id`, `channel_name`, `channel_username`, `view_count`, `like_count`, `comment_count`, `posted_at`, `platform`
- `shorts`: `id`, `url`, `title`, `thumbnail_url`, `view_count`, `like_count`, `duration`, `posted_at`, `author_name`, `author_id`, `author_url`, `platform`

### Pricing

Pay per event, charged only when a run delivers data:

- `search`: $0.0010, one event per started block of 10 results.
- `profile`: $0.0009, one event per non-empty request, whatever the row count.
- `user_posts`: $0.0014, one event per started block of 10 results.
- `video`: $0.0010, one event per non-empty request, whatever the row count.
- `comments`: $0.0014, one event per started block of 20 results.
- `followers`: $0.0013, one event per non-empty request, whatever the row count.
- `transcript`: $0.0008, one event per non-empty request, whatever the row count.
- `shorts`: $0.0016, one event per started block of 20 results.

Empty or failed requests are never charged. There is no actor-start fee and no per-row fee. Apify platform usage may apply.

### Free trial

The first 3 accepted data requests per Apify account are free across all EveryInfra Actors combined (a lifetime total, not per Actor and not reset). Invalid input does not use a trial; an accepted request that returns no data still does. After that a paid Apify plan is required.

### Notes

- Results reflect what is publicly visible when the run happens; counts can be lower than requested.
- One run makes one request. For more pages, start another run with `page_token` where the action supports it.

### Support

Open an issue on this Actor's Issues tab with the run ID.

# Actor input Schema

## `action` (type: `string`):

What to fetch. Each action uses only the fields listed for it below; other fields are ignored when empty.

## `keyword` (type: `string`):

Used by `search` (required). The search query term for the YouTube search action. If passed to compatibility inputs for the shorts action, this parameter acts as a channel name rather than initiating a site-wide Shorts search.

## `sort` (type: `string`):

Used by `search`, `user_posts`, `comments`, `shorts`. The sort order applied across YouTube actions. For search, accepted values are relevance, newest, most_viewed, and top_rated. For channel videos and Shorts, accepted values are newest, oldest, and popular. For comments, accepted values are newest and popular. Specifying this parameter on a single-video query does not filter that video's content.

## `url` (type: `string`):

Used by `profile` (required), `user_posts` (required), `video` (required), `comments` (required), `transcript` (required). The target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.

## `since` (type: `string`):

Used by `user_posts`, `comments`, `shorts`. The lower date bound for filtering channel videos, Shorts, or comments. It applies to those lists only.

## `username` (type: `string`):

Used by `followers` (required), `shorts` (required). The channel handle (optional leading @) required by the followers and shorts actions. The followers action returns aggregate subscriber counts rather than user lists. The shorts action prioritizes handles and does not treat UC... channel IDs as identical identifiers.

## `channel` (type: `string`):

Used by `followers`, `shorts`. A compatibility alias for specifying a channel handle. Full /channel/UC... URLs may fail to parse across helper utilities, so prefer passing a handle or using the URL parameter explicitly provided by the action.

## `language` (type: `string`):

Used by `transcript`. The requested language code for transcript content. Subtitles are returned based on available tracks; automatic translation is not guaranteed.

## `limit` (type: `integer`):

How many results to request for list actions. Defaults and maximums per action: `search` 10 (max 50); `user_posts` 10 (max 50); `comments` 20 (max 100); `shorts` 20 (max 100). Billing: `search` one event per started block of 10 results; `user_posts` one event per started block of 10 results; `comments` one event per started block of 20 results; `shorts` one event per started block of 20 results.

## `params` (type: `object`):

Optional JSON object with the same fields as above, for API and integration use. Flat fields and params must not disagree.

## Actor input object example

```json
{
  "action": "search",
  "keyword": "espresso"
}
```

# Actor output Schema

## `records` (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 = {
    "keyword": "espresso"
};

// Run the Actor and wait for it to finish
const run = await client.actor("blushing_parachute/everyinfra-youtube-api").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 = { "keyword": "espresso" }

# Run the Actor and wait for it to finish
run = client.actor("blushing_parachute/everyinfra-youtube-api").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 '{
  "keyword": "espresso"
}' |
apify call blushing_parachute/everyinfra-youtube-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,blushing_parachute/everyinfra-youtube-api"
        }
    }
}
```

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/Ymh7beShOZ0ylXhVP/builds/DndTMCy5fxO0tVWkm/openapi.json
