# Competitor Page Intelligence & AI Website Analyzer (`yizheng/smart-page-analyzer`) Actor

Analyze SaaS, product, pricing, and landing pages into structured competitor intelligence with pricing, positioning, features, CTAs, evidence snippets, and recommendations.

- **URL**: https://apify.com/yizheng/smart-page-analyzer.md
- **Developed by:** [yizheng zhou](https://apify.com/yizheng) (community)
- **Categories:** AI, Agents, Automation
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Competitor Page Intelligence & AI Website Analyzer

Turn any SaaS, product, pricing, or landing page into structured competitor intelligence.

This Apify Actor crawls a single public web page with Playwright, extracts readable content from JavaScript-rendered pages, and uses an LLM to produce evidence-grounded JSON plus a buyer-friendly markdown report.

Primary productized mode: `competitor_intelligence`.

### What it returns

For each URL, the Actor writes one dataset item containing:

- page type and detected company/product
- positioning and target customers
- pricing visibility, tiers, billing periods, and enterprise signals
- features, claims, and calls to action
- gaps, risks, and actionable recommendations
- evidence snippets tied to the page text
- confidence and warnings
- LLM usage metadata and estimated cost
- optional markdown report
- optional extracted raw text

### Best use cases

- Competitor research for SaaS founders and product marketers
- Pricing page extraction and tier comparison
- Sales battlecard input generation
- Landing page positioning audits
- RAG-ready website intelligence ingestion
- GEO / AI search visibility prep

### Input example

```json
{
  "url": "https://www.notion.com/pricing",
  "mode": "competitor_intelligence",
  "analysisDepth": "standard",
  "outputLanguage": "en",
  "includeMarkdownReport": true,
  "includeRawText": false,
  "maxContentTokens": 12000,
  "model": "deepseek/deepseek-v4-flash"
}
````

Only `url` is required.

### Output example

```json
{
  "url": "https://www.notion.com/pricing",
  "finalUrl": "https://www.notion.com/pricing",
  "mode": "competitor_intelligence",
  "analysisDepth": "standard",
  "page": {
    "title": "Notion Pricing",
    "pageType": "pricing",
    "detectedCompany": "Notion",
    "detectedProduct": "Notion"
  },
  "summary": "Notion positions itself as an all-in-one workspace with free, team, business, and enterprise options.",
  "positioning": {
    "primaryMessage": "All-in-one workspace",
    "targetCustomers": ["individuals", "teams", "businesses"],
    "differentiators": ["docs", "projects", "wiki", "AI add-on"],
    "category": "workspace productivity software"
  },
  "pricing": {
    "hasPricing": true,
    "currency": "USD",
    "tiers": [
      {"name": "Free", "price": "$0", "billingPeriod": "monthly", "features": [], "limits": []},
      {"name": "Plus", "price": "unknown", "billingPeriod": "monthly", "features": [], "limits": []}
    ],
    "enterpriseSignals": ["Contact sales"]
  },
  "features": [
    {"name": "Team workspace", "description": "Collaborative workspace features", "evidence": "Teamspaces", "confidence": 0.8}
  ],
  "claims": [],
  "ctas": [
    {"text": "Get started", "location": "header", "intent": "trial_signup"}
  ],
  "gapsAndRisks": ["Some feature limits require deeper plan comparison."],
  "recommendations": [
    {"priority": "high", "recommendation": "Compare free-to-paid upgrade triggers.", "why": "Pricing page emphasizes multiple tiers and enterprise path."}
  ],
  "evidenceSnippets": [
    {"text": "Contact sales", "supports": "pricing.enterpriseSignals", "confidence": 0.9}
  ],
  "quality": {
    "contentChars": 18000,
    "truncated": false,
    "confidence": 0.82,
    "warnings": []
  },
  "usage": {
    "model": "deepseek/deepseek-v4-flash",
    "promptTokens": 8000,
    "completionTokens": 1800,
    "totalTokens": 9800,
    "estimatedLlmCostUsd": 0.00414
  },
  "metadata": {
    "actorVersion": "0.2.0",
    "runStartedAt": "2026-07-10T00:00:00Z",
    "runFinishedAt": "2026-07-10T00:00:12Z"
  },
  "markdownReport": "# Competitor Page Intelligence: Notion\n..."
}
```

### Modes

#### competitor\_intelligence

Recommended default. Produces structured competitor intelligence with evidence, positioning, pricing, CTAs, recommendations, and quality metadata.

#### pricing\_page

Reserved for pricing-focused analysis. Current implementation uses the same evidence-grounded prompt framework; listing should keep `competitor_intelligence` as the primary promise until dedicated pricing scoring is added.

#### landing\_page\_audit

Reserved for conversion and positioning audit. Current implementation uses the generic structured prompt fallback.

#### geo\_audit

Reserved for AI search / generative engine optimization analysis. Current implementation uses the generic structured prompt fallback.

#### rag\_ready\_extraction

Reserved for extraction pipelines. Current implementation uses the generic structured prompt fallback.

### Environment variables

Set this in Apify actor secrets or local environment:

- `OPENROUTER_API_KEY` — required for LLM analysis

Do not put API keys in input examples, README screenshots, or committed files.

### Local development

```bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt pytest
python -m playwright install chromium
python -m pytest tests -q
```

For a real local Actor run, provide Apify local input through the SDK storage format or use Apify CLI. The run also requires `OPENROUTER_API_KEY`.

### Deployment notes

The public Apify Actor itself runs on Apify cloud.

Any separate long-running observer, metrics watcher, or local support service should be deployed to A1708 or Rpi5 because those hosts are normally always on. Do not rely on Atlas for those long-running services.

### Limitations

- One URL per run.
- The Actor does not browse multiple linked pages in V2.0.
- It only analyzes text available after page rendering.
- It may miss content behind logins, paywalls, bot protection, or interactive UI states.
- LLM output is evidence-constrained but should still be reviewed before high-stakes decisions.
- Generic secondary modes are present in the input schema but the strongest productized path is `competitor_intelligence`.

### Pricing recommendation

Do not price this like the V1 demo.

Recommended starting point:

- `$0.01` per successful dataset item as a simple first paid SKU

Future tiering if Apify pricing supports it cleanly:

- fast: `$0.005`
- standard: `$0.015`
- deep: `$0.03`

This keeps the Actor affordable for buyers while avoiding a toy price that cannot cover Playwright + LLM + maintenance.

# Actor input Schema

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

The public web page URL to crawl and analyze. Best results: SaaS homepages, product pages, pricing pages, landing pages, and competitor pages.

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

Choose the analysis mode. Competitor intelligence is the primary productized mode.

## `analysisDepth` (type: `string`):

Fast is cheaper; standard is recommended; deep gives richer recommendations and may use more LLM tokens.

## `outputLanguage` (type: `string`):

Language for the generated analysis. Use en, zh-TW, ja, etc.

## `includeMarkdownReport` (type: `boolean`):

Reserve field for buyer-facing markdown summary. Structured JSON is always returned.

## `includeRawText` (type: `boolean`):

Include truncated page text in the output. Usually off to keep datasets smaller and cheaper.

## `maxContentTokens` (type: `integer`):

Approximate token budget for page text sent to the LLM. Higher values may improve recall but cost more.

## `model` (type: `string`):

Advanced: OpenRouter model ID. Default optimizes for low cost. Requires OPENROUTER\_API\_KEY secret in actor environment.

## Actor input object example

```json
{
  "url": "https://www.notion.com/pricing",
  "mode": "competitor_intelligence",
  "analysisDepth": "standard",
  "outputLanguage": "en",
  "includeMarkdownReport": true,
  "includeRawText": false,
  "maxContentTokens": 12000,
  "model": "deepseek/deepseek-v4-flash"
}
```

# 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 = {
    "url": "https://www.notion.com/pricing",
    "outputLanguage": "en",
    "model": "deepseek/deepseek-v4-flash"
};

// Run the Actor and wait for it to finish
const run = await client.actor("yizheng/smart-page-analyzer").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 = {
    "url": "https://www.notion.com/pricing",
    "outputLanguage": "en",
    "model": "deepseek/deepseek-v4-flash",
}

# Run the Actor and wait for it to finish
run = client.actor("yizheng/smart-page-analyzer").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "url": "https://www.notion.com/pricing",
  "outputLanguage": "en",
  "model": "deepseek/deepseek-v4-flash"
}' |
apify call yizheng/smart-page-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=yizheng/smart-page-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Competitor Page Intelligence & AI Website Analyzer",
        "description": "Analyze SaaS, product, pricing, and landing pages into structured competitor intelligence with pricing, positioning, features, CTAs, evidence snippets, and recommendations.",
        "version": "0.2",
        "x-build-id": "BU13BfK2hC4KRV0zA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/yizheng~smart-page-analyzer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-yizheng-smart-page-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/yizheng~smart-page-analyzer/runs": {
            "post": {
                "operationId": "runs-sync-yizheng-smart-page-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/yizheng~smart-page-analyzer/run-sync": {
            "post": {
                "operationId": "run-sync-yizheng-smart-page-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "Page URL",
                        "type": "string",
                        "description": "The public web page URL to crawl and analyze. Best results: SaaS homepages, product pages, pricing pages, landing pages, and competitor pages."
                    },
                    "mode": {
                        "title": "Analysis mode",
                        "enum": [
                            "competitor_intelligence",
                            "pricing_page",
                            "landing_page_audit",
                            "geo_audit",
                            "rag_ready_extraction"
                        ],
                        "type": "string",
                        "description": "Choose the analysis mode. Competitor intelligence is the primary productized mode.",
                        "default": "competitor_intelligence"
                    },
                    "analysisDepth": {
                        "title": "Analysis depth",
                        "enum": [
                            "fast",
                            "standard",
                            "deep"
                        ],
                        "type": "string",
                        "description": "Fast is cheaper; standard is recommended; deep gives richer recommendations and may use more LLM tokens.",
                        "default": "standard"
                    },
                    "outputLanguage": {
                        "title": "Output language",
                        "type": "string",
                        "description": "Language for the generated analysis. Use en, zh-TW, ja, etc.",
                        "default": "en"
                    },
                    "includeMarkdownReport": {
                        "title": "Include markdown report",
                        "type": "boolean",
                        "description": "Reserve field for buyer-facing markdown summary. Structured JSON is always returned.",
                        "default": true
                    },
                    "includeRawText": {
                        "title": "Include extracted raw text",
                        "type": "boolean",
                        "description": "Include truncated page text in the output. Usually off to keep datasets smaller and cheaper.",
                        "default": false
                    },
                    "maxContentTokens": {
                        "title": "Max page content tokens",
                        "minimum": 1000,
                        "maximum": 20000,
                        "type": "integer",
                        "description": "Approximate token budget for page text sent to the LLM. Higher values may improve recall but cost more.",
                        "default": 12000
                    },
                    "model": {
                        "title": "OpenRouter model",
                        "type": "string",
                        "description": "Advanced: OpenRouter model ID. Default optimizes for low cost. Requires OPENROUTER_API_KEY secret in actor environment.",
                        "default": "deepseek/deepseek-v4-flash"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
