# CSV / Excel / Google Sheets URL to Dataset (`shawndunn/csv-excel-url-to-dataset`) Actor

Load public CSV, TSV, XLSX or published Google Sheets into an Apify dataset with auto-detected delimiter, every sheet, and row numbers. Glue for automations. Extracts fields: sourceUrl, rowNumber, FIFA, Dial, ISO3166-1-Alpha-3, MARC, is_independent, ISO3166-1-numeric, GAUL, FIPS, WMO.

- **URL**: https://apify.com/shawndunn/csv-excel-url-to-dataset.md
- **Developed by:** [CarrierDaily](https://apify.com/shawndunn) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.10 / 1,000 rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## CSV / Excel / Google Sheets URL to Dataset

Load public CSV, TSV, XLSX or published Google Sheets into an Apify dataset with auto-detected delimiter, every sheet, and row numbers. Glue for automations.

### Why this actor

- Handles XLSX multi-sheet and Sheets share links; per-row pricing at a fraction of a cent.
- Pay only for results: **$0.10 per 1,000 rows**, no start fee, failed lookups are free.
- Robust: automatic retries with exponential backoff, respects `Retry-After`, per-item error rows instead of crashed runs.
- Clean, flat JSON/CSV/Excel output ready for Google Sheets, Make, Zapier, n8n, Clay, or the Apify API.

### Use cases

- Import open data into pipelines
- Schedule refreshes of public spreadsheets
- Feed Make/Zapier/n8n

### How to use CSV / Excel / Google Sheets URL to Dataset

1. Configure `urls` in the Input tab (or leave the prefilled sample values to test immediately).
2. Optionally set `maxItems` to cap the number of results and control spend.
3. Click **Start** and export structured results as JSON, CSV, Excel, or connect directly via API / MCP / n8n / Make.

### Input

| Field | Type | Description |
|---|---|---|
| `urls` | array | CSV, TSV, XLSX or Google Sheets links (public). |
| `maxItems` | integer | 0 = no limit. Caps cost. |

Example input:

```json
{
  "urls": [
    "https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"
  ]
}
```

### Output

Each dataset item looks like this (real sample from a test run, long fields trimmed):

```json
{
  "sourceUrl": "https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv",
  "rowNumber": 2,
  "FIFA": "AFG",
  "Dial": "93",
  "ISO3166-1-Alpha-3": "AFG",
  "MARC": "af",
  "is_independent": "Yes",
  "ISO3166-1-numeric": "4",
  "GAUL": "1",
  "FIPS": "AF",
  "WMO": "AF",
  "ISO3166-1-Alpha-2": "AF",
  "ITU": "AFG",
  "IOC": "AFG",
  "DS": "AFG",
  "UNTERM Spanish Formal": "la Rep\u00fablica Isl\u00e1mica del Afganist\u00e1n",
  "Global Code": "1",
  "Intermediate Region Code": "",
  "official_name_fr": "Afghanistan",
  "UNTERM French Short": "Afghanistan (l')",
  "ISO4217-currency_name": "Afghani",
  "UNTERM Russian Formal": "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0430\u044f \u0420\u0435\u0441\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u0410\u0444\u0433\u0430\u043d\u0438\u0441\u0442\u0430\u043d",
  "UNTERM English Short": "Afghanistan",
  "ISO4217-currency_alphabetic_code": "AFN",
  "Small Island Developing States (SIDS)": "",
  "UNTERM Spanish Short": "Afganist\u00e1n (el)",
  "ISO4217-currency_numeric_code": "971",
  "UNTERM Chinese Formal": "\u963f\u5bcc\u6c57\u4f0a\u65af\u5170\u5171\u548c\u56fd",
  "UNTERM French Formal": "la R\u00e9publique islamique d'Afghanistan",
  "UNTERM Russian Short": "\u0410\u0444\u0433\u0430\u043d\u0438\u0441\u0442\u0430\u043d",
  "M49": "4",
  "Sub-region Code": "34",
  "Region Code": "142",
  "official_name_ar": "\u0623\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",
  "ISO4217-currency_minor_unit": "2",
  "UNTERM Arabic Formal": "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0623\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064a\u0629",
  "UNTERM Chinese Short": "\u963f\u5bcc\u6c57",
  "Land Locked Developing Countries (LLDC)": "x",
  "Intermediate Region Name": "",
  "official_name_es": "Afganist\u00e1n",
  "UNTERM English Formal": "the Islamic Republic of Afghanistan",
  "official_name_cn": "\u963f\u5bcc\u6c57",
  "official_name_en": "Afghanistan",
  "ISO4217-currency_country_name": "AFGHANISTAN",
  "Least Developed Countries (LDC)": "x",
  "Region Name": "Asia",
  "UNTERM Arabic Short": "\u0623\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",
  "Sub-region Name": "Southern Asia",
  "official_name_ru": "\u0410\u0444\u0433\u0430\u043d\u0438\u0441\u0442\u0430\u043d",
  "Global Name": "World",
  "Capital": "Kabul",
  "Continent": "AS",
  "TLD": ".af",
  "Languages": "fa-AF,ps,uz-AF,tk",
  "Geoname ID": "1149361",
  "CLDR display name": "Afghanistan",
  "EDGAR": "B2",
  "wikidata_id": "https://www.wikidata.org/wiki/Q889"
}
```

Rows that could not be processed contain an `error` field and are **not charged**.

### Extracted output fields

Every dataset row includes structured fields ready for spreadsheets, CRMs, and AI pipelines:

- **Fields**: `sourceUrl`, `rowNumber`, `FIFA`, `Dial`, `ISO3166-1-Alpha-3`, `MARC`, `is_independent`, `ISO3166-1-numeric`, `GAUL`, `FIPS`, `WMO`, `ISO3166-1-Alpha-2`, `ITU`, `IOC`, `DS`, `UNTERM Spanish Formal`, `Global Code`, `Intermediate Region Code`, `official_name_fr`, `UNTERM French Short`, `ISO4217-currency_name`, `UNTERM Russian Formal`, `UNTERM English Short`, `ISO4217-currency_alphabetic_code`, `Small Island Developing States (SIDS)`, `UNTERM Spanish Short`, `ISO4217-currency_numeric_code`, `UNTERM Chinese Formal`, `UNTERM French Formal`, `UNTERM Russian Short`, `M49`, `Sub-region Code`, `Region Code`, `official_name_ar`, `ISO4217-currency_minor_unit`, `UNTERM Arabic Formal`, `UNTERM Chinese Short`, `Land Locked Developing Countries (LLDC)`, `Intermediate Region Name`, `official_name_es`, `UNTERM English Formal`, `official_name_cn`, `official_name_en`, `ISO4217-currency_country_name`, `Least Developed Countries (LDC)`, `Region Name`, `UNTERM Arabic Short`, `Sub-region Name`, `official_name_ru`, `Global Name`, `Capital`, `Continent`, `TLD`, `Languages`, `Geoname ID`, `CLDR display name`, `EDGAR`, `wikidata_id`

### Comparison: CSV / Excel / Google Sheets URL to Dataset vs alternatives

| Feature | This Actor (`shawndunn/csv-excel-url-to-dataset`) | Typical alternatives |
|---|---|---|
| Pricing model | **$0.10 / 1,000 results**, $0.00 start fee | $20–$49/mo subscription or per-run start fees |
| Failed / error lookups | **$0.00 (never charged)** | Often billed by compute time even on failures |
| API keys / proxies required | **None** (works out of the box) | Often requires paid third-party keys or residential proxies |
| AI Agent & MCP ready | **Yes** (`mcp.apify.com` compatible, optional defaults) | Strict required schemas that reject agent calls |

### Pricing

Pay-per-event: **$0.0001** per row (= $0.10 / 1,000). Use **Max results** to cap spend. Apify's free plan credit covers thousands of results per month.

### Integrations & API

Run on a schedule in Apify Console, call via the Apify API / Python & JS clients, or connect to Make, Zapier, n8n, Google Sheets, Slack and webhooks. Works as a tool for AI agents via Apify MCP.

### Use with AI agents (MCP)

CSV / Excel / Google Sheets URL to Dataset is configured for zero-config AI agent tool use via the Apify MCP Server (no required-field blocking on defaulted inputs).

Streamable HTTP endpoint:

```text
https://mcp.apify.com/?tools=shawndunn/csv-excel-url-to-dataset
```

Claude Desktop / Cursor / Windsurf `mcpServers` config:

```json
{
  "mcpServers": {
    "apify-csv-excel-url-to-dataset": {
      "url": "https://mcp.apify.com/?tools=shawndunn/csv-excel-url-to-dataset",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Direct synchronous API call:

```text
POST https://api.apify.com/v2/acts/shawndunn~csv-excel-url-to-dataset/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
```

### FAQ

**Is this an official tool?** No. It is an independent actor and is not affiliated with, sponsored or endorsed by the data source or any trademark owner named here.

**Is it legal?** The actor only reads publicly available data from public endpoints, without logins, and does not bypass paywalls or access controls. You are responsible for using the data in line with applicable laws (e.g. GDPR) and the source sites' terms.

**Something broke?** Open an issue in the Issues tab; we typically respond within 24 hours and ship fixes fast.

### More tools by shawndunn

- [Website Tech Stack Detector](https://apify.com/shawndunn/website-tech-stack-detector) — Find what CMS, ecommerce platform, analytics, pixels and frameworks any website uses.
- [Domain Intelligence Checker](https://apify.com/shawndunn/domain-intelligence-whois-dns-ssl) — Bulk domain lookup: WHOIS/RDAP registrar and expiry dates, DNS, MX email provider, SPF, DMARC and SSL certificate expiry.
- [Bulk PageSpeed Insights & Core Web Vitals Checker (Lighthouse)](https://apify.com/shawndunn/bulk-pagespeed-core-web-vitals) — Audit hundreds of URLs with Google PageSpeed Insights: performance, SEO, accessibility and best-practices scores, LCP, CLS, TBT ($3/1k, no start fee).
- [Sitemap URL Extractor](https://apify.com/shawndunn/sitemap-url-extractor) — Extract every URL from any website's XML sitemaps: auto-discovery via robots.
- [Broken Link Checker & Bulk URL Status Checker](https://apify.com/shawndunn/broken-link-checker) — Crawl a website and test every internal and external link, or bulk-check a list of URLs (url, statusCode, ok, finalUrl) ($1/1k, no start fee).

# Actor input Schema

## `urls` (type: `array`):

CSV, TSV, XLSX or Google Sheets links (public).

## `maxItems` (type: `integer`):

0 = no limit. Caps cost.

## Actor input object example

```json
{
  "urls": [
    "https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"
  ],
  "maxItems": 0
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("shawndunn/csv-excel-url-to-dataset").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"] }

# Run the Actor and wait for it to finish
run = client.actor("shawndunn/csv-excel-url-to-dataset").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"
  ]
}' |
apify call shawndunn/csv-excel-url-to-dataset --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shawndunn/csv-excel-url-to-dataset"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/mXgrE5ym0KiugD6rP/builds/GCrd5Tng2HMeKOusc/openapi.json
