VLOOKUP for Datasets: Join & Match Two Tables avatar

VLOOKUP for Datasets: Join & Match Two Tables

Pricing

from $1.44 / 1,000 row joineds

Go to Apify Store
VLOOKUP for Datasets: Join & Match Two Tables

VLOOKUP for Datasets: Join & Match Two Tables

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.

Pricing

from $1.44 / 1,000 row joineds

Rating

0.0

(0)

Developer

Data Done Right

Data Done Right

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

22 days ago

Last modified

Features

Limited permissions

Share

VLOOKUP for datasets: this Actor joins two tables (Apify datasets, CSV, JSON or XLSX files, or pasted rows) on one or more key columns, and cleans the keys first so the usual #N/A causes (trailing spaces, upper/lower case, 001 vs 1) simply match.

What you get:

  • A joined table in the dataset, in the order of your left table, with an optional _match_status column (matched, fuzzy, unmatched, right_only).
  • A match report in the key-value store: matched and unmatched counts, the list of keys that found no match, and a hint when a wider cleaning step would have matched them.
  • Optional CSV, XLSX or JSON files with download links.

What it does not do: it is not a database. The right (lookup) table is loaded fully into memory. It does not call an LLM, it does not scrape anything, and fuzzy matches are guesses that you should review. Only left and right tables you give it are read.

Join types: left (the VLOOKUP default), inner, right, full outer, anti-join (left rows with no match) and semi-join (left rows that have a match).

How to do a VLOOKUP on two datasets

  1. Put your table in Left table (a dataset, a file URL, or pasted rows). This is the table you keep.
  2. Put the lookup table in Right table.
  3. Set Left key column(s) (for example email). If the right table names it differently, set Right key column(s) too.
  4. Leave Join type on left. Run. Each left row gets the right columns, or empty values and _match_status = unmatched.

How to join two datasets on a key

Use the same steps and pick the join type: inner drops rows without a match, full keeps everything from both tables. Composite keys work: ["first_name", "last_name"] matches on both columns, by position with the right keys.

How to match two lists and find what is missing

Choose anti to get the left rows that are NOT in the right table (new leads not yet in the CRM), or semi for the left rows that are. Both return only left columns.

How to left join CSV files

Set Left table: file URL and Right table: file URL to direct links to .csv, .tsv, .json, .jsonl or .xlsx files (Excel: pick a sheet in the sheet field; old .xls is not supported, save as .xlsx). Add "exports": ["csv"] to get the result as a CSV link.

Why my VLOOKUP returned #N/A

Excel compares keys exactly, character by character. These are the usual causes, and what this Actor does about each:

CauseExampleHandled by
Trailing or double spaces, non-breaking spaces"ACME " vs "ACME"Trim spaces (on by default)
Different caseANA@X.COM vs ana@x.comIgnore case (on by default)
Number stored as text, or leading zeros001 vs 1, 4.0 vs 4Numbers and IDs as numbers (on by default)
AccentsCafé vs CafeIgnore accents (off by default)
PunctuationAcme, Inc. vs Acme IncIgnore punctuation (off by default)
Spaces inside codesAB 123 vs AB123Remove all spaces (off by default)
Key is not in the lookup tablegenuinely missingReported in UNMATCHED_KEYS
TyposMicrosft vs MicrosoftOptional fuzzy matching
Duplicate keys in the lookup tabletwo rows for one keyVLOOKUP silently takes the first; choose first, last, all or error

Your output keeps the original values; normalising only affects the comparison. Caveat: the numeric step treats 00123 and 123 as the same key. Turn it off, or set per-key steps with keyNormalizers, if leading zeros are meaningful in your IDs. Rows whose key cell is empty never match.

Input example (copy and paste)

{
"leftItems": [
{"order_id": 1001, "email": "Ana.Lopez@Example.com ", "amount": 120.5},
{"order_id": 1002, "email": " ben@example.com", "amount": 75},
{"order_id": 1003, "email": "CARLA@EXAMPLE.COM", "amount": 42.99},
{"order_id": 1004, "email": "dev@example.com", "amount": 300},
{"order_id": 1005, "email": "zoe@other.org", "amount": 18}
],
"rightItems": [
{"email": "ana.lopez@example.com", "name": "Ana Lopez", "plan": "pro"},
{"email": "ben@example.com", "name": "Ben Jones", "plan": "free"},
{"email": "carla@example.com", "name": "Carla Diaz", "plan": "pro"},
{"email": "dev@example.com ", "name": "Dev Patel", "plan": "team"},
{"email": "eve@example.com", "name": "Eve Chen", "plan": "free"}
],
"leftKeys": ["email"]
}

Output example (from a real local run of the input above)

First row of the dataset:

