# Traffic Generator – YouTube, Web, Etsy, Behance & more (`crawl_craft/traffic-generator-youtube-web-etsy-behance`) Actor

Not sure your analytics, pages and load times hold up under real visits? Send test visits to sites, YouTube videos, Etsy shops or Behance pages you own and get one row per visit: status, analytics hits seen, Core Web Vitals and stress-test latency.

- **URL**: https://apify.com/crawl_craft/traffic-generator-youtube-web-etsy-behance.md
- **Developed by:** [Crawl Craft](https://apify.com/crawl_craft) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### Traffic Generator — visit results, analytics hits and load timings

**Traffic Generator** sends real visits to web pages, YouTube videos, Etsy shops and Behance profiles that you own or are allowed to test, and returns one data row per visit. Each row shows the HTTP status, whether a bot wall blocked the visit, load timings and Core Web Vitals, which analytics tags are on the page and which of them received a hit, time on page, scroll depth, pages clicked and the visitor used. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a monitoring pipeline. Use it to check that your analytics really count visits and to load test your own site.

### Why Choose This Traffic Generator?

- One row per visit: you see what happened instead of being told to check a dashboard.
- Honest counters: a visit is marked as counted by analytics only when a real analytics hit was seen, and a YouTube visit whose player shows an error is never reported as a view.
- Three modes: browser visits, fast HTTP visits and a stress test with p50, p90 and p99 latency.
- Bulk input: paste a long list of URLs, set visits per URL and the run ends by itself.
- Visits appear in the Output tab while the run is still going, split into separate tables (the per-URL table is filled when the run ends).
- Starts without a proxy and moves to stronger proxies on its own if the target refuses visits.

### Key Features

- Generate pageviews with a real browser: varied devices and screen sizes, referrers, languages, scrolling, mouse movement and time on page.
- Click through internal pages: set pages per visit to open the landing page plus pages inside the site.
- Play YouTube videos and report how many seconds really played.
- Platform facts: YouTube title, channel and view count, Etsy shop sales, Behance followers and views.
- Website stress test: many parallel requests with latency percentiles and requests per second.
- Core Web Vitals per visit: TTFB, DOM ready, load, FCP, LCP and CLS.
- Analytics check: GA4, Tag Manager, Meta Pixel, Hotjar, Clarity, LinkedIn, TikTok, Plausible and many more are recognised on the page and in the hits sent.
- Kill switch, failure guard and screenshots per visit.

### Input

```json
{
  "urls": ["https://blog.apify.com/", "https://www.youtube.com/watch?v=jNQXAC9IVRw", "https://www.behance.net/tubik"],
  "mode": "browser",
  "visits_per_url": 2,
  "dwell_seconds": "15-40",
  "pages_per_visit": 2,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

| Field | What it does |
|---|---|
| `urls` (required) | Pages, videos or profiles to visit, one per line. Bulk lists are welcome. |
| `mode` | `browser` (counted by analytics), `http` (fast, server logs only) or `stress` (load test). |
| `visits_per_url` | Visits every URL gets. Total visits = URLs × this number. Free plan: up to 10 visits per run in total. |
| `dwell_seconds` | Time on page per visit: a number or a range such as `15-40` (browser mode). |
| `pages_per_visit` | 1 = landing page only, 3 = landing page plus 2 clicked pages (browser mode). |
| `scroll`, `youtube_autoplay` | Scroll and move the mouse like a reader; press play on YouTube videos. |
| `device_mix`, `mobile_share`, `locales`, `referrers` | Which devices, languages and traffic sources the visitors use. |
| `concurrency`, `stress_concurrency` | Parallel visitors (browser and HTTP) and parallel requests (stress test). |
| `headless`, `retry_blocked_headful`, `browser_channel`, `screenshot` | Browser behaviour: hidden or visible window, retry blocked visits in a visible window, browser build, screenshots. |
| `block_resource_types`, `block_url_patterns` | Skip files or addresses to save bandwidth. |
| `timeout_seconds`, `max_retries`, `end_after_seconds`, `max_consecutive_failures` | Timeouts, retries, the kill switch and the failure guard. |
| `proxyConfiguration` | Optional. Runs start without a proxy; stronger proxies are used on their own if visits are refused. |

### Output

Each visit is one row. This is a real browser-mode row, shortened:

```json
{
  "visit": 1,
  "url": "https://blog.apify.com/",
  "final_url": "https://blog.apify.com/",
  "platform": "web",
  "mode": "browser",
  "route": "direct",
  "headful": false,
  "started_at": "2026-10-25T12:34:06+00:00",
  "duration_seconds": 23.2,
  "status_code": 200,
  "ok": true,
  "blocked": false,
  "error": null,
  "page": { "title": "Apify Blog: Guides to the largest marketplace of tools for AI", "language": "en", "h1": "Apify Blog", "word_count": 1090, "internal_links": 62, "external_links": 64 },
  "timing_ms": { "ttfb": 43, "dom_content_loaded": 4068, "load": 10897, "fcp": 3344, "lcp": 3972, "cls": 0.001 },
  "network": { "requests": 395, "failed_requests": 34, "transfer_bytes": 418841, "console_errors": 2 },
  "analytics": {
    "tags_on_page": { "ga4": ["G-62P18XN9NS"], "google_tag_manager": ["GTM-MNGXGGB"] },
    "beacons_fired": ["Google Analytics", "HubSpot", "Microsoft Clarity"],
    "scripts_loaded": ["Google Tag Manager", "Segment"],
    "pageview_counted": true
  },
  "engagement": { "dwell_seconds": 9.9, "scroll_depth_pct": 36, "pages_visited": ["https://blog.apify.com/", "https://blog.apify.com/tag/thought-leadership/"], "clicks": 1 },
  "visitor": { "device": "Desktop Chrome HiDPI", "device_type": "desktop", "viewport": "1280x720", "locale": "en-US", "referrer": "direct", "proxy": null },
  "platform_data": null
}
```

| Table | What it holds |
|---|---|
| Visits | The full row above, one per visit. |
| Performance | Timings, Core Web Vitals, request counts and bytes. |
| Pages | The landing page and every page clicked inside a visit. |
| Analytics | Tags on the page, hits that fired, libraries that only loaded, counted yes/no. |
| Engagement | Time on page, scroll depth, pages visited, clicks. |
| Visitors | Device, viewport, language, referrer and proxy address. |
| Platform data | YouTube, Etsy and Behance facts. |
| Per URL | Visits, successes, blocks and average timings for each URL. |

The Visits table has one view per section (page, timings, network, analytics, engagement, visitor, platform data), and the key-value store record `OUTPUT` holds the whole run in one file: `{"summary": {...}, "visits": [...]}`.

The run summary (success rate, status codes, TTFB and load percentiles, requests per second in stress mode) is saved as `RUN_SUMMARY` in the key-value store. In HTTP mode no scripts run, so `pageview_counted` stays `false` and the row says why. Stress rows keep only the fields a load test needs.

### 🚀 How to Use (Apify Console)

1. Log in at https://console.apify.com and open **Actors**.
2. Find **Traffic Generator** and open it.
3. Add your URLs, pick a mode and set visits per URL. Leave the proxy as it is unless you want to start with one.
4. Click **Start**.
5. Watch the log: one line per finished visit while the tables fill.
6. Open the **Output** tab when the run completes.
7. Export to JSON, CSV or Excel.

### 🤖 Use via API / MCP

```bash
curl -X POST "https://api.apify.com/v2/actors/<ACTOR_ID>/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/"],"mode":"http","visits_per_url":5}'
```

Replace `<ACTOR_ID>` with the ID shown on the Actor page. For AI agents, add the Apify server with `claude mcp add --transport http apify "https://mcp.apify.com"`; the agent finds this Actor through the server's search, details and call tools.

### Best Use Cases

- Check that GA4, Meta Pixel or Tag Manager count visits on a site you own.
- Measure load speed and Core Web Vitals from many different visitor setups.
- Load test a staging site or your own site before a campaign.
- Confirm that a YouTube embed or an Etsy or Behance page loads for real visitors.

### Pricing

This Actor uses pay-per-event pricing. A visit that succeeds is saved and billed as one result. Blocked or failed visits are saved so you can see what happened and are not billed. If you set a maximum cost per run, the Actor stops cleanly when it is reached.

### Frequently Asked Questions

**Does every visit count in my analytics?** Only browser-mode visits run scripts, so only they can be counted. The `pageview_counted` field is `true` only when a real analytics hit was seen during that visit. HTTP and stress visits are visible in server logs and CDN counters only.

**Can it raise my YouTube view count?** The Actor reports whether the video streamed and how many seconds played. YouTube alone decides whether a view counts, and a rate-limited address often gets a player that does not start; those rows are marked as failed with the reason.

**Why was my visit blocked?** Some sites show a bot wall or rate limit to automated visitors. The Actor can retry in a visible window (when that option is on) and then moves to stronger proxies on its own. Rows that stayed blocked have `blocked: true`.

**What does the stress test report?** One row per request with status and timings, and a summary with p50, p90 and p99 latency and requests per second. Parallel requests are capped at 50.

**How do I stop a run early?** Set `end_after_seconds`, or abort the run: everything collected so far is already saved.

**Is the layout of a platform page fixed?** No. Platforms change their pages from time to time; when a field cannot be read it is `null` and the log says that some platform fields may be empty.

**Which sites can I use it on?** Only sites you own or are authorised to test. Platform rules for YouTube, Etsy, Behance and other sites apply to you as the user.

### Support and Feedback

Found a page where a field stays empty or a visit is wrongly marked as blocked? Open an issue from the Actor page with the URL, the mode and the run link.

# Actor input Schema

## `urls` (type: `array`):

One address per line. Any web page, YouTube video, Etsy shop or listing, or Behance profile or project. Bulk lists are welcome. Only use addresses you own or are authorised to test.

## `mode` (type: `string`):

Browser opens a real browser per visit so analytics tools count it. HTTP is much faster but runs no scripts, so only server logs see it. Stress test sends many fast requests and reports latency percentiles and requests per second.

## `visits_per_url` (type: `integer`):

How many visits every URL gets. Total visits = URLs × this number, and the run ends by itself. Free plan: up to 10 visits per run in total.

## `dwell_seconds` (type: `string`):

How long a visitor stays per visit, split across its pages. A number such as 30, or a range such as 15-40 (a random value in the range is used). Browser mode only.

## `pages_per_visit` (type: `integer`):

1 = landing page only. 3 = landing page plus 2 internal pages clicked during the visit. Browser mode only.

## `scroll` (type: `boolean`):

Scrolls and moves the mouse like a reader during the time on page, and records how far the visitor scrolled.

## `youtube_autoplay` (type: `boolean`):

Presses play on YouTube videos and reports how many seconds really played. YouTube alone decides whether a view counts.

## `device_mix` (type: `string`):

Which kinds of devices the visitors use.

## `mobile_share` (type: `number`):

Share of visitors on mobile devices when the device mix is mixed. 0 = none, 1 = all.

## `locales` (type: `array`):

Pick one or more languages. Each visit uses one of them at random as the visitor language.

## `referrers` (type: `object`):

Where visitors come from, as address: weight pairs. The word direct means no referrer. Higher weight = more visits from that source.

## `concurrency` (type: `integer`):

Visitors active at the same time in browser and HTTP mode. Lower it if the target refuses visits.

## `stress_concurrency` (type: `integer`):

Requests in flight at the same time in stress mode. Only raise it on sites you own.

## `headless` (type: `boolean`):

On runs the browser without a visible window. Off opens a window for every visit (on the platform it uses a virtual screen).

## `retry_blocked_headful` (type: `boolean`):

When a bot wall stops a hidden-browser visit, run that visit again in a visible Chrome window.

## `browser_channel` (type: `string`):

Bundled browser, or the installed Google Chrome when it is available.

## `screenshot` (type: `boolean`):

Saves one PNG per browser visit to the key-value store and adds its link to the visit row.

## `block_resource_types` (type: `array`):

Skip these kinds of files to save bandwidth. Video playback on YouTube is never blocked.

## `block_url_patterns` (type: `array`):

Any request whose address contains one of these texts is not loaded, for example .mp4 or ads.example.com. One per line.

## `timeout_seconds` (type: `integer`):

How long to wait for a page to answer before the visit counts as failed.

## `max_retries` (type: `integer`):

How many more times a visit that ended in an error such as a timeout or crash is tried again.

## `end_after_seconds` (type: `integer`):

Kill switch: no new visits start after this many seconds. 0 = off.

## `max_consecutive_failures` (type: `integer`):

Ends the run with a clear reason when this many visits fail one after another, for example a dead target or proxy. Everything collected is kept.

## `proxyConfiguration` (type: `object`):

Runs start without a proxy. If the target refuses visits, the Actor switches to stronger proxies on its own and keeps using them for the rest of the run. Choose Apify Proxy or add your own proxy addresses only if you want to start with a proxy.

## Actor input object example

```json
{
  "urls": [
    "https://blog.apify.com/"
  ],
  "mode": "browser",
  "visits_per_url": 1,
  "dwell_seconds": "15-40",
  "pages_per_visit": 1,
  "scroll": true,
  "youtube_autoplay": true,
  "device_mix": "mixed",
  "mobile_share": 0.45,
  "locales": [
    "en-US"
  ],
  "referrers": {
    "direct": 30,
    "https://www.google.com/": 45,
    "https://www.bing.com/": 5,
    "https://duckduckgo.com/": 4,
    "https://www.facebook.com/": 8,
    "https://t.co/": 4,
    "https://www.linkedin.com/": 4
  },
  "concurrency": 5,
  "stress_concurrency": 20,
  "headless": true,
  "retry_blocked_headful": true,
  "browser_channel": "chromium",
  "screenshot": false,
  "block_resource_types": [],
  "block_url_patterns": [],
  "timeout_seconds": 45,
  "max_retries": 1,
  "end_after_seconds": 0,
  "max_consecutive_failures": 12,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per visit with status, outcome and every section.

## `performance` (type: `string`):

One row per visit with load timings, Core Web Vitals and request counts.

## `pages` (type: `string`):

One row per page opened: the landing page and every page clicked inside the visit.

## `analytics` (type: `string`):

One row per visit showing which analytics tags are on the page and which of them received a hit.

## `engagement` (type: `string`):

One row per visit with time on page, scroll depth and clicks.

## `visitors` (type: `string`):

One row per visit with the device, viewport, language, referrer and proxy address used.

## `platformData` (type: `string`):

YouTube, Etsy and Behance facts read from the visited pages.

## `urlSummary` (type: `string`):

One row per URL with visits, successes, blocks and average timings.

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

Success rate, status codes, timing percentiles and counts for the finished run.

## `screenshots` (type: `string`):

One PNG per visit when screenshots are switched on.

## `fullOutput` (type: `string`):

One JSON file with the run summary and every visit.

# 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 = {
    "urls": [
        "https://blog.apify.com/"
    ],
    "dwell_seconds": "15-40",
    "locales": [
        "en-US"
    ],
    "referrers": {
        "direct": 30,
        "https://www.google.com/": 45,
        "https://www.bing.com/": 5,
        "https://duckduckgo.com/": 4,
        "https://www.facebook.com/": 8,
        "https://t.co/": 4,
        "https://www.linkedin.com/": 4
    },
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawl_craft/traffic-generator-youtube-web-etsy-behance").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 = {
    "urls": ["https://blog.apify.com/"],
    "dwell_seconds": "15-40",
    "locales": ["en-US"],
    "referrers": {
        "direct": 30,
        "https://www.google.com/": 45,
        "https://www.bing.com/": 5,
        "https://duckduckgo.com/": 4,
        "https://www.facebook.com/": 8,
        "https://t.co/": 4,
        "https://www.linkedin.com/": 4,
    },
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("crawl_craft/traffic-generator-youtube-web-etsy-behance").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 '{
  "urls": [
    "https://blog.apify.com/"
  ],
  "dwell_seconds": "15-40",
  "locales": [
    "en-US"
  ],
  "referrers": {
    "direct": 30,
    "https://www.google.com/": 45,
    "https://www.bing.com/": 5,
    "https://duckduckgo.com/": 4,
    "https://www.facebook.com/": 8,
    "https://t.co/": 4,
    "https://www.linkedin.com/": 4
  },
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call crawl_craft/traffic-generator-youtube-web-etsy-behance --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawl_craft/traffic-generator-youtube-web-etsy-behance"
        }
    }
}
```

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/EZm50yzDyLbTrvwcm/builds/eKtU17MMWb1jOi2hI/openapi.json
