{
  "openapi": "3.0.1",
  "info": {
    "title": "CatchAll",
    "description": "Submit a CatchAll job, poll until completion, and retrieve all valid records. Results are saved to the Dataset and Key-Value Store.",
    "version": "0.0",
    "x-build-id": "o75SjX4EOQlq9yt2c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/newscatcher~catchall/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-newscatcher-catchall",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/newscatcher~catchall/runs": {
      "post": {
        "operationId": "runs-sync-newscatcher-catchall",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/newscatcher~catchall/run-sync": {
      "post": {
        "operationId": "run-sync-newscatcher-catchall",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "apiKey"
        ],
        "properties": {
          "apiKey": {
            "title": "CatchAll API Key",
            "type": "string",
            "description": "Your CatchAll API key."
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "Natural-language question. Keywords and search queries are extracted automatically. Required when jobId is not provided."
          },
          "jobId": {
            "title": "Job ID (optional — resume existing job)",
            "type": "string",
            "description": "If provided, skip job creation and go straight to polling/pulling this existing job."
          },
          "context": {
            "title": "Context (optional)",
            "type": "string",
            "description": "Additional context to sharpen the search scope (geography, industry, time frame, etc.)."
          },
          "limit": {
            "title": "Limit",
            "type": "integer",
            "description": "Maximum number of validated records to collect. Minimum 10. Defaults to 50.",
            "default": 50
          },
          "startDate": {
            "title": "Start Date (optional)",
            "type": "string",
            "description": "Earliest article date (ISO-8601 or free-text like '2024-01-01'). If start_date is provided and end_date is omitted, end_date defaults to now."
          },
          "endDate": {
            "title": "End Date (optional)",
            "type": "string",
            "description": "Latest article date (ISO-8601). Cannot be provided without startDate."
          },
          "mode": {
            "title": "Mode (optional)",
            "enum": [
              "base",
              "lite"
            ],
            "type": "string",
            "description": "Processing mode. 'base' runs the full pipeline with clustering and enrichment. 'lite' is faster with no clustering. Default: base."
          },
          "schema": {
            "title": "Schema (optional)",
            "type": "string",
            "description": "Advanced: custom JSON schema string that overrides the default extraction schema. Use POST /initialize to discover a suitable schema."
          },
          "validators": {
            "title": "Validators (optional)",
            "type": "string",
            "description": "JSON array of validator objects. Boolean classifiers — only articles where every validator returns true are counted in valid_records. Example: [{\"name\":\"is_acquisition_event\",\"description\":\"The article is about an acquisition.\",\"type\":\"boolean\"}]"
          },
          "enrichments": {
            "title": "Enrichments (optional)",
            "type": "string",
            "description": "JSON array of enrichment objects. Custom extraction fields added to each result record. Example: [{\"name\":\"acquirer_company\",\"description\":\"The acquiring company.\",\"type\":\"company\"}]"
          },
          "connectedDatasetIds": {
            "title": "Connected Dataset IDs (optional)",
            "type": "string",
            "description": "JSON array of dataset UUID strings whose entities narrow the retrieval scope. Example: [\"uuid1\", \"uuid2\"]"
          },
          "webhookIds": {
            "title": "Webhook IDs (optional)",
            "type": "string",
            "description": "JSON array of webhook UUID strings to notify when the job completes. Max 5 per job. Example: [\"uuid1\"]"
          },
          "projectId": {
            "title": "Project ID (optional)",
            "type": "string",
            "description": "Project UUID to associate this job with."
          },
          "fetchAllWatchlistNews": {
            "title": "Fetch All Watchlist News (optional)",
            "type": "boolean",
            "description": "When true, retrieves all news for connected Company Watchlist entities without topic filtering. Requires connectedDatasetIds to be set.",
            "default": false
          },
          "edAssociationType": {
            "title": "Entity Association Type (optional)",
            "enum": [
              "mention",
              "event_associated"
            ],
            "type": "string",
            "description": "Filter events by entity association type. 'event_associated' keeps only events where the entity is a direct actor. 'mention' keeps only events where the entity is merely referenced. Only relevant when connectedDatasetIds is set."
          },
          "edScoreMin": {
            "title": "Entity Domain Score Min (optional)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum entity-domain relevance score (1-10). Only relevant when connectedDatasetIds is set. Defaults to 2 when connectedDatasetIds is provided."
          },
          "pollIntervalSeconds": {
            "title": "Poll Interval (seconds)",
            "type": "integer",
            "description": "How often to check job status.",
            "default": 60
          },
          "timeoutMinutes": {
            "title": "Timeout (minutes)",
            "type": "integer",
            "description": "Stop polling after this many minutes.",
            "default": 30
          },
          "pageSize": {
            "title": "Page Size",
            "type": "integer",
            "description": "How many records to fetch per page when pulling results.",
            "default": 100
          },
          "page": {
            "title": "Start Page",
            "type": "integer",
            "description": "Page number to start pulling results from (default 1, pulls all subsequent pages).",
            "default": 1
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}