{
  "openapi": "3.0.1",
  "info": {
    "title": "VLOOKUP for Datasets: Join & Match Two Tables",
    "description": "VLOOKUP for datasets: join two tables on one or more key columns (left, inner, right, full, anti, semi). Fixes case, spaces, accents and 001 vs 1. Optional fuzzy match, match report of unmatched keys, CSV/XLSX/JSON export. Input: Apify datasets, CSV/JSON/XLSX URLs or pasted rows.",
    "version": "0.1",
    "x-build-id": "uaIy84h56uJehGRnR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~dataset-join-vlookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-dataset-join-vlookup",
        "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/data-done-right~dataset-join-vlookup/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-dataset-join-vlookup",
        "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/data-done-right~dataset-join-vlookup/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-dataset-join-vlookup",
        "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": [
          "leftKeys"
        ],
        "properties": {
          "leftDatasetId": {
            "title": "Left table: Apify dataset",
            "type": "string",
            "description": "Pick the Apify dataset that is the table you want to keep and add columns to (the one with the VLOOKUP formulas), or paste its ID (example: aBcD1234eFgH5678i or username~my-dataset). Leave empty if you use a URL or pasted rows."
          },
          "leftUrl": {
            "title": "Left table: file URL",
            "type": "string",
            "description": "Direct link to a .csv, .tsv, .json, .jsonl or .xlsx file (example: https://example.com/export/customers.csv). Google Sheets: use the 'publish to web' CSV link. Private networks are blocked."
          },
          "leftItems": {
            "title": "Left table: pasted rows",
            "type": "array",
            "description": "Rows pasted as a JSON array of objects (example: [{\"sku\": \"001\", \"price\": 9.5}]). Good for small tables and for trying the Actor. Combined with the other left sources in the order dataset, URL, rows, text."
          },
          "leftText": {
            "title": "Left table: pasted CSV or JSON text",
            "type": "string",
            "description": "CSV text with a header row, or JSON/JSON Lines text (example: \"sku,price\\n001,9.5\\n002,12\"). The format is detected automatically."
          },
          "leftSheet": {
            "title": "Left table: Excel sheet",
            "type": "string",
            "description": "Sheet name or number (1 = first) to read when the file is .xlsx (example: Sheet2). Empty = first sheet."
          },
          "rightDatasetId": {
            "title": "Right table: Apify dataset",
            "type": "string",
            "description": "Pick the Apify dataset that is the lookup table (the one you look values up in), or paste its ID (example: aBcD1234eFgH5678i or username~my-dataset). Leave empty if you use a URL or pasted rows."
          },
          "rightUrl": {
            "title": "Right table: file URL",
            "type": "string",
            "description": "Direct link to a .csv, .tsv, .json, .jsonl or .xlsx file (example: https://example.com/export/customers.csv). Google Sheets: use the 'publish to web' CSV link. Private networks are blocked."
          },
          "rightItems": {
            "title": "Right table: pasted rows",
            "type": "array",
            "description": "Rows pasted as a JSON array of objects (example: [{\"sku\": \"001\", \"price\": 9.5}]). Good for small tables and for trying the Actor. Combined with the other right sources in the order dataset, URL, rows, text."
          },
          "rightText": {
            "title": "Right table: pasted CSV or JSON text",
            "type": "string",
            "description": "CSV text with a header row, or JSON/JSON Lines text (example: \"sku,price\\n001,9.5\\n002,12\"). The format is detected automatically."
          },
          "rightSheet": {
            "title": "Right table: Excel sheet",
            "type": "string",
            "description": "Sheet name or number (1 = first) to read when the file is .xlsx (example: Sheet2). Empty = first sheet."
          },
          "leftKeys": {
            "title": "Left key column(s)",
            "type": "array",
            "description": "Column(s) of the left table to match on. One name for a single key, several for a composite key. Dotted paths work for nested data. Example: [\"email\"] or [\"first_name\", \"last_name\"].",
            "items": {
              "type": "string"
            }
          },
          "rightKeys": {
            "title": "Right key column(s)",
            "type": "array",
            "description": "Column(s) of the right table, matched to the left keys by position. Leave empty when the names are the same. Example: [\"customer_email\"].",
            "items": {
              "type": "string"
            }
          },
          "joinType": {
            "title": "Join type",
            "enum": [
              "left",
              "inner",
              "right",
              "full",
              "anti",
              "semi"
            ],
            "type": "string",
            "description": "left keeps all left rows and adds right columns where a match exists (what VLOOKUP does). anti returns left rows that have no match, semi returns left rows that do.",
            "default": "left"
          },
          "duplicateMatches": {
            "title": "If a key appears more than once on the right",
            "enum": [
              "first",
              "last",
              "all",
              "error"
            ],
            "type": "string",
            "description": "first behaves like VLOOKUP. all repeats the left row once per match (output can grow, the price does not). error stops the run before anything is charged and lists the duplicate keys.",
            "default": "first"
          },
          "normTrim": {
            "title": "Trim spaces",
            "type": "boolean",
            "description": "Strip leading, trailing and non-breaking spaces and collapse inner runs of whitespace. \" ACME  Corp \" = \"ACME Corp\".",
            "default": true
          },
          "normCase": {
            "title": "Ignore upper/lower case",
            "type": "boolean",
            "description": "Compare in lower case. \"ANA@X.COM\" = \"ana@x.com\".",
            "default": true
          },
          "normAccents": {
            "title": "Ignore accents",
            "type": "boolean",
            "description": "Remove accents before comparing. \"Café\" = \"Cafe\".",
            "default": false
          },
          "normNumeric": {
            "title": "Numbers and IDs as numbers",
            "type": "boolean",
            "description": "Treat number-like keys as numbers: \"001\" = 1 = \"1.0\", and \"1,000\" is 1000. Text that is not wholly a number is untouched.",
            "default": true
          },
          "normPunctuation": {
            "title": "Ignore punctuation",
            "type": "boolean",
            "description": "Drop punctuation and symbols. \"Acme, Inc.\" = \"Acme Inc\".",
            "default": false
          },
          "normRemoveSpaces": {
            "title": "Remove all spaces",
            "type": "boolean",
            "description": "Delete every space inside the key. \"AB 123\" = \"AB123\". Useful for phone and part numbers.",
            "default": false
          },
          "keyNormalizers": {
            "title": "Per-key cleaning (override)",
            "type": "object",
            "description": "Optional. Overrides the switches above for named left key columns. Allowed steps: trim, case, accents, numeric, punctuation, remove_spaces. Example: {\"sku\": [\"trim\", \"case\", \"numeric\"], \"city\": [\"trim\", \"case\", \"accents\"]}."
          },
          "rightColumns": {
            "title": "Right columns to add",
            "type": "array",
            "description": "Which right-table columns to bring over. Empty = all except the key columns. Example: [\"name\", \"plan\"].",
            "items": {
              "type": "string"
            }
          },
          "rightPrefix": {
            "title": "Prefix for right columns",
            "type": "string",
            "description": "Text put before every right column name (example: crm_). Empty = none."
          },
          "rightSuffix": {
            "title": "Suffix for right columns",
            "type": "string",
            "description": "Text put after every right column name (example: _crm). Empty = none."
          },
          "collisionSuffix": {
            "title": "Suffix when names collide",
            "type": "string",
            "description": "Added to a right column whose name already exists on the left (example: _right gives name_right).",
            "default": "_right"
          },
          "keepRightKeys": {
            "title": "Keep right key columns",
            "type": "boolean",
            "description": "Also output the right table's key columns. By default they are dropped because they repeat the left keys.",
            "default": false
          },
          "addMatchStatus": {
            "title": "Add match status column",
            "type": "boolean",
            "description": "Adds _match_status to each row: matched, fuzzy, unmatched or right_only. Turn off for a clean table.",
            "default": true
          },
          "fuzzyMatch": {
            "title": "Fuzzy matching for unmatched rows",
            "type": "boolean",
            "description": "After the exact join, try to pair left rows that found no match with unused right rows by similar keys (typos, small spelling differences). Approximate and one-to-one. Each fuzzy match is billed extra. Holds the left table in memory.",
            "default": false
          },
          "fuzzyThreshold": {
            "title": "Fuzzy threshold",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "Minimum similarity from 0.5 to 1 (example: 0.88). Higher = fewer, safer matches. With several key columns every column must reach it.",
            "default": 0.88
          },
          "fuzzyMethod": {
            "title": "Fuzzy method",
            "enum": [
              "jaro-winkler",
              "difflib"
            ],
            "type": "string",
            "description": "Similarity measure. Jaro-Winkler favours matching starts of words; difflib compares longest common blocks.",
            "default": "jaro-winkler"
          },
          "fuzzyMaxComparisons": {
            "title": "Fuzzy work limit",
            "minimum": 1000,
            "maximum": 200000000,
            "type": "integer",
            "description": "Largest number of key comparisons (unmatched left keys x unused right keys) to allow. Above it, fuzzy matching is skipped and the report says so. Example: 4000000.",
            "default": 4000000
          },
          "exports": {
            "title": "Export files",
            "type": "array",
            "description": "Also write the joined table as files in the key-value store, with links in MATCH_REPORT. Each file is billed once. Leave empty for the dataset only.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx",
                "json",
                "jsonl"
              ],
              "enumTitles": [
                "CSV (UTF-8, opens in Excel)",
                "Excel (.xlsx)",
                "JSON array",
                "JSON Lines"
              ]
            },
            "default": []
          },
          "exportName": {
            "title": "Export file name",
            "type": "string",
            "description": "Base name of the export files (example: orders-with-customers).",
            "default": "joined"
          },
          "escapeFormulas": {
            "title": "Neutralise spreadsheet formulas",
            "type": "boolean",
            "description": "Prefix text cells that start with = + - or @ with an apostrophe in CSV exports so Excel cannot run them. XLSX cells are always stored as text.",
            "default": true
          },
          "maxLeftRows": {
            "title": "Max left rows",
            "minimum": 1,
            "maximum": 2000000,
            "type": "integer",
            "description": "Hard cap on left rows read, and therefore on cost (example: 100000 rows = at most $180). Reading stops there and the run still succeeds.",
            "default": 100000
          },
          "maxRightRows": {
            "title": "Max right rows",
            "minimum": 1,
            "maximum": 2000000,
            "type": "integer",
            "description": "Hard cap on right rows loaded into memory (example: 500000). Rows beyond it cannot match, and the report warns you.",
            "default": 500000
          },
          "maxOutputRows": {
            "title": "Max output rows",
            "minimum": 1,
            "maximum": 10000000,
            "type": "integer",
            "description": "Stops writing rows after this many (matters for duplicateMatches = all). Example: 1000000.",
            "default": 1000000
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Largest CSV/JSON/XLSX file to download per URL, in megabytes (example: 50).",
            "default": 50
          },
          "csvInferTypes": {
            "title": "Read CSV numbers as numbers",
            "type": "boolean",
            "description": "Turns CSV cells like 12 or 3.5 into numbers. Text such as 007 or +1555 stays text, and key matching ignores the difference anyway.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}