{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset Filter & Converter: JSON to CSV/Excel [$0.50/1K 💰]",
    "description": "💰 $0.50 per 1,000 rows kept; filtered-out rows and file exports free, no start fee. Filter and transform Apify datasets: keep matching rows, pick and rename fields, flatten nested JSON, split arrays, sort, export CSV or Excel. Cheaper than nerolabs' filter ($1.40–2/1K). New rows only on schedules.",
    "version": "0.1",
    "x-build-id": "ZgJ2iUCOYRUqACMrc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cybermax~dataset-filter-transform/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cybermax-dataset-filter-transform",
        "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/cybermax~dataset-filter-transform/runs": {
      "post": {
        "operationId": "runs-sync-cybermax-dataset-filter-transform",
        "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/cybermax~dataset-filter-transform/run-sync": {
      "post": {
        "operationId": "run-sync-cybermax-dataset-filter-transform",
        "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": {
          "datasetIds": {
            "title": "Datasets",
            "type": "array",
            "description": "Pick one or more datasets (e.g. the results of a scraper run). Through the API, pass dataset IDs such as a run's defaultDatasetId. Leave empty for a free demo on sample data."
          },
          "datasetId": {
            "title": "Dataset (API alias)",
            "type": "string",
            "description": "API alias of \"datasetIds\" for a single dataset ID. Hidden in the form."
          },
          "filters": {
            "title": "Keep rows where",
            "type": "array",
            "description": "Conditions, e.g. [{\"field\": \"rating\", \"op\": \"gte\", \"value\": 4}, {\"field\": \"website\", \"op\": \"notEmpty\"}]. Ops: equals, notEquals, contains, notContains, startsWith, endsWith, matches (regex), gt, gte, lt, lte, in, notIn (value = list), isEmpty, notEmpty, exists, notExists. Dots for nested fields (address.city). Numbers and ISO dates compare as numbers and dates. Empty = keep every row."
          },
          "filterLogic": {
            "title": "Rows must match",
            "enum": [
              "all",
              "any"
            ],
            "type": "string",
            "description": "AND or OR across the conditions.",
            "default": "all"
          },
          "caseSensitive": {
            "title": "Case-sensitive text matching",
            "type": "boolean",
            "description": "Off: \"Coffee\" matches \"coffee\".",
            "default": false
          },
          "fields": {
            "title": "Output fields (pick and rename)",
            "type": "array",
            "description": "Keep only these fields, in this order. Rename with \"as\": \"address.city as city\", \"title as name\". Empty = keep all fields.",
            "items": {
              "type": "string"
            }
          },
          "omitFields": {
            "title": "Remove fields",
            "type": "array",
            "description": "Fields to drop (after picking/renaming).",
            "items": {
              "type": "string"
            }
          },
          "computed": {
            "title": "Computed fields",
            "type": "object",
            "description": "New fields from templates, e.g. {\"label\": \"{{title}} - {{address.city}}\", \"source\": \"google-maps\"}."
          },
          "unwind": {
            "title": "One row per array item",
            "type": "string",
            "description": "Optional array field to split into rows, e.g. emails or reviews. Each copy gets <field>Index. Filters then apply per item."
          },
          "flatten": {
            "title": "Flatten nested objects",
            "type": "boolean",
            "description": "{\"address\": {\"city\": \"Austin\"}} becomes {\"address.city\": \"Austin\"}: one column per field in CSV and Excel.",
            "default": false
          },
          "joinArrays": {
            "title": "Join simple arrays with",
            "type": "string",
            "description": "With flatten on: turn [\"a\",\"b\"] into \"a, b\" using this separator (e.g. \", \"). Empty = keep arrays."
          },
          "trimStrings": {
            "title": "Tidy text (trim, collapse spaces)",
            "type": "boolean",
            "description": "Removes leading/trailing spaces and repeated whitespace.",
            "default": true
          },
          "dropEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Leave out fields that are null, empty strings, [] or {}.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Output field to sort by (use the renamed name if you renamed it). Numbers and dates sort as numbers and dates."
          },
          "sortDesc": {
            "title": "Descending",
            "type": "boolean",
            "description": "Largest first.",
            "default": false
          },
          "skip": {
            "title": "Skip first N rows",
            "minimum": 0,
            "type": "integer",
            "description": "Optional, after filtering (and sorting)."
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on rows written."
          },
          "exportFormats": {
            "title": "Also save as files (free)",
            "type": "array",
            "description": "Writes export.csv / export.xlsx / export.jsonl / export.json to the run's key-value store; links are in OUTPUT. Files hold up to about 145,000 rows at 512 MB.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx",
                "jsonl",
                "json"
              ],
              "enumTitles": [
                "CSV (Excel-ready UTF-8)",
                "Excel (.xlsx)",
                "JSON Lines",
                "JSON array"
              ]
            },
            "default": []
          },
          "monitor": {
            "title": "Monitor mode: only rows never sent before",
            "type": "boolean",
            "description": "Remembers every row this watchlist has written; later runs write only new or changed rows. Rows sent before are not charged.",
            "default": false
          },
          "monitorKey": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Optional name for this watchlist's saved state (use one per workflow)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}