Python ・ docs to Markdown ・ apify-client

How to use Website Content Extractor with Python

Website Content Extractor (taroyamada/website-content-extractor) runs from Python with the official apify-client package. Call client.actor(...).call(...), then iterate the default dataset for title, markdown/text, and wordCount. Store listing: from $9.00 / 1,000 results; paid first proof ≈ USD 0.01 for one URL (Actor Start USD 0.001 + 1×USD 0.009). No API key or login is required on the target sites — you supply public URLs you are allowed to fetch.

Open Website Content Extractor Input on Apify Store

Last updated: 2026-10-30 (Asia/Tokyo). Integration steps verified on Apify docs and the Actor Store listing the same day.

What this script does

Python starts a bounded page extract on public docs, pricing, or help URLs you already have, then prints dataset rows for RAG or QA handoff. It is not Article Content Extractor (news/blog body) and not a full-site crawler. Prefer article-content-extractor for article-shaped URLs.

PieceRole
Python clientpip install apify-client (docs.apify.com/api/client/python)
Actortaroyamada/website-content-extractor — public page URLs → markdown/text rows
First proof inputOne urls item; outputFormat markdown; delivery dataset; dryRun false
Useful fieldsurl, title, markdown / text, wordCount, sourceUrl, fetchedAt

Install and authenticate

  1. Create a virtualenv and run pip install apify-client.
  2. Copy an Apify API token from Console Settings → API & Integrations.
  3. Export it as APIFY_TOKEN (or pass it to ApifyClient(...)). Do not commit the token.

Minimal first-run script

Input matches the Store listing quickstart (one public URL). Cost for one successful page is about USD 0.01 per the listing.

import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run_input = {
    "urls": ["https://docs.apify.com/platform/actors"],
    "outputFormat": "markdown",
    "includeMetadata": True,
    "delivery": "dataset",
    "dryRun": False,
    "maxChargeUsd": 0.02,
}

run = client.actor("taroyamada/website-content-extractor").call(run_input=run_input)
print(f"dataset: https://console.apify.com/storage/datasets/{run['defaultDatasetId']}")

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("title"), item.get("wordCount"), item.get("url"))

Docs batch (two pages)

Each successful page is one result event at USD 0.009 plus the Actor Start USD 0.001. Example from the listing: two Apify docs pages → about USD 0.019 when both succeed.

run_input = {
    "urls": [
        "https://docs.apify.com/platform/actors",
        "https://docs.apify.com/platform/storage/dataset",
    ],
    "outputFormat": "markdown",
    "includeMetadata": True,
    "delivery": "dataset",
    "dryRun": False,
}

Not this path

Related pages

Pricing and input fields from apify.com/taroyamada/website-content-extractor on 2026-10-30 (Asia/Tokyo). Python client steps from Apify docs. Not legal advice.