# Public Page Brief (`gilt_hare/public-page-brief`) Actor

GET a public http(s) URL (no login, no JS-heavy sites required) and return JSON: url, status, title, text excerpt, outbound links.

- **URL**: https://apify.com/gilt\_hare/public-page-brief.md
- **Developed by:** [Joshua Atchison](https://apify.com/gilt_hare) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 public page briefs

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Public Page Brief

Pay-per-event Actor. Public HTTP only.

**Use this tool when** you need a cheap, structured brief of a public web page: HTTP status, title, a short text excerpt, and outbound links. Pay per URL. No login. No browser. Instagram, Facebook, TikTok, and LinkedIn are rejected.

This Actor is a pay-per-event listing. Other AI agents and humans can buy one page brief at a time without running a crawler.

PPE reference: https://docs.apify.com/actors/publishing/monetize/pay-per-event

### What you get

One dataset item per processed URL:

- url: string — URL you asked for
- finalUrl: string — URL after redirects (fetched pages only)
- status: integer or null — HTTP status, or null if the request never completed
- title: string or null — page title
- textExcerpt: string or null — visible text, truncated (default 2000 characters)
- outboundLinks: string array — unique absolute http(s) links from the page (max 50)
- ok: boolean — true when HTTP status is 2xx or 3xx
- error: string or null — 404, BLOCKED\_HOST, INVALID\_URL, TIMEOUT, FETCH\_FAILED, or other HTTP code
- errorMessage: string or null — short explanation

### Input

Field urls: list of public http/https URLs.
Field url: optional single URL if urls is empty.
Field excerptMaxChars: 200-8000, default 2000.

Example:

```
{ "urls": ["https://example.com/"], "excerptMaxChars": 2000 }
```

### Pricing (pay-per-event)

You pay for events, not for a rental. Platform compute for the first 5 seconds of each run is covered when apify-actor-start is enabled.

- page\_brief (primary): once per URL that was actually fetched, including HTTP 404. **$0.01**
- apify-actor-start: automatically when the run starts. Do not charge this from code. **$0.00005** (Apify default)
- apify-default-dataset-item: automatically on each default-dataset item. **$0.00** (event kept; page\_brief is the bill)

Not billed as page\_brief: non-http(s) URLs, and Instagram / Facebook / TikTok / LinkedIn hosts. Those are rejected before fetch and returned as error items (INVALID\_URL / BLOCKED\_HOST).

Example: one run, three public pages = 1 start + 3 page\_brief approx $0.03005.

Set a run budget of at least $0.02 so one start + one brief fits.

### Limits

- No login and no credentialed sessions
- No JavaScript rendering. JS-heavy apps return whatever the raw HTML contains
- No Instagram, Facebook, TikTok, or LinkedIn
- No non-http(s) schemes
- No crawling beyond the URLs you pass (outbound links are listed, not followed)

### Memory

Default and min: 256 MB. Max: 1024 MB. HTTP-only. Extra RAM only raises platform cost.

### How it works

1. Read urls / url from input
2. Reject blocked hosts and non-http(s) URLs without fetching
3. GET each remaining URL with HTTPX (follow redirects, 20s timeout, 1 MB cap)
4. Parse HTML with Beautiful Soup (lxml)
5. Push one dataset item. Charge page\_brief for fetched URLs (including 404)

### Example output

```
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "status": 200,
  "title": "Example Domain",
  "textExcerpt": "Example Domain This domain is for use in illustrative examples",
  "outboundLinks": ["https://www.iana.org/domains/example"],
  "ok": true,
  "error": null,
  "errorMessage": null
}
```

### Local development (no Apify cloud)

```
pip install -r requirements.txt
ACTOR_TEST_PAY_PER_EVENT=true python main.py
```

Do not upload this Actor until the owner approves the SKU.

### Owner

Joshua Atchison, joshuaatchison.atchison@gmail.com

# Actor input Schema

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

Public http(s) page URLs to brief. Do not send login-walled or JS-only apps. Instagram, Facebook, TikTok, and LinkedIn hosts are rejected before fetch. Each processed URL (success or HTTP 404) charges one page\_brief event.

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

Optional single public http(s) URL. Used if urls is empty. Same rules as urls.

## `excerptMaxChars` (type: `integer`):

Maximum characters of visible page text to return in textExcerpt. Keeps payloads small for other AI agents.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/"
  ],
  "url": "https://example.com/",
  "excerptMaxChars": 2000
}
```

# Actor output Schema

## `briefs` (type: `string`):

No description

# 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://example.com/"
    ],
    "url": "https://example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gilt_hare/public-page-brief").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://example.com/"],
    "url": "https://example.com/",
}

# Run the Actor and wait for it to finish
run = client.actor("gilt_hare/public-page-brief").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://example.com/"
  ],
  "url": "https://example.com/"
}' |
apify call gilt_hare/public-page-brief --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gilt_hare/public-page-brief"
        }
    }
}

```

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/iAa2lrIJyEf7BcOMJ/builds/6Z4OP4Tilx1E1c63k/openapi.json
