# EchoMTG Card and Price Scraper (`daftvader/echomtg-card-and-price-scr-1bd81cf1-ca1e-5776-b55d-c0ed34c9e1be`) Actor

Collect normalized Magic: The Gathering card details and EchoMTG price fields by set.

- **URL**: https://apify.com/daftvader/echomtg-card-and-price-scr-1bd81cf1-ca1e-5776-b55d-c0ed34c9e1be.md
- **Developed by:** [Sam Towers](https://apify.com/daftvader) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.15 / 1,000 apify-default-dataset-items

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

## EchoMTG Card and Price Scraper

Collect normalized Magic: The Gathering card details and EchoMTG price fields by set. Use the resulting dataset to compare a set's cards, feed collection or inventory workflows, or export card identities, images, and price data for analysis.

### What you get

Each card is saved as a separate item in the run's default dataset. Results include:

- card and set identity, collector number, rarity, and TCGplayer identity;
- EchoMTG market, mid, and foil price fields;
- card image and EchoMTG source links; and
- card text when `includeCardText` is enabled.

Missing upstream values are returned as `null`. Price values preserve EchoMTG's representation and currency semantics.

### Use cases

- Export the cards and price fields for selected MTG sets.
- Build set-level price comparisons or inventory inputs.
- Collect a bounded sample from each set for data pipelines and testing.
- Enumerate the public EchoMTG set catalog and process sets incrementally.

### Input

Choose one or more set codes, or enable all-set collection:

```json
{
  "setCodes": ["MH2"],
  "allSets": false,
  "maxCardsPerSet": 100,
  "includeCardText": false,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

- `setCodes`: EchoMTG set codes, normalized to uppercase and deduplicated.
- `allSets`: also discover sets from EchoMTG's public full-set listing.
- `maxCardsPerSet`: maximum results saved for each set, from 1 to 5,000.
- `includeCardText`: include the optional `cardText` output field.
- `proxyConfiguration`: optional Apify Proxy or custom proxy configuration.

At least one set code or `allSets: true` is required. Combining both is supported; duplicate set codes are processed once.

### Example result

```json
{
  "echoId": 12345,
  "name": "Example Card",
  "setCode": "MH2",
  "setName": "Modern Horizons 2",
  "collectorNumber": "1",
  "rarity": "rare",
  "tcgplayerId": 234567,
  "priceMarket": "1.25",
  "priceMid": "1.40",
  "priceFoil": "2.10",
  "imageUrl": "https://example.com/card.jpg",
  "sourceUrl": "https://www.echomtg.com/mtg/items/12345/"
}
```

### Behavior and limits

The Actor requests public EchoMTG data in pages of at most 250 cards, retries transient failures up to three times, removes duplicate cards within each set, and processes sets sequentially. `maxCardsPerSet` applies independently to every set, so all-catalog runs can produce up to that many items per discovered set.

Each persisted default-dataset item is a billable result under pay-per-event pricing. Items saved before a later failure remain available and chargeable; items that were not saved are not charged. The Actor-start event is charged automatically by Apify according to the run's allocated memory.

# Actor input Schema

## `setCodes` (type: `array`):

EchoMTG set codes such as MH2. Codes are normalized to uppercase.

## `allSets` (type: `boolean`):

Discover and collect every set in EchoMTG's public full-set listing.

## `maxCardsPerSet` (type: `integer`):

Maximum number of card results saved independently for each set.

## `includeCardText` (type: `boolean`):

Request and include card rules text when EchoMTG provides it.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy or custom proxy configuration.

## Actor input object example

```json
{
  "setCodes": [
    "MH2"
  ],
  "allSets": false,
  "maxCardsPerSet": 2,
  "includeCardText": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "setCodes": [
        "MH2"
    ],
    "allSets": false,
    "maxCardsPerSet": 2,
    "includeCardText": false,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("daftvader/echomtg-card-and-price-scr-1bd81cf1-ca1e-5776-b55d-c0ed34c9e1be").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 = {
    "setCodes": ["MH2"],
    "allSets": False,
    "maxCardsPerSet": 2,
    "includeCardText": False,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("daftvader/echomtg-card-and-price-scr-1bd81cf1-ca1e-5776-b55d-c0ed34c9e1be").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 '{
  "setCodes": [
    "MH2"
  ],
  "allSets": false,
  "maxCardsPerSet": 2,
  "includeCardText": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call daftvader/echomtg-card-and-price-scr-1bd81cf1-ca1e-5776-b55d-c0ed34c9e1be --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,daftvader/echomtg-card-and-price-scr-1bd81cf1-ca1e-5776-b55d-c0ed34c9e1be"
        }
    }
}
```

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/73ZzvDrpJJwlUFdnr/builds/uEXBux6Y2u342ip7c/openapi.json
