{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset Join & VLOOKUP: Merge Two Datasets or Files by Key",
    "description": "Join two Apify datasets, CSV/Excel/JSON files or JSON lists on key fields, like SQL JOIN or Excel VLOOKUP: left, inner, right, full and anti joins, multi-field keys, case/space/phone/URL-insensitive matching, and a match flag on every row.",
    "version": "0.0",
    "x-build-id": "2gwppqDQ6eeRzKxbO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/charlesmarkette~dataset-join-vlookup-merge-by-key/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-charlesmarkette-dataset-join-vlookup-merge-by-key",
        "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/charlesmarkette~dataset-join-vlookup-merge-by-key/runs": {
      "post": {
        "operationId": "runs-sync-charlesmarkette-dataset-join-vlookup-merge-by-key",
        "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/charlesmarkette~dataset-join-vlookup-merge-by-key/run-sync": {
      "post": {
        "operationId": "run-sync-charlesmarkette-dataset-join-vlookup-merge-by-key",
        "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 dataset",
            "type": "string",
            "description": "The main table: every row of it is streamed, so put the bigger table here. Pick a dataset from a scraper run, or use {{resource.defaultDatasetId}} in an integration. Leave empty to use a file URL or JSON items instead."
          },
          "leftFileUrl": {
            "title": "Left file URL",
            "type": "string",
            "description": "Or a public link to a CSV, TSV, Excel (XLSX, XLS) or JSON / JSON Lines file. The first row is the header; for Excel, the first sheet is read. Google Sheets (shared as 'Anyone with the link'), Google Drive and Dropbox share links work."
          },
          "leftItems": {
            "title": "Left JSON items",
            "type": "array",
            "description": "Or a JSON array of objects. Used when no dataset or file URL is given. Handy for quick tests and API calls."
          },
          "rightDatasetId": {
            "title": "Right dataset",
            "type": "string",
            "description": "The lookup table whose fields are added to matching left rows. It is held in memory, so put the smaller table here."
          },
          "rightFileUrl": {
            "title": "Right file URL",
            "type": "string",
            "description": "Or a public link to a CSV, TSV, Excel (XLSX, XLS) or JSON / JSON Lines file (first row = header, first sheet)."
          },
          "rightItems": {
            "title": "Right JSON items",
            "type": "array",
            "description": "Or a JSON array of objects. Used when no dataset or file URL is given."
          },
          "leftKeys": {
            "title": "Left key fields",
            "type": "array",
            "description": "The field (or fields) to match on in the left table, e.g. email, sku or website. Several fields must all match (like a composite key). Dots for nested fields (company.domain).",
            "items": {
              "type": "string"
            }
          },
          "rightKeys": {
            "title": "Right key fields",
            "type": "array",
            "description": "The matching fields in the right table, in the same order, when their names differ (e.g. 'Email Address'). Leave empty to use the left names.",
            "items": {
              "type": "string"
            }
          },
          "joinType": {
            "title": "Join type",
            "enum": [
              "left",
              "inner",
              "right",
              "full",
              "anti",
              "rightAnti"
            ],
            "type": "string",
            "description": "Which rows to output. Rows with a match combine the left row and the right row's fields.",
            "default": "left"
          },
          "multipleMatches": {
            "title": "When several right rows match",
            "enum": [
              "first",
              "last",
              "all"
            ],
            "type": "string",
            "description": "First/last: one output row per left row, using the first or last matching right row in right-table order. All: one row per matching pair.",
            "default": "first"
          },
          "caseInsensitive": {
            "title": "Ignore letter case",
            "type": "boolean",
            "description": "'BEN@Globex.io' matches 'ben@globex.io'.",
            "default": true
          },
          "trimWhitespace": {
            "title": "Ignore extra spaces",
            "type": "boolean",
            "description": "Spaces at the start and end are ignored and runs of spaces count as one.",
            "default": true
          },
          "digitsOnly": {
            "title": "Compare digits only (phone numbers)",
            "type": "boolean",
            "description": "Only the digits of each key are compared, so '(555) 010-2030' matches '555.010.2030'. A country code counts: '+1 555 010 2030' doesn't match '555 010 2030'.",
            "default": false
          },
          "stripUrl": {
            "title": "Compare URLs and domains loosely",
            "type": "boolean",
            "description": "Ignore http(s)://, a leading www., the ?query, #fragment and trailing slashes, so 'https://www.acme.com/' matches 'acme.com'. Paths still count: 'acme.com/about' doesn't match 'acme.com'.",
            "default": false
          },
          "rightFields": {
            "title": "Right fields to add",
            "type": "array",
            "description": "Optional. Only these right-table fields are added (dots for nested fields; the output field is named exactly as written). Empty = all right fields except the key fields.",
            "items": {
              "type": "string"
            }
          },
          "rightPrefix": {
            "title": "Prefix for clashing right fields",
            "type": "string",
            "description": "When a right field has the same name as a left field, the right one is renamed with this prefix (name → right_name). Set it to \"\" in the JSON input to let right values replace left values instead.",
            "default": "right_"
          },
          "prefixAll": {
            "title": "Prefix every right field",
            "type": "boolean",
            "description": "Add the prefix to all right fields, not only to the clashing ones.",
            "default": false
          },
          "addMatchInfo": {
            "title": "Add _matched and _matchCount",
            "type": "boolean",
            "description": "_matched: true when the row found a match. _matchCount: how many right rows have this key (0 for unmatched rows).",
            "default": true
          },
          "maxResults": {
            "title": "Max output rows",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on output rows."
          },
          "rightMaxRows": {
            "title": "Max right-table rows",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit for the right table, which is held in memory. The run stops with a clear message (nothing charged) if the right table is bigger. In our test, a run with a million right rows of five short fields peaked at about 700 MB; wide rows (many fields, long text) take more. For big right tables, give the run more memory, or list only the needed columns under 'Right fields to add' (then only those are kept in memory).",
            "default": 1000000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}