{
  "openapi": "3.0.1",
  "info": {
    "title": "Magic The Gathering Card and Price Scraper",
    "description": "Search Magic The Gathering cards by name, set, color, type, rarity, format legality or price. Get USD, EUR, foil and MTGO prices, oracle text, legal formats, EDHREC rank, images and store links. Value a card list in one run, or list all sets and card rulings. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "lQrsiHeiGD0b558OS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~scryfall-mtg-cards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-scryfall-mtg-cards-scraper",
        "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/parselab~scryfall-mtg-cards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-scryfall-mtg-cards-scraper",
        "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/parselab~scryfall-mtg-cards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-scryfall-mtg-cards-scraper",
        "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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "cards",
              "collection",
              "sets",
              "rulings"
            ],
            "type": "string",
            "description": "Cards searches the full card database with filters. Collection looks up a list of card names and returns prices and details for each. Sets lists every set with release dates and card counts. Rulings returns the official rulings of the cards you name.",
            "default": "cards"
          },
          "query": {
            "title": "Search text",
            "type": "string",
            "description": "Optional advanced search in Scryfall syntax, for example o:\"draw a card\" t:instant or name:dragon. It is combined with the filters below."
          },
          "cardNames": {
            "title": "Card names",
            "type": "array",
            "description": "For collection and rulings modes. One card per line. Add a set code after a pipe to pick a printing, for example Counterspell|mh2.",
            "items": {
              "type": "string"
            }
          },
          "allPrintings": {
            "title": "All printings of each card",
            "type": "boolean",
            "description": "In collection mode, return every printing of each named card with its price instead of one default printing. Sorted with the highest price first.",
            "default": false
          },
          "sets": {
            "title": "Sets",
            "type": "array",
            "description": "Set codes such as mh3, blb or lea.",
            "items": {
              "type": "string"
            }
          },
          "colors": {
            "title": "Colors",
            "type": "array",
            "description": "Colors using the letters w, u, b, r, g, or c for colorless.",
            "items": {
              "type": "string"
            }
          },
          "colorMatch": {
            "title": "Color match",
            "enum": [
              "contains",
              "exact",
              "atMost"
            ],
            "type": "string",
            "description": "Contains includes cards with at least these colors. Exact returns only these colors. At most returns cards that use only some of these colors.",
            "default": "contains"
          },
          "types": {
            "title": "Card types",
            "type": "array",
            "description": "Types or subtypes such as creature, instant, artifact, legendary or dragon.",
            "items": {
              "type": "string"
            }
          },
          "rarities": {
            "title": "Rarities",
            "type": "array",
            "description": "common, uncommon, rare, mythic, special or bonus.",
            "items": {
              "type": "string"
            }
          },
          "legalIn": {
            "title": "Legal in formats",
            "type": "array",
            "description": "Formats where the card is legal, for example standard, modern, commander, pioneer, pauper or legacy.",
            "items": {
              "type": "string"
            }
          },
          "setTypes": {
            "title": "Set types",
            "type": "array",
            "description": "Set kinds such as expansion, core, masters, commander, draft_innovation or promo. Also filters the sets list.",
            "items": {
              "type": "string"
            }
          },
          "minPriceUsd": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Lowest non-foil price in US dollars."
          },
          "maxPriceUsd": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Highest non-foil price in US dollars."
          },
          "unique": {
            "title": "Duplicates",
            "enum": [
              "cards",
              "art",
              "prints"
            ],
            "type": "string",
            "description": "Cards returns one row per card name. Art returns one per artwork. Prints returns every printing.",
            "default": "cards"
          },
          "order": {
            "title": "Sort by",
            "enum": [
              "name",
              "released",
              "set",
              "rarity",
              "color",
              "usd",
              "eur",
              "tix",
              "cmc",
              "power",
              "toughness",
              "edhrec",
              "artist"
            ],
            "type": "string",
            "description": "How to sort the cards.",
            "default": "name"
          },
          "direction": {
            "title": "Sort direction",
            "enum": [
              "auto",
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending, descending or the natural direction for the chosen sort.",
            "default": "auto"
          },
          "includeExtras": {
            "title": "Include extras",
            "type": "boolean",
            "description": "Include tokens, emblems and other extra cards in the search.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}