{
  "openapi": "3.0.1",
  "info": {
    "title": "Custom AI Prompt by Signaliz",
    "description": "Run structured AI prompts over company or custom records through the Signaliz public API, with optional web search and output fields.",
    "version": "1.0",
    "x-build-id": "xmLfqCKWJEWG4obqO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signaliz~custom-ai-prompt/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signaliz-custom-ai-prompt",
        "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/signaliz~custom-ai-prompt/runs": {
      "post": {
        "operationId": "runs-sync-signaliz-custom-ai-prompt",
        "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/signaliz~custom-ai-prompt/run-sync": {
      "post": {
        "operationId": "run-sync-signaliz-custom-ai-prompt",
        "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",
        "properties": {
          "domain": {
            "title": "Domain",
            "type": "string",
            "description": "Company domain for a single flat request."
          },
          "company_name": {
            "title": "Company name",
            "type": "string",
            "description": "Optional company name for the single request."
          },
          "prompt": {
            "title": "Prompt",
            "type": "string",
            "description": "Prompt to run for each row."
          },
          "user_template": {
            "title": "Prompt template",
            "type": "string",
            "description": "Optional row-aware template. Use {{field_name}} placeholders from each input row."
          },
          "output_fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Structured fields to return. Use strings or objects with name, type, and description.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string",
                  "description": "Output field name."
                },
                "type": {
                  "title": "Type",
                  "type": "string",
                  "description": "Output field type, such as text, number, boolean, array, or json."
                },
                "description": {
                  "title": "Description",
                  "type": "string",
                  "description": "Instructions for this output field."
                }
              },
              "required": [
                "name"
              ]
            },
            "default": [
              {
                "name": "score",
                "type": "number"
              },
              {
                "name": "reason",
                "type": "text"
              }
            ]
          },
          "records": {
            "title": "Records",
            "type": "array",
            "description": "Batch rows to process with the prompt or prompt template.",
            "items": {
              "type": "object"
            }
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Alternative batch mode for a list of domains.",
            "items": {
              "type": "string"
            }
          },
          "csv_text": {
            "title": "CSV text",
            "type": "string",
            "description": "Paste CSV rows. Original columns are preserved in output."
          },
          "csv_url": {
            "title": "CSV URL",
            "type": "string",
            "description": "Public URL to a CSV file."
          },
          "source_dataset_id": {
            "title": "Apify Dataset ID",
            "type": "string",
            "description": "Read rows from another Apify dataset."
          },
          "datasetId": {
            "title": "Apify Dataset ID (alias)",
            "type": "string",
            "description": "Alias for source_dataset_id. Included for compatibility with existing Signaliz Apify actors."
          },
          "search": {
            "title": "Use search",
            "type": "boolean",
            "description": "Enable Signaliz web search context.",
            "default": true
          },
          "enable_search": {
            "title": "Enable search",
            "type": "boolean",
            "description": "Alias for search.",
            "default": true
          },
          "enable_online": {
            "title": "Enable online mode",
            "type": "boolean",
            "description": "Alias for search/online Signaliz model context.",
            "default": true
          },
          "web_search": {
            "title": "Web search config",
            "type": "object",
            "description": "Optional advanced web_search config forwarded to Signaliz."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "OpenRouter model ID used by Signaliz.",
            "default": "google/gemini-3.1-flash-lite"
          },
          "temperature": {
            "title": "Temperature",
            "minimum": 0,
            "maximum": 2,
            "type": "number",
            "description": "Model temperature.",
            "default": 0.3
          },
          "chunk_size": {
            "title": "Chunk size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Rows grouped before the next bounded processing slice.",
            "default": 25
          },
          "max_concurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum simultaneous Signaliz API calls.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}