# CatchAll \[Job] Initialize Query (`newscatcher/catchall-initialize`) Actor

Validate and initialize a CatchAll query before submitting a job.

- **URL**: https://apify.com/newscatcher/catchall-initialize.md
- **Developed by:** [Newscatcher-CatchAll](https://apify.com/newscatcher) (community)
- **Categories:** AI, Automation, News
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## 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

## CatchAll Initialize — preview validators and enrichments

CatchAll Initialize returns suggested validators, enrichments, and date ranges for a query before you submit a job. Use it to preview what CatchAll will generate, fine-tune your input, or check if your date range fits your plan limits — without consuming job credits.

This Actor maps to the [`POST /catchAll/initialize`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/initialize-job) endpoint.

### When to use this Actor

- **Preview before committing.** See which validators and enrichments CatchAll would generate for your query, then decide what to keep, modify, or remove.
- **Validate date ranges.** Check whether your requested dates fit within your plan's allowed search depth. The response includes adjustment messages if dates were modified.
- **Build custom workflows.** Pipe the suggested output into the [CatchAll Create Job](https://apify.com/newscatcher/catchall-create-job) Actor with your modifications applied.

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `apiKey` | String | Yes | Your CatchAll API key |
| `query` | String | Yes | Plain-text question describing what to find |
| `context` | String | No | Extra instructions for validators and enrichments |

#### Input example

```json
{
  "apiKey": "YOUR_CATCHALL_API_KEY",
  "query": "Executive departures at Fortune 500 technology companies",
  "context": "Include executive name, position, company name, departure date"
}
```

### Output

The Actor returns suggested validators and enrichments as JSON in the default Dataset.

#### Output example

```json
{
  "query": "Executive departures at Fortune 500 technology companies",
  "context": "Include executive name, position, company name, departure date",
  "validators": [
    {
      "name": "is_executive_departure",
      "description": "true if the web page describes an executive leaving a company",
      "type": "boolean"
    }
  ],
  "enrichments": [
    {
      "name": "executive_name",
      "description": "Extract the name of the departing executive",
      "type": "text"
    },
    {
      "name": "subject_company",
      "description": "Extract the company from which the executive is departing",
      "type": "company"
    },
    {
      "name": "departure_date",
      "description": "Extract the date of the executive's departure",
      "type": "date"
    }
  ],
  "start_date": "2026-02-01T00:00:00Z",
  "end_date": "2026-02-06T00:00:00Z",
  "date_modification_message": []
}
```

The suggestions are recommendations only. You can use them as-is, modify them, add new ones, or ignore them and let the system generate fresh validators and enrichments when you submit the job.

### Other CatchAll Actors

| Actor | Description |
|-------|-------------|
| [CatchAll](https://apify.com/newscatcher/catchall) | End-to-end job: submit, poll, and retrieve results |
| [CatchAll Create Job](https://apify.com/newscatcher/catchall-create-job) | Submit a job without polling or fetching results |
| [CatchAll Pull Results](https://apify.com/newscatcher/catchall-pull-results) | Retrieve records from a completed job |

For the full list, visit the [Newscatcher](https://apify.com/newscatcher) organization page.

### Resources

- [CatchAll documentation](https://www.newscatcherapi.com/docs/web-search-api/get-started/introduction)
- [Dynamic schemas guide](https://www.newscatcherapi.com/docs/web-search-api/guides-and-concepts/dynamic-schemas)
- [Write effective queries](https://www.newscatcherapi.com/docs/web-search-api/how-to/write-effective-queries)

# Actor input Schema

## `apiKey` (type: `string`):

Your CatchAll API key (sent as x-api-key header).

## `query` (type: `string`):

Natural-language question to analyse. The API returns the validators and enrichments it would auto-generate for this query.

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

Optional context string that sharpens the suggested fields.

## `connectedDatasetIds` (type: `string`):

Optional list of watchlist dataset IDs connected to this job. Provide valid JSON matching OpenAPI schema.

## `fetchAllWatchlistNews` (type: `boolean`):

When true, returns generic news validators and enrichments suitable for watchlist-based article collection instead of query-specific fields.

## Actor input object example

```json
{}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `rawOutput` (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("newscatcher/catchall-initialize").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("newscatcher/catchall-initialize").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 newscatcher/catchall-initialize --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,newscatcher/catchall-initialize"
        }
    }
}

```

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/6W8ttk1efQUyvhAsL/builds/mBRL1vRb7YBUhTWH4/openapi.json