{"order_id": 1001, "email": "Ana.Lopez@Example.com ", "amount": 120.5, "name": "Ana Lopez", "plan": "pro", "_match_status": "matched"}

The last row (zoe@other.org is not in the CRM) has "name": null, "plan": null, "_match_status": "unmatched". Four of five rows matched. The MATCH_REPORT record shows matchedLeftRows: 4, unmatchedLeftRows: 1, unmatchedRightRows: 1 and the unmatched key list.

Three worked examples (real local runs)

1. VLOOKUP prices by SKU (001 vs 1)

Left sales lines have SKUs "1", " 002 ", 3, "4.0", "7"; the price list has 001 to 004. Input: leftKeys: ["sku"], rightColumns: ["product", "price"].

{"line": 1, "sku": "1", "qty": 2, "product": "Widget", "price": 9.5, "_match_status": "matched"}
{"line": 2, "sku": " 002 ", "qty": 1, "product": "Gadget", "price": 12, "_match_status": "matched"}
{"line": 3, "sku": 3, "qty": 5, "product": "Gizmo", "price": 3.25, "_match_status": "matched"}
{"line": 4, "sku": "4.0", "qty": 1, "product": "Doohickey", "price": 40, "_match_status": "matched"}
{"line": 5, "sku": "7", "qty": 9, "product": null, "price": null, "_match_status": "unmatched"}

Four matched, one unmatched (SKU 7 is really not in the list).

2. Leads that are not in your CRM (anti-join)

Input: leftKeys: ["company"], joinType: "anti", normAccents: true, normPunctuation: true. Café Noir, Inc., ACME Corp. and Beta Labs match the CRM entries cafe noir inc, Acme Corp and Beta Labs, so only two leads are returned:

{"company": "Nuevo Sol S.A.", "contact": "ana@nuevosol.example", "_match_status": "unmatched"}
{"company": "Gamma GmbH", "contact": "jo@gamma.example", "_match_status": "unmatched"}

3. Reconcile invoices with a vendor list (full join with fuzzy matching)

Input: leftKeys: ["supplier"], rightKeys: ["vendor"], joinType: "full", fuzzyMatch: true, fuzzyThreshold: 0.88.

{"invoice": "INV-1", "supplier": "Microsft Corporation", "total": 1200, "vendor_id": "V100", "approved": true, "_match_status": "fuzzy", "_fuzzy_score": 0.9305}
{"invoice": "INV-2", "supplier": "Amazon Web Servces", "total": 560.4, "vendor_id": "V200", "approved": true, "_match_status": "fuzzy", "_fuzzy_score": 0.9895}
{"invoice": "INV-3", "supplier": "Googel LLC", "total": 89, "vendor_id": "V300", "approved": true, "_match_status": "fuzzy", "_fuzzy_score": 0.98}
{"invoice": "INV-4", "supplier": "Stripe Inc", "total": 310, "vendor_id": "V400", "approved": false, "_match_status": "matched", "_fuzzy_score": null}
{"invoice": "INV-5", "supplier": "Zenith Tools", "total": 45, "vendor_id": null, "approved": null, "_match_status": "unmatched", "_fuzzy_score": null}
{"invoice": null, "supplier": "Acme Holdings", "total": null, "vendor_id": "V500", "approved": true, "_match_status": "right_only", "_fuzzy_score": null}

Stripe Inc matched exactly; three rows matched by similarity and carry a score. Review those before trusting them.

Inputs

FieldDefaultWhat it does
leftDatasetId, leftUrl, leftItems, leftText, leftSheetnoneLeft table sources (combined in this order if you give several). leftSheet picks an Excel sheet.
rightDatasetId, rightUrl, rightItems, rightText, rightSheetnoneRight (lookup) table sources.
leftKeys (required)noneKey column(s) of the left table. Dotted paths work.
rightKeyssame as leftKey column(s) of the right table, matched by position.
joinTypeleftleft, inner, right, full, anti, semi.
duplicateMatchesfirstWhen a right key repeats: first, last, all (one output row per match), error (stop before charging).
normTrim / normCase / normNumerictrueKey cleaning on by default.
normAccents / normPunctuation / normRemoveSpacesfalseExtra key cleaning.
keyNormalizersnonePer-key override, e.g. {"sku": ["trim","case","numeric"]}.
rightColumnsall but keysRight columns to bring over.
rightPrefix, rightSuffixemptyAdded to every right column name.
collisionSuffix_rightAdded when a right column name already exists on the left.
keepRightKeysfalseAlso output the right key columns.
addMatchStatustrueAdds _match_status.
fuzzyMatchfalseFuzzy pass for unmatched rows.
fuzzyThreshold0.88Minimum similarity, 0.5 to 1.
fuzzyMethodjaro-winklerOr difflib.
fuzzyMaxComparisons4,000,000Work limit; above it fuzzy is skipped and the report says so.
exportsnoneAny of csv, xlsx, json, jsonl.
exportNamejoinedBase file name.
escapeFormulastrueNeutralises =/+/-/@ cells in CSV exports.
maxLeftRows100,000Cap on left rows read (and on cost).
maxRightRows500,000Cap on right rows loaded.
maxOutputRows1,000,000Cap on rows written.
maxFileSizeMb50Largest downloaded file.
csvInferTypestrueCSV 12 becomes a number; 007 stays text.

