Metadata-Version: 2.5
Name: cliqtomedia-apify
Version: 0.2.0
Summary: Run any Apify Actor from Python or the command line: Reddit, YouTube, Trustpilot, Amazon, Google Search scrapers and more. JSON, JSONL or CSV output, no dependencies.
Project-URL: Homepage, https://cliqtomedia.com/actors/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11
Project-URL: Apify Store, https://apify.com/cliqtomedia
Project-URL: Apify API reference, https://docs.apify.com/api/v2
Author: Cliqto Media
Maintainer: Cliqto Media
License-Expression: MIT
License-File: LICENSE
Keywords: apify,apify-actor,apify-client,automation,cli,csv,data-extraction,scraper,web-scraping
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# cliqtomedia-apify: run Apify scrapers from Python or the command line

![Cliqto Media](https://cliqtomedia.com/assets/img/logo-512.png)

Run any public Apify Actor and get its dataset items as JSON, JSONL or CSV: Reddit, YouTube, Trustpilot, Amazon, Google Search, Indeed, Zillow, Booking.com and more. One command, no dependencies.

[![PyPI version](https://img.shields.io/pypi/v/cliqtomedia-apify.svg)](https://pypi.org/project/cliqtomedia-apify/)
[![Python versions](https://img.shields.io/pypi/pyversions/cliqtomedia-apify.svg)](https://pypi.org/project/cliqtomedia-apify/)
[![License: MIT](https://img.shields.io/pypi/l/cliqtomedia-apify.svg)](https://pypi.org/project/cliqtomedia-apify/)

## What you get

- A `cliqtomedia-apify run` command that starts an Actor, waits for it to finish and prints the results.
- A `run_actor()` function that returns the dataset items as a Python list.
- Output as `json`, `jsonl` or `csv`.
- Clear errors and exit codes for a missing token, a wrong Actor name and a failed run.
- Standard library only. It needs Python 3.9 or newer and installs no other packages.

The package works with any public Actor on Apify, not only ours. It reads dataset items with `clean=true`, so hidden helper fields and empty items are dropped. The Popular Actors section below lists Actors you can run right away.

## Install

```bash
pip install cliqtomedia-apify
```

## Get your Apify token

The package uses your own Apify account. It never ships a token.

1. Create a free account at [apify.com](https://apify.com).
2. In Apify Console, open Settings, then API & Integrations. Copy the Personal API token ([how to find it](https://docs.apify.com/platform/integrations/api#api-token)).
3. Set it as the `APIFY_TOKEN` environment variable:

```bash
export APIFY_TOKEN=your_token_here
```

On Windows PowerShell: `$env:APIFY_TOKEN = "your_token_here"`.

You can also pass the token with `--token` on the command line or `token=` in Python. Prefer the environment variable: a `--token` value can end up in your shell history. Keep the token out of code you share.

## Quick start: command line

```bash
cliqtomedia-apify run cliqtomedia/youtube-transcript-scraper \
  --input '{"videoUrls": ["jNQXAC9IVRw"]}' --format json
```

Read the input from a file:

```bash
cliqtomedia-apify run cliqtomedia/youtube-transcript-scraper --input-file input.json --format jsonl > items.jsonl
```

| Option | Meaning |
|---|---|
| `--input` | Actor input as a JSON string |
| `--input-file` | Path to a JSON file with the Actor input |
| `--limit N` | Fetch at most N items |
| `--format` | `json` (default), `jsonl` or `csv` |
| `--timeout SECONDS` | How long to wait for the run (default 300) |
| `--token` | Apify token (default: `APIFY_TOKEN`) |
| `--version` | Print the package version |

Exit codes: `0` success, `1` Apify or run error, `2` usage error such as a missing token, a bad option or bad input JSON, `130` interrupted with Ctrl+C (the run may still be active in Apify Console).

`python -m cliqtomedia_apify run ...` works the same way.

## Quick start: Python

```python
from cliqtomedia_apify import run_actor

items = run_actor(
    "cliqtomedia/youtube-transcript-scraper",
    {"videoUrls": ["jNQXAC9IVRw"]},
    limit=10,
)
print(items[0]["status"], items[0]["text"][:80])
```

`run_actor(actor, run_input=None, *, token=None, limit=None, timeout=300, poll_interval=2.0)` returns a list of dicts. It raises `ApifyError` (or the subclasses `ApifyHTTPError` and `MissingTokenError`) on failure.

## Examples

### YouTube transcript to JSON

Input for the [YouTube Transcript Scraper](https://cliqtomedia.com/actors/youtube-transcript-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11):

```json
{
  "videoUrls": ["jNQXAC9IVRw"]
}
```

Output, shortened to the main fields of the first dataset item:

```json
[
  {
    "status": "SUCCEEDED",
    "complete": true,
    "videoId": "jNQXAC9IVRw",
    "canonicalUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "track": {
      "sourceLanguageCode": "en",
      "sourceIsGenerated": false,
      "isTranslated": false
    },
    "segments": [
      {
        "sequence": 0,
        "text": "All right, so here we are, in front of the elephants",
        "startSeconds": 1.2,
        "durationSeconds": 2.16
      }
    ],
    "segmentCount": 6
  }
]
```

### Trustpilot reviews to CSV

The latest 5 reviews of a company with the [Trustpilot Reviews Scraper](https://cliqtomedia.com/actors/trustpilot-reviews-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11):

```bash
cliqtomedia-apify run cliqtomedia/trustpilot-reviews-scraper \
  --input '{"companyDomains": ["apify.com"], "maxReviews": 5}' \
  --format csv > reviews.csv
```

The CSV has one row per review. Main columns: `company`, `companyTrustScore`, `rating`, `title`, `text`, `language`, `date`, `country`, `verified`, `replyText`, `url`.

### Reddit posts to JSONL

The 5 newest posts of r/Python with the [Reddit Scraper](https://cliqtomedia.com/actors/reddit-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11):

```bash
cliqtomedia-apify run cliqtomedia/reddit-scraper \
  --input '{"mode": "subreddit", "subreddits": ["python"], "maxPosts": 5}' \
  --format jsonl > posts.jsonl
```

Each line is one post with `title`, `text`, `author`, `score`, `numComments`, `url` and `createdAt`.

Each Actor has its own input and output fields. Read them on the Actor page.

## Popular Actors

Copy the Actor name into `cliqtomedia-apify run <name>` or `run_actor("<name>", ...)`. The input fields and an example input are on each Actor page.

### Social media and video

| Actor name | What you get | Details |
|---|---|---|
| `cliqtomedia/reddit-scraper` | Reddit posts, comments and subreddits | [Page](https://cliqtomedia.com/actors/reddit-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/youtube-transcript-scraper` | YouTube transcripts and subtitles with timestamps | [Page](https://cliqtomedia.com/actors/youtube-transcript-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/youtube-comments-scraper` | YouTube comments and replies | [Page](https://cliqtomedia.com/actors/youtube-comments-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/youtube-channel-videos` | YouTube channel videos with views, likes and Shorts | [Page](https://cliqtomedia.com/actors/youtube-channel-videos/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/tiktok-transcript` | TikTok captions and speech to text | [Page](https://cliqtomedia.com/actors/tiktok-transcript/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/threads-scraper` | Threads posts, profiles and replies | [Page](https://cliqtomedia.com/actors/threads-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/telegram-channel-scraper` | Telegram channel posts and views | [Page](https://cliqtomedia.com/actors/telegram-channel-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/facebook-ad-library` | Facebook Ad Library: competitor ads | [Page](https://cliqtomedia.com/actors/facebook-ad-library/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |

### Search and web pages

| Actor name | What you get | Details |
|---|---|---|
| `cliqtomedia/google-search-scraper` | Google search results (SERP) | [Page](https://cliqtomedia.com/actors/google-search-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/google-news-scraper` | Google News articles with real URLs | [Page](https://cliqtomedia.com/actors/google-news-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/google-trends-scraper` | Google Trends interest by time, region and query | [Page](https://cliqtomedia.com/actors/google-trends-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/rag-web-search` | Google results as clean Markdown for RAG and LLMs | [Page](https://cliqtomedia.com/actors/rag-web-search/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/website-to-markdown` | Website pages as Markdown for RAG | [Page](https://cliqtomedia.com/actors/website-to-markdown/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/website-contacts-scraper` | Emails, phones and social links from websites | [Page](https://cliqtomedia.com/actors/website-contacts-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |

### E-commerce and prices

| Actor name | What you get | Details |
|---|---|---|
| `cliqtomedia/amazon-scraper` | Amazon products, prices, reviews and BSR | [Page](https://cliqtomedia.com/actors/amazon-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/walmart-scraper` | Walmart products and reviews | [Page](https://cliqtomedia.com/actors/walmart-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/ebay-sold-listings` | eBay sold listings with prices and dates | [Page](https://cliqtomedia.com/actors/ebay-sold-listings/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/shopify-products-scraper` | Products from any Shopify store | [Page](https://cliqtomedia.com/actors/shopify-products-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/aliexpress-scraper` | AliExpress products, prices and reviews | [Page](https://cliqtomedia.com/actors/aliexpress-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/temu-scraper` | Temu products, prices, variants and reviews | [Page](https://cliqtomedia.com/actors/temu-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |

### Reviews and travel

| Actor name | What you get | Details |
|---|---|---|
| `cliqtomedia/trustpilot-reviews-scraper` | Trustpilot reviews, ratings and company replies | [Page](https://cliqtomedia.com/actors/trustpilot-reviews-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/google-play-reviews-scraper` | Google Play app reviews | [Page](https://cliqtomedia.com/actors/google-play-reviews-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/apple-app-store-reviews-scraper` | Apple App Store app reviews | [Page](https://cliqtomedia.com/actors/apple-app-store-reviews-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/booking-scraper` | Booking.com hotels, prices and reviews | [Page](https://cliqtomedia.com/actors/booking-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/tripadvisor-scraper` | Tripadvisor places, reviews and hotel prices | [Page](https://cliqtomedia.com/actors/tripadvisor-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/yelp-scraper` | Yelp businesses and reviews | [Page](https://cliqtomedia.com/actors/yelp-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/airbnb-scraper` | Airbnb listings, prices and calendar | [Page](https://cliqtomedia.com/actors/airbnb-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |

### Jobs, companies and real estate

| Actor name | What you get | Details |
|---|---|---|
| `cliqtomedia/indeed-scraper` | Indeed jobs with salaries | [Page](https://cliqtomedia.com/actors/indeed-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/glassdoor-scraper` | Glassdoor jobs and company reviews | [Page](https://cliqtomedia.com/actors/glassdoor-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/upwork-jobs-scraper` | Upwork jobs with pay and client details | [Page](https://cliqtomedia.com/actors/upwork-jobs-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/wellfound-jobs-scraper` | Wellfound startup jobs | [Page](https://cliqtomedia.com/actors/wellfound-jobs-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/crunchbase-companies` | Crunchbase companies and funding | [Page](https://cliqtomedia.com/actors/crunchbase-companies/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/zillow-scraper` | Zillow listings with Zestimates | [Page](https://cliqtomedia.com/actors/zillow-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/idealista-scraper` | Idealista listings in Spain, Italy, Portugal and France | [Page](https://cliqtomedia.com/actors/idealista-scraper/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |
| `cliqtomedia/email-verifier` | Bulk email verification: MX, disposable and role checks | [Page](https://cliqtomedia.com/actors/email-verifier/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) |

All 180+ Cliqto Media Actors are in the [Actor catalog](https://cliqtomedia.com/actors/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11) and on our [Apify Store profile](https://apify.com/cliqtomedia).

## Control the cost

- Set the Actor's own limit in the input, for example `maxReviews` or `maxPosts`. The cost depends on the Actor's pricing (per result, per event or compute time), so a smaller input means a smaller bill.
- `--limit` only trims how many items the package downloads after the run. It does not make the run smaller.
- Start with a small test run and check the cost in Apify Console, Runs.

## Pricing

This package is free (MIT license). Running an Actor uses your own Apify account, and Apify bills that usage by the Actor's own pricing. The price of each Actor is on its Apify page. The Apify free plan includes a monthly credit. Check the price before you start.

## Limits

- It runs one Actor per call and returns when the run ends. It does not stream partial results.
- It waits up to `--timeout` seconds (default 300). If the run is not done by then, the package aborts it and reports an error. Raise `--timeout` for big runs.
- It reads at most the first `--limit` dataset items. Without `--limit`, it reads the whole dataset.
- It does not manage tasks, schedules, webhooks or key-value stores. Use the full [Apify API](https://docs.apify.com/api/v2) for those.
- The run must succeed. If the Actor fails, you get an error, not partial items.

## FAQ

**Does it work with Actors from other authors?**
Yes. Use any Actor name in the form `username/actor-name`.

**Where does the token go?**
Into the `APIFY_TOKEN` environment variable, or `--token` / `token=`. The package sends it only to `api.apify.com`.

**Why do I get HTTP 401?**
Apify rejected the token. Copy it again from Console, Settings, API & Integrations.

**Why do I get HTTP 404?**
The Actor name is wrong or the Actor is private. Check the spelling, for example `cliqtomedia/youtube-transcript-scraper`.

**How do I save the result to a file?**
Redirect the output: `> items.csv`. Errors go to stderr, so the file holds only data.

**Can I open the CSV in Excel or Google Sheets?**
Yes. Scraped text is written as is, so a cell that starts with `=`, `+`, `-` or `@` may be read as a formula. Import the file as text if you do not trust the source.

**Can I use it in a script or a cron job?**
Yes. It prints data to stdout, errors to stderr, and sets the exit code.

## Links

- [Cliqto Media Actor catalog](https://cliqtomedia.com/actors/?utm_source=pypi&utm_medium=template&utm_campaign=promo-2026-11)
- [Cliqto Media on Apify Store](https://apify.com/cliqtomedia)
- [Apify API reference](https://docs.apify.com/api/v2)
- [Apify API token docs](https://docs.apify.com/platform/integrations/api#api-token)
