{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset Filter & Transform — JSON to CSV, Excel, Dedupe & Clean",
    "description": "Filter, transform and convert Apify datasets, CSV/TSV/JSON/JSONL/Excel links, Google Sheets or inline rows: 26 transform steps, 25 filters, dedupe, sort. JSON to CSV, CSV to JSON, Excel. Works with limited permissions. $0.50 per 1,000 output rows; filtered-out rows, duplicates and file exports free.",
    "version": "0.0",
    "x-build-id": "FtUvXaLKBvLGaKUAh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saliga~dataset-filter-transform/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saliga-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/saliga~dataset-filter-transform/runs": {
      "post": {
        "operationId": "runs-sync-saliga-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/saliga~dataset-filter-transform/run-sync": {
      "post": {
        "operationId": "run-sync-saliga-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": "Apify datasets",
            "type": "array",
            "description": "Datasets to filter and transform, for example the output of a scraper run. Pick them here (or paste their IDs) so the run gets permission to read them, also when this Actor runs with limited permissions. A named dataset can also be given as username~dataset-name. Several datasets are read one after another into one table."
          },
          "fileUrls": {
            "title": "File links (CSV, JSON, Excel, Google Sheets)",
            "type": "array",
            "description": "Public links to CSV, TSV, JSON, JSONL / NDJSON or Excel (.xlsx) files, up to 100 MB each, to convert or filter. Google Sheets links work when the sheet is shared as \"Anyone with the link\" (the tab in the link is used); Google Drive and Dropbox share links work too.",
            "items": {
              "type": "string"
            }
          },
          "rows": {
            "title": "Rows (JSON)",
            "type": "array",
            "description": "Rows given directly as a JSON array of objects, e.g. to convert JSON to CSV or Excel. The example rows are fictional product listings. When you also give datasets or file links, they are ignored, and so is every example setting of this form still at its example value (clear the example rows to keep those settings)."
          },
          "transforms": {
            "title": "Transform steps",
            "type": "array",
            "description": "List of steps like {\"op\": \"rename\", \"from\": \"Title\", \"to\": \"title\"}. Ops: rename, drop, keep, copy, setField, default (fill blanks), addField (template with {{field}}), compute (arithmetic such as \"price * 1.2\"), cast (number, integer, string, boolean), trim, uppercase, lowercase, replace (text or regex), regexExtract, split, joinArray, substring, round, coalesce, dateFormat (iso, date, unix, unixMs or a pattern like DD/MM/YYYY), dateDiff, extractDomain (URL or e-mail), mapValues, hash, parseJson, length. Steps that change a value write it back, or to \"into\". The README lists the settings of every op. The example cleans the price, adds a price with tax, the shop domain and a plain date."
          },
          "filters": {
            "title": "Filters",
            "type": "array",
            "description": "List of conditions {\"field\", \"operator\", \"value\"}, or text such as \"price < 50\". Operators: equals, notEquals, contains, notContains, startsWith, endsWith, greaterThan, lessThan, greaterOrEqual, lessOrEqual, between ([min, max]), isEmpty, isNotEmpty, isTrue, isFalse, matchesRegex, in, notIn, arrayContains, lengthGreaterThan, lengthLessThan, dateAfter, dateBefore (a date, \"today\" or \"now\"), withinLastDays, olderThanDays. Text comparisons ignore case and surrounding spaces unless the condition has \"caseSensitive\": true. Dots reach nested fields (seller.name). The example keeps listings in stock under 200."
          },
          "filterMode": {
            "title": "Rows must match",
            "enum": [
              "all",
              "any"
            ],
            "type": "string",
            "description": "How the conditions combine.",
            "default": "all"
          },
          "lenientNumbers": {
            "title": "Read prices and amounts as numbers",
            "type": "boolean",
            "description": "Text like \"$1,234.50\", \"49 USD\", \"15%\" or \"(300)\" counts as a number in number filters, sorting, compute and cast. Off: only plain numbers such as \"1234.5\" or \"1,234\".",
            "default": true
          },
          "dedupeFields": {
            "title": "Remove duplicates by",
            "type": "array",
            "description": "Rows with the same values in these fields are duplicates, e.g. sku, url, or name + city. Rows where all of these fields are empty are never removed. Removed duplicates are free.",
            "items": {
              "type": "string"
            }
          },
          "dedupe": {
            "title": "Remove rows that are exact copies",
            "type": "boolean",
            "description": "With no fields above: remove rows where every field is equal.",
            "default": false
          },
          "dedupeIgnoreCase": {
            "title": "Ignore case and extra spaces",
            "type": "boolean",
            "description": "\"NP-BP-040\" and \" np-bp-040\" count as the same value.",
            "default": true
          },
          "keep": {
            "title": "Keep",
            "enum": [
              "first",
              "last"
            ],
            "type": "string",
            "description": "Which row of each duplicate group stays. Keeping the last row holds all rows in memory.",
            "default": "first"
          },
          "outputDuplicates": {
            "title": "Save removed duplicates",
            "type": "boolean",
            "description": "Write the removed duplicates to a separate dataset of this run (linked in the OUTPUT record) instead of dropping them. Free.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "type": "array",
            "description": "One or more sort keys, the first decides first: \"price\", \"price desc\" or \"-price\" (descending), or {\"field\": \"price\", \"direction\": \"desc\"}. Numbers sort as numbers, text A to Z ignoring case, empty values last. Sorting holds the filtered rows in memory."
          },
          "outputFields": {
            "title": "Output columns",
            "type": "array",
            "description": "Pick, order and rename the output columns: \"price\" or \"seller.name -> seller\". A field a row does not have is written as empty (null), so CSV and Excel files get fixed columns. Empty: all fields. Filters, dedupe and sort use the names before this step.",
            "items": {
              "type": "string"
            }
          },
          "flatten": {
            "title": "Flatten nested objects",
            "type": "boolean",
            "description": "Nested objects become dotted columns: {\"seller\": {\"name\": \"X\"}} becomes \"seller.name\". Handy for JSON to CSV. Lists stay as they are (JSON text in CSV and Excel cells).",
            "default": false
          },
          "skipRows": {
            "title": "Skip first rows",
            "minimum": 0,
            "type": "integer",
            "description": "Skip this many output rows after sorting (for paging). Skipped rows are not charged.",
            "default": 0
          },
          "maxRows": {
            "title": "Max output rows",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many output rows. 0: no limit. Also a cap on the price.",
            "default": 0
          },
          "exportFormats": {
            "title": "Also save as files",
            "type": "array",
            "description": "Save the output rows as files in the key-value store (data.csv, data.xlsx, data.json, data.jsonl), with download links in the OUTPUT record. Free. CSV and Excel files are safe to open: text that starts like a formula gets a ' in front.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx",
                "json",
                "jsonl"
              ],
              "enumTitles": [
                "CSV",
                "Excel (.xlsx)",
                "JSON",
                "JSONL / NDJSON"
              ]
            },
            "default": [
              "csv",
              "xlsx"
            ]
          },
          "excelSheet": {
            "title": "Excel sheet name",
            "type": "string",
            "description": "Sheet to read in Excel files. Empty: the first sheet."
          },
          "trimStrings": {
            "title": "Trim spaces",
            "type": "boolean",
            "description": "Remove spaces at the start and end of every text value.",
            "default": true
          },
          "lowercaseFields": {
            "title": "Lowercase fields",
            "type": "array",
            "description": "Text in these fields becomes lowercase, e.g. e-mails or country codes.",
            "items": {
              "type": "string"
            }
          },
          "normalizeUrlFields": {
            "title": "Normalise URL fields",
            "type": "array",
            "description": "URLs in these fields get a lowercase host, no utm_* or click-ID parameters (gclid, fbclid ...), no #fragment and no trailing slash; https:// is added to bare domains. Good before removing duplicates by URL.",
            "items": {
              "type": "string"
            }
          },
          "extractDomainFrom": {
            "title": "Extract domain from",
            "type": "string",
            "description": "A URL or website field. Adds a domain column (www. removed, lowercase): https://www.Example.com/about -> example.com."
          },
          "addSourceColumn": {
            "title": "Add a _source column",
            "type": "boolean",
            "description": "Tag each row with where it came from: dataset:<name or ID>, the file link, or rows.",
            "default": false
          },
          "joinDatasetId": {
            "title": "Join with dataset",
            "type": "string",
            "description": "A dataset to look values up in."
          },
          "joinFileUrl": {
            "title": "Join with file link",
            "type": "string",
            "description": "Public CSV, TSV, JSON, JSONL or Excel link, or a Google Sheet."
          },
          "joinRows": {
            "title": "Join with rows (JSON)",
            "type": "array",
            "description": "A JSON array of objects to look values up in."
          },
          "joinOn": {
            "title": "Match your field",
            "type": "string",
            "description": "Field of your rows to match on, e.g. domain."
          },
          "joinRightOn": {
            "title": "...with this field of the join table",
            "type": "string",
            "description": "Empty: the same name as above."
          },
          "joinType": {
            "title": "Rows without a match",
            "enum": [
              "left",
              "inner"
            ],
            "type": "string",
            "description": "Left join keeps every row; inner join keeps only rows with a match. Only rows written to the output are charged.",
            "default": "left"
          },
          "joinFields": {
            "title": "Columns to bring over",
            "type": "array",
            "description": "Empty: every column of the join table except its key.",
            "items": {
              "type": "string"
            }
          },
          "joinPrefix": {
            "title": "Prefix for clashing columns",
            "type": "string",
            "description": "When your rows already have a column of the same name, the joined value is added as <prefix><name>, so nothing is overwritten.",
            "default": "right_"
          },
          "joinIgnoreCase": {
            "title": "Match keys ignoring case",
            "type": "boolean",
            "description": "\"ACME.example\" matches \"acme.example\". The first matching row of the join table is used.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}