# Prompt Context Builder (`wheat_tourist/prompt-context-builder`) Actor

Build AI-ready context files for any company, product, or topic in seconds. Automatically collects from 10+ sources — website, docs, news, GitHub, Reddit, FAQs, pricing, changelog, careers, and social media — then exports one clean context.md, ready to paste directly into ChatGPT, Claude, or Gemini.

- **URL**: https://apify.com/wheat\_tourist/prompt-context-builder.md
- **Developed by:** [Varun Chopra](https://apify.com/wheat_tourist) (community)
- **Categories:** AI, Agents, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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/platform/actors/running/actors-in-store#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

## prompt-context-builder

An [Apify Actor](https://apify.com) that collects context from 10 sources for any topic or company and outputs `context.md` + `context.json` — ready for GPT, Claude, or Gemini.

### Quick Start

```bash
## Install Apify CLI
npm install -g apify-cli

## Clone and run locally
git clone <this-repo>
cd prompt-context-builder
npm install
apify run
```

The Actor reads input from `storage/key_value_stores/default/INPUT.json`. Create it with:

```json
{
    "topic": "Tesla",
    "maxResultsPerSource": 5
}
```

After running, check `storage/key_value_stores/default/` for `context.md` and `context.json`.

### Deploy to Apify

```bash
apify login
apify push
```

### Project Structure

```
.actor/
  actor.json          # Actor definition
  input_schema.json   # Input UI definition
src/
  main.js             # Entry point
  formatter.js        # context.md + context.json generator
  sources/
    requests.js       # DuckDuckGo search URL builder
    parsers.js        # HTML and JSON parsers
Dockerfile            # apify/actor-node:20 base image
ACTOR.md              # Apify Store README
package.json
```

### License

Apache 2.0

# Actor input Schema

## `topic` (type: `string`):

The topic, company, or product to research. Can be a company name, open-source project, SaaS tool, technology, or concept.

**Examples:** `Tesla`, `React`, `Notion`, `OpenAI`, `Kubernetes`, `Stripe`

## `maxResultsPerSource` (type: `integer`):

Maximum number of results to collect from each source. Higher values produce richer context but increase run time.

- `3–5` — Fast, good for quick context
- `10` — Thorough, recommended for deep research
- `20` — Comprehensive, slowest

## `includeWebsite` (type: `boolean`):

Collect links to the official website and homepage.

## `includeDocs` (type: `boolean`):

Collect links to official documentation, developer guides, and API references.

## `includeNews` (type: `boolean`):

Collect recent news articles, blog posts, and press coverage.

## `includeGithub` (type: `boolean`):

Collect related GitHub repositories, descriptions, and star counts.

## `includeReddit` (type: `boolean`):

Collect top Reddit threads and community discussions about the topic.

## `includeFaqs` (type: `boolean`):

Collect frequently asked questions and answer pages.

## `includePricing` (type: `boolean`):

Collect pricing pages, plan comparisons, and cost information.

## `includeChangelog` (type: `boolean`):

Collect changelogs, release notes, and version history.

## `includeCareers` (type: `boolean`):

Collect hiring pages, job listings, and career information.

## `includeSocial` (type: `boolean`):

Collect links to Twitter/X, LinkedIn, YouTube, and other social media profiles.

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

Proxy settings for the Actor. **Strongly recommended** — Reddit and GitHub are more reliable with residential proxies.

To maximize success rate, select **Apify Proxy** → **RESIDENTIAL** group.

## Actor input object example

```json
{
  "topic": "OpenAI",
  "maxResultsPerSource": 5,
  "includeWebsite": true,
  "includeDocs": true,
  "includeNews": true,
  "includeGithub": true,
  "includeReddit": true,
  "includeFaqs": true,
  "includePricing": true,
  "includeChangelog": true,
  "includeCareers": true,
  "includeSocial": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `context.md` (type: `string`):

A fully-formatted Markdown file containing all collected context for the topic. Ready to paste directly into ChatGPT, Claude, or Gemini. Stored in the default Key-Value Store.

## `context.json` (type: `string`):

Structured JSON object containing the same data as context.md, organised by source. Useful for programmatic access and API integrations. Stored in the default Key-Value Store.

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

Each row in the dataset represents a single result item from one source (website, docs, news, GitHub, Reddit, FAQs, pricing, changelog, careers, or social). Columns: source, title, url, snippet, scrapedAt.

# 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 = {
    "topic": "Tesla",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("wheat_tourist/prompt-context-builder").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 = {
    "topic": "Tesla",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("wheat_tourist/prompt-context-builder").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 '{
  "topic": "Tesla",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call wheat_tourist/prompt-context-builder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wheat_tourist/prompt-context-builder"
        }
    }
}

```

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/f4pYR6wCKhmPNuoxD/builds/XbRtn2ijveeDGaeo1/openapi.json
