# Company Pricing Page Finder (`eichan/company-pricing-page-finder`) Actor

- **URL**: https://apify.com/eichan/company-pricing-page-finder.md
- **Developed by:** [Eichan Jolly](https://apify.com/eichan) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 results

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

## company-pricing-page-finder

**What it does:** Find a confirmed pricing or plans page linked from an official company homepage. The Actor fetches one user-provided official public homepage, examines its `<a>` links and embedded JSON-LD, and **GETs** same-host candidates before reporting a confirmed URL. It never guesses or constructs an unverified path.

**Who it is for:** B2B lead researchers, business intelligence teams, and CRM enrichment workflows needing a verified company pricing link.

### Input

Provide one website URL (not a domain list). The example is the live official Cloudflare homepage, which currently links to a public `/plans/` page.

```json
{"url":"https://www.cloudflare.com/"}
```

### Output

Exactly one Dataset item per run.

```json
{
  "companyUrl": "https://www.cloudflare.com/",
  "pricingUrl": "https://www.cloudflare.com/plans/",
  "foundVia": "link",
  "status": "found",
  "error": null
}
```

If no candidate can be successfully fetched, `pricingUrl` and `foundVia` are `null`, `status` is `not_found`, and `error` is `null`. Invalid homepage inputs and homepage fetch failures produce a single `error` item with a plain-language `error` string.

### How to run

Apify reads `INPUT` through the default key-value store REST endpoint using the Actor's token and saves one item via the default Dataset REST endpoint. The variable `ACTOR_INPUT_JSON` overrides platform input for local development. When neither is configured, the Actor reads `./storage/key_value_stores/default/INPUT.json`. No Apify SDK or nonstandard Python libraries are installed.

```bash
ACTOR_INPUT_JSON='{"url":"https://www.cloudflare.com/"}' python src/main.py
```

Local output is written to `storage/datasets/default/000000001.json` (or the next numbered file). On Apify, the Actor uses `https://api.apify.com/v2/key-value-stores/{APIFY_DEFAULT_KEY_VALUE_STORE_ID}/records/INPUT` and the default Dataset API with `Authorization: Bearer`.

### Safety and limits

- Public official company sites only. One input site; only **same-host** HTTP/HTTPS requests and redirects, with DNS checks against private/reserved IPs. Subdomains are separate hosts. No logins or API keys for the target site.
- The Actor requests `robots.txt`, the provided homepage, and at most **12 verified candidate attempts**; 10-second HTTP timeout, 5 MB per page, 128 KB robots limit, brief delay between attempts. Pages blocked by `robots.txt` are not fetched.
- Candidate selection uses explicit pricing/related terms in same-host URLs or anchor labels; embedded JSON-LD URL references may also qualify. It does not search other pages or query search engines; dynamic JavaScript links may be missed.
- A candidate is only considered confirmed after a successful HTTP 2xx **GET** and readable nonempty HTML/text response from the same host. It does not prove that listed prices are current. HTTP 200 anti-bot pages can occasionally evade detection.
- If candidates fail validation, the outcome is honestly `not_found` (not a guessed link). An inaccessible homepage is `error`. The Actor never extracts contact details or personal information.
- The included reproducible smoke evidence uses offline HTTP fixtures, **not live network requests**. Live Cloudflare homepage links and destination pages were checked independently via public web access at packaging time, but direct live Python execution and Apify platform builds were not performed here.

### Tests and reproducing smoke output

```bash
python tests/run_direct_smoke.py
python -m unittest discover -s tests -v
```

The direct smoke runner executes `python src/main.py` in a subprocess and saves `tests/SMOKE_OUTPUT.txt` plus `tests/SMOKE_DATASET.json`. Its HTTP fixture is in `tests/sitecustomize.py`, loaded for the subprocess via `PYTHONPATH`; the production Actor uses real HTTP. The ZIP also contains `tests/TEST_RUN_OUTPUT.txt`.

### Store listing and proposed price

Suggested categories: `LEAD_GENERATION`, `SEO_TOOLS` (maximum two). Suggested price: **$3 per 1,000 Dataset results** (equivalent to $0.003 per one-item run); estimate only. This project does not publish, create pricing configuration, or enable billing. See `store_metadata.json`.

# Actor input Schema

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

Full URL of the company's public official homepage. The Actor checks only this host and verifies any reported page.

## Actor input object example

```json
{
  "url": "https://www.cloudflare.com/"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing the Actor's result items

# 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.cloudflare.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("eichan/company-pricing-page-finder").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.cloudflare.com/" }

# Run the Actor and wait for it to finish
run = client.actor("eichan/company-pricing-page-finder").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 '{
  "url": "https://www.cloudflare.com/"
}' |
apify call eichan/company-pricing-page-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eichan/company-pricing-page-finder"
        }
    }
}
```

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/3tvP2ubNbmSBEkqfm/builds/9meQkEbMQ5QQFqZag/openapi.json
