# Perplexity Discover Scraper (`searchapi/perplexity-discover-scraper`) Actor

Scrapes trending stories, summaries, and topics from Perplexity Discover (perplexity.ai/discover). Extracts story titles, descriptions, publication timestamps, source counts, category tags, and discover URLs.

- **URL**: https://apify.com/searchapi/perplexity-discover-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** News, AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search 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/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

## Perplexity Discover Scraper

Collect current, source-backed stories from Perplexity Discover. Version 3 uses the public structured feed loaded by the website and retains a current DOM fallback when that response changes.

### Input

- `category` selects one category; `categories` adds a fair batch of up to five.
- Supported categories are Top, Tech & Science, Business, Arts & Culture, Sports, and Entertainment.
- `maxItems` is the global output limit; `maxItemsPerCategory` requests up to 100 candidates per category in one response.
- Filter with `minSourceCount`, `includeKeywords`, `excludeKeywords`, `publishedAfter`, and `publishedBefore`.
- Sort by Discover order, newest, oldest, most sources, or most viewed.
- `proxyConfiguration` supports optional authorized Apify or custom proxies. `GOOGLE_SERP` is rejected because it is limited to Google HTTP Search/Shopping traffic.

```json
{
  "categories": ["Top", "Tech & Science"],
  "maxItems": 40,
  "minSourceCount": 3,
  "sortBy": "feedOrder",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

Run locally with `apify run --purge --input-file qa-inputs/baseline.json`.

### Output

Each dataset item contains stable identity and ranking, current category membership, ISO timestamps, headline and multiple summaries, featured-image metadata, reported source/social counts, and normalized supporting source articles with titles, public URLs, domains, snippets, dates, authors, and images when Perplexity exposes them. Optional unavailable values are omitted; nulls, empty strings/arrays, opaque continuation tokens, cookies, headers, and raw transport payloads are never stored.

The Actor detects challenge pages and fails closed. It does not solve CAPTCHAs, bypass authentication, or access private content.

# Actor input Schema

## `category` (type: `string`):

One Discover category. It can be combined with categories; leave empty to use Top.

## `categories` (type: `array`):

Optional fair batch of up to five unique Discover categories.

## `maxItems` (type: `integer`):

Global output limit across all selected categories.

## `maxItemsPerCategory` (type: `integer`):

Structured stories requested from each category in one bounded response.

## `sortBy` (type: `string`):

Preserve fair Discover ranking or sort combined unique records by a source-backed field.

## `minSourceCount` (type: `integer`):

Keep stories backed by at least this many Perplexity-reported sources.

## `includeKeywords` (type: `array`):

Keep stories containing at least one keyword in title or summaries.

## `excludeKeywords` (type: `array`):

Remove stories containing any keyword in title or summaries.

## `publishedAfter` (type: `string`):

Optional inclusive ISO-8601 date/time boundary.

## `publishedBefore` (type: `string`):

Optional inclusive ISO-8601 date/time boundary.

## `maxConcurrency` (type: `integer`):

Maximum number of category pages processed concurrently.

## `maxRequestRetries` (type: `integer`):

Bounded retry count for temporary browser, proxy, or target failures.

## `navigationTimeoutSecs` (type: `integer`):

Maximum time allowed for each category-page navigation.

## `requestHandlerTimeoutSecs` (type: `integer`):

Maximum time allowed to capture and normalize one category response.

## `proxyConfiguration` (type: `object`):

Optional authorized Apify or custom proxy. GOOGLE\_SERP is rejected because it is Google-only.

## Actor input object example

```json
{
  "category": "",
  "maxItems": 20,
  "maxItemsPerCategory": 100,
  "sortBy": "feedOrder",
  "minSourceCount": 0,
  "maxConcurrency": 3,
  "maxRequestRetries": 2,
  "navigationTimeoutSecs": 45,
  "requestHandlerTimeoutSecs": 90
}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/perplexity-discover-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("searchapi/perplexity-discover-scraper").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 '{}' |
apify call searchapi/perplexity-discover-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,searchapi/perplexity-discover-scraper"
        }
    }
}

```

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/zuHhRNOYLbQfrrgc2/builds/gBdLRZ2QgtFnvbJMl/openapi.json