Fuzzy matching: how it works

Exact matching (with your cleaning steps) always runs first. Only the left rows that found no match are then compared with right rows that nobody matched, using Jaro-Winkler (default) or difflib. Matches are one-to-one and best score first. With several key columns, every column must reach the threshold. Fuzzy matches are labelled fuzzy with a _fuzzy_score. It is pure Python, so the work is limited: roughly 2 million comparisons take about 12 seconds (measured locally on short random strings). Fuzzy mode keeps the left table in memory.

The match report

Written to the key-value store after each run:

  • MATCH_REPORT: counts (left rows, matched exact and fuzzy, unmatched left, unmatched right), duplicate right keys, billing counts, per-source status and errors, warnings, and the first 100 unmatched keys. Each hint is one of: wouldMatch (this right key matches if you turn on the listed cleaning steps), or similarRightKey (a similar key, 0.9+ similarity, only a hint).
  • UNMATCHED_KEYS: up to 10,000 unmatched left keys and 10,000 right keys that nobody used.

How much does it cost

Pay per event: $0.0018 per left row processed (row-joined, $1.80 per 1,000), plus $0.002 per fuzzy match (fuzzy-row-matched, only when fuzzy matching is on and finds one), plus $0.004 per export file (export-file). The right table is free to load. Rows are charged on the left table whether or not they match, and duplicateMatches = all does not raise the price. In right and full joins, each right-only row written is also charged as a row-joined event, because it is an output row.

JobCost
1,000 left rows$1.80
10,000 left rows + CSV export$18.004
100,000 left rows, 5,000 fuzzy matches, CSV and XLSX$180 + $10 + $0.008 = $190.008

The input fields maxLeftRows and your run's spending limit cap the cost. If the spending limit is reached the run stops with the rows done so far.

Use cases

  • Add prices, names or owners from a lookup sheet to an export, like VLOOKUP, without #N/A.
  • Find leads, products or contacts that are not yet in another list (anti-join).
  • Reconcile invoices, payments and a vendor master, with a review score on fuzzy matches.
  • Join the datasets of two scraper runs on a URL or ID column.
  • Check which keys fail to match and why, using the match report.

FAQ

How is this different from Merge Datasets? Merge stacks tables on top of each other. This joins them side by side on a key.

Does it change my key values? No. Cleaning is only used for comparing. Output keeps your original text.

What if the lookup table has the same key twice? first (default) copies VLOOKUP, last takes the last, all returns one row per match, error stops before any charge and lists the duplicate keys.

Is fuzzy matching accurate? It is a similarity guess. Short names and keys that share long prefixes (for example email addresses on one domain) can score high without being the same. Raise the threshold and review _fuzzy_score.

How big can the tables be? The right table is held in memory (default cap 500,000 rows; memory use was not load-tested beyond 100,000 rows). The left table streams unless fuzzy matching is on. Excel files are limited to the first sheet you pick; .xls is not supported. Google Sheets must be a published CSV link.

What does it not do? No many-to-many aggregation, no computed columns, no SQL, no approximate numeric ranges (the Excel TRUE mode of VLOOKUP), and it cannot read private files that need a login.

Use with the Apify API, MCP, n8n or Make

Python:

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("<username>/dataset-join-vlookup").call(run_input={
"leftDatasetId": "LEFT_DATASET_ID", "rightUrl": "https://example.com/prices.csv",
"leftKeys": ["sku"], "joinType": "left", "exports": ["csv"]})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row)
report = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("MATCH_REPORT")["value"]

JavaScript:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('<username>/dataset-join-vlookup').call({
leftItems: [{ sku: '1' }], rightItems: [{ sku: '001', price: 9.5 }], leftKeys: ['sku'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();

The input is small and every field is described, so it also works as an MCP tool call from an agent, and in n8n or Make through the Apify nodes (run the Actor, then read the dataset).

  • Merge Datasets & Dedupe: Combine, Filter, Export CSV & Excel: stack several datasets or files into one.
  • Remove Duplicates: Deduplicate Datasets, CSV & Excel: clean a table before joining it.
  • Excel to JSON Converter: XLSX, XLS & CSV to JSON API: turn spreadsheets into rows first.