{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk ChatGPT & Claude: Classify, Extract & Translate Datasets",
    "description": "Run AI on every row of a dataset, CSV, Excel or Google Sheet: classify, sentiment analysis, extract fields, summarize, translate or your own prompt. Answers are added as new columns. No API key needed, or bring your own OpenAI, Claude, Gemini or OpenRouter key.",
    "version": "1.0",
    "x-build-id": "Rgkhgq6LjIGVLRPGL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidydata~ai-dataset-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidydata-ai-dataset-enricher",
        "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/tidydata~ai-dataset-enricher/runs": {
      "post": {
        "operationId": "runs-sync-tidydata-ai-dataset-enricher",
        "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/tidydata~ai-dataset-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-tidydata-ai-dataset-enricher",
        "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": {
          "task": {
            "title": "What should the AI do with each row?",
            "enum": [
              "classify",
              "sentiment",
              "extract",
              "summarize",
              "translate",
              "custom"
            ],
            "type": "string",
            "description": "Pick a ready-made task or write your own prompt. The answer is added to each row as new columns.",
            "default": "sentiment"
          },
          "instruction": {
            "title": "Instruction / prompt",
            "type": "string",
            "description": "For 'Custom prompt': what to do with each row, e.g. 'Is this company B2B or B2C?'. You can insert row values with {field}, e.g. 'Write a one-line cold email opener for {name}, who works at {company}.' For 'Classify' it is optional extra guidance."
          },
          "labels": {
            "title": "Categories (for Classify)",
            "type": "array",
            "description": "The categories the AI can choose from, one per item, e.g. Complaint, Question, Praise, Spam.",
            "items": {
              "type": "string"
            }
          },
          "multiLabel": {
            "title": "Allow several categories per row",
            "type": "boolean",
            "description": "Classify only: return every category that applies instead of exactly one.",
            "default": false
          },
          "outputFields": {
            "title": "Output columns (for Extract or Custom)",
            "type": "array",
            "description": "One column per item as  name: what it should contain, e.g.  price: the product price as a number  ·  email: contact email  ·  is_b2b: true or false. The AI fills them (null when unknown).",
            "items": {
              "type": "string"
            }
          },
          "targetLanguage": {
            "title": "Language (for Translate)",
            "type": "string",
            "description": "Language to translate into, e.g. English, Spanish, German. New columns get the language code, e.g. title_es.",
            "default": "English"
          },
          "summaryWords": {
            "title": "Summary length (words)",
            "minimum": 5,
            "maximum": 400,
            "type": "integer",
            "description": "Summarize only: maximum words per summary.",
            "default": 40
          },
          "translateSummary": {
            "title": "Write summaries in the 'Language' above",
            "type": "boolean",
            "description": "Summarize only: by default each summary is in the language of the row.",
            "default": false
          },
          "datasetIds": {
            "title": "Apify datasets",
            "type": "array",
            "description": "Pick one or more datasets from your storages (e.g. results of a scraper). When this Actor runs as an integration after another Actor, use {{resource.defaultDatasetId}}."
          },
          "fileUrls": {
            "title": "Or files (CSV, Excel, JSON, Google Sheets)",
            "type": "array",
            "description": "Public links to .csv, .xlsx or .json files, or Google Sheets shared as 'Anyone with the link can view'.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "texts": {
            "title": "Or paste texts",
            "type": "array",
            "description": "One text per item (reviews, comments, titles, descriptions…). Each becomes a row with a 'text' column.",
            "items": {
              "type": "string"
            }
          },
          "inputFields": {
            "title": "Only send these fields to the AI",
            "type": "array",
            "description": "Optional. By default every text field of the row is sent (IDs, URLs and image links are skipped). Nested fields: author.name.",
            "items": {
              "type": "string"
            }
          },
          "maxRows": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Optional limit. 0 or empty = all rows."
          },
          "quality": {
            "title": "Built-in AI model",
            "enum": [
              "fast",
              "smart"
            ],
            "type": "string",
            "description": "Used when you don't add your own API key. No account or key needed: the price per row includes the AI.",
            "default": "fast"
          },
          "apiProvider": {
            "title": "Your AI provider (optional)",
            "enum": [
              "openai",
              "anthropic",
              "openrouter",
              "gemini",
              "groq",
              "deepseek",
              "mistral"
            ],
            "type": "string",
            "description": "Only used if you add your own API key below. With your own key you pay the AI provider directly and this Actor charges a much lower price per row.",
            "default": "openai"
          },
          "apiKey": {
            "title": "Your API key (optional)",
            "type": "string",
            "description": "Optional. Your key for the provider above. It is stored encrypted and only used for this run."
          },
          "model": {
            "title": "Model name (with your own key)",
            "type": "string",
            "description": "Optional, e.g. gpt-5-mini, claude-haiku-5-5, gemini-2.5-flash, openai/gpt-oss-120b. Empty = a fast, cheap default for that provider."
          },
          "outputPrefix": {
            "title": "Prefix for the new columns",
            "type": "string",
            "description": "New columns are named like ai_label, ai_sentiment, ai_summary. Use an empty prefix for plain names.",
            "default": "ai_"
          },
          "keepOriginalFields": {
            "title": "Keep the original columns",
            "type": "boolean",
            "description": "Output each original row plus the new AI columns. Untick to output only the AI columns.",
            "default": true
          },
          "maxCharsPerRow": {
            "title": "Max characters sent per row",
            "minimum": 200,
            "maximum": 30000,
            "type": "integer",
            "description": "Long rows are cut to this length before being sent to the AI.",
            "default": 4000
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many rows are processed at the same time. Lower it if your own API key hits rate limits.",
            "default": 8
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}