# Enrich Rows From a Lookup CSV or Google Sheet by URL

**Use case:** 

Join a small lead list to a lookup table at a public link: the open ISO country-codes CSV on GitHub here, but any CSV, Excel, JSON file or Google Sheet works the same way. Matches a two-letter country code to the sheet's differently named key column, pulls in the country name, continent, capital, dial code and currency, and downloads CSV and Excel. Swap in your own dataset or sheet link.

## Input

```json
{
  "leftData": [
    {
      "lead": "Silva Ltd",
      "iso2": "BR",
      "email": "ana@example.com"
    },
    {
      "lead": "Okafor & Co",
      "iso2": "ng",
      "email": "ben@example.com"
    },
    {
      "lead": "Lind Studio",
      "iso2": "SE",
      "email": "cara@example.com"
    },
    {
      "lead": "Patel Group",
      "iso2": "IN",
      "email": "dev@example.com"
    },
    {
      "lead": "Kimura Design",
      "iso2": "JP",
      "email": "kimura@example.com"
    },
    {
      "lead": "Atlantis Corp",
      "iso2": "ZZ",
      "email": "nobody@example.com"
    }
  ],
  "rightFileUrl": "https://raw.githubusercontent.com/datasets/country-codes/main/data/country-codes.csv",
  "rightData": [
    {
      "email": "ana@example.com",
      "plan": "Pro",
      "mrr": 49
    },
    {
      "email": "ben@example.com ",
      "plan": "Starter",
      "mrr": 19
    },
    {
      "email": "dev@example.com",
      "plan": "Pro",
      "mrr": 49
    },
    {
      "email": "erin@example.com",
      "plan": "Enterprise",
      "mrr": 499
    }
  ],
  "fileFormat": "auto",
  "leftKeyFields": [
    "iso2"
  ],
  "rightKeyFields": [
    "ISO3166-1-Alpha-2"
  ],
  "joinType": "left",
  "keyMatching": "normalized",
  "rightFields": [
    "official_name_en",
    "Continent",
    "Capital",
    "Dial",
    "ISO4217-currency_name"
  ],
  "onFieldConflict": "prefixRight",
  "rightFieldPrefix": "right_",
  "multipleMatches": "first",
  "includeJoinInfo": true,
  "maxItems": 0,
  "exportFormats": [
    "csv",
    "xlsx"
  ]
}
```

## Output

```json
{
  "_joinStatus": {
    "label": "Join status",
    "format": "text"
  },
  "_matchCount": {
    "label": "Matches",
    "format": "number"
  },
  "email": {
    "label": "Email",
    "format": "text"
  },
  "name": {
    "label": "Name",
    "format": "text"
  },
  "company": {
    "label": "Company",
    "format": "text"
  },
  "plan": {
    "label": "Plan",
    "format": "text"
  },
  "mrr": {
    "label": "MRR",
    "format": "number"
  }
}
```

## About this Actor

This example demonstrates how to use [Dataset Join & Merge (VLOOKUP for Datasets)](https://apify.com/nerolabs/dataset-join-merge.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/nerolabs/dataset-join-merge.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
This Task's input is already configured above — use it as-is rather than inventing a new one.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/nerolabs/dataset-join-merge.md

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).
