{
  "openapi": "3.0.1",
  "info": {
    "title": "Join Datasets: Left Join, VLOOKUP by Key Column",
    "description": "Joins two tables on a key column: Apify datasets or CSV/JSON files by URL. Inner, left, right or full outer join, several keys, case and space tolerant matching, or VLOOKUP-style pulling of chosen columns. Empty input runs a free demo.",
    "version": "0.1",
    "x-build-id": "VzeWq0PNvi55hkYYe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ucchiii~dataset-join-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ucchiii-dataset-join-lookup",
        "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/ucchiii~dataset-join-lookup/runs": {
      "post": {
        "operationId": "runs-sync-ucchiii-dataset-join-lookup",
        "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/ucchiii~dataset-join-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-ucchiii-dataset-join-lookup",
        "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": {
          "leftDatasetId": {
            "title": "Left table: Apify dataset",
            "type": "string",
            "description": "Dataset ID (a finished run's 'defaultDatasetId') or a dataset URL from Apify Console for the left table: the table whose rows you keep and extend. Give either this or 'Left table: file URL'. Leave all four table fields empty for a free demo."
          },
          "leftFileUrl": {
            "title": "Left table: file URL",
            "type": "string",
            "description": "Public http(s) link to a CSV, TSV, JSON or NDJSON file for the left table, up to 100 MB (JSON arrays up to 50 MB). Links to internal networks are blocked. Give either this or a left dataset."
          },
          "rightDatasetId": {
            "title": "Right table: Apify dataset",
            "type": "string",
            "description": "Dataset ID or dataset URL for the right table: the lookup table whose columns are added to the left rows. It is held in memory, so use the smaller table here. Give either this or 'Right table: file URL'."
          },
          "rightFileUrl": {
            "title": "Right table: file URL",
            "type": "string",
            "description": "Public http(s) link to a CSV, TSV, JSON or NDJSON file for the right table (up to 1,000,000 rows, 100 MB). Give either this or a right dataset."
          },
          "leftKeys": {
            "title": "Left key columns",
            "type": "array",
            "description": "Column(s) of the left table that identify a row, such as 'email' or 'sku'. With several columns all of them must match (up to 5, matched to the right key columns by position). Nested fields work with dots (address.zip). Required.",
            "items": {
              "type": "string"
            }
          },
          "rightKeys": {
            "title": "Right key columns",
            "type": "array",
            "description": "Column(s) of the right table that hold the key, in the same order as the left key columns. Leave empty if the columns have the same names in both tables. The right key columns are not repeated in the output.",
            "items": {
              "type": "string"
            }
          },
          "joinType": {
            "title": "Join type",
            "enum": [
              "inner",
              "left",
              "right",
              "outer"
            ],
            "type": "string",
            "description": "Which rows to keep. Left (default) is what VLOOKUP does: no left row is lost. Inner keeps only rows with a partner. Right and full outer also output the right rows that no left row matched. Default: left.",
            "default": "left"
          },
          "rightColumns": {
            "title": "Right columns to bring (VLOOKUP)",
            "type": "array",
            "description": "VLOOKUP mode: names of the right-table columns to add to the left rows, in this order. Empty = every right column except the key columns. Listing only what you need also saves memory for a large right table.",
            "items": {
              "type": "string"
            }
          },
          "multipleMatches": {
            "title": "When the right table has the same key several times",
            "enum": [
              "all",
              "first",
              "last"
            ],
            "type": "string",
            "description": "A left row whose key appears in several right rows gives one output row per right row ('all'), which can multiply rows and cost. 'first' or 'last' keeps one right row per key so the left row count stays the same. Default: all.",
            "default": "all"
          },
          "trimKeys": {
            "title": "Trim spaces around keys",
            "type": "boolean",
            "description": "Ignore spaces, tabs and line breaks (also full-width spaces) at the start and end of key values when matching. The output keeps the original values. Default: on.",
            "default": true
          },
          "ignoreCase": {
            "title": "Ignore upper/lower case in keys",
            "type": "boolean",
            "description": "Match 'ANN@Example.com' with 'ann@example.com'. Numbers always match their text form (123, 123.0 and '123' are the same key); leading zeros are kept ('00123' is not 123). Default: off.",
            "default": false
          },
          "rightPrefix": {
            "title": "Prefix for repeated column names",
            "type": "string",
            "description": "When a column brought from the right table has the same name as a left column, it is added as prefix + name (city becomes right_city). If that name is taken too, _2, _3 ... is added. Default: right_.",
            "default": "right_"
          },
          "prefixAllRightColumns": {
            "title": "Prefix every right column",
            "type": "boolean",
            "description": "Add the prefix to all columns brought from the right table, not only the ones whose names repeat. Default: off.",
            "default": false
          },
          "addMatchColumn": {
            "title": "Add a match column",
            "type": "boolean",
            "description": "Add a '_match' column: 'both' when the row found a partner, 'left_only' or 'right_only' when it did not. Handy to list the rows without a partner. Default: off.",
            "default": false
          },
          "maxOutputRows": {
            "title": "Max output rows",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many output rows. A key that repeats in both tables multiplies rows, so this caps run time and cost ($0.35 per 1,000 rows). Rows beyond the limit are not charged. Maximum 1,000,000. Default: 100,000.",
            "default": 100000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}