EDH Deck Forge

EDH Deck Forge · Acciones GPT

Scryfall API

  • GET /cards/namedGet a card by its exact name or a fuzzy match
  • GET /cards/{id}Get a card by its Scryfall ID
  • GET /rulings/{id_or_code}/{number}Get rulings for a specific card
  • GET /cards/autocompleteAutocomplete a card name
  • POST /cards/collectionRetrieve multiple cards by a list of identifiers
  • GET /bulk-dataGet a list of all bulk data types

    Retrieves a list of all available bulk data types from Scryfall.

  • GET /bulk-data/typeGet bulk data by type

    Filters and retrieves bulk data based on the type.

  • GET /catalog/{catalog_type}Get catalog data by type

    Retrieves catalog data from Scryfall based on the specified catalog type.

Esquema original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "Scryfall API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.scryfall.com/",
      "description": "Main Scryfall API server"
    }
  ],
  "paths": {
    "/cards/named": {
      "get": {
        "operationId": "getCardByName",
        "summary": "Get a card by its exact name or a fuzzy match",
        "parameters": [
          {
            "name": "exact",
            "in": "query",
            "required": false,
            "description": "The exact card name to search for",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fuzzy",
            "in": "query",
            "required": false,
            "description": "A fuzzy search string",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with card data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/{id}": {
      "get": {
        "operationId": "getCardById",
        "summary": "Get a card by its Scryfall ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The Scryfall ID of the card",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with card data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "uri": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rulings/{id_or_code}/{number}": {
      "get": {
        "operationId": "getRulings",
        "summary": "Get rulings for a specific card",
        "parameters": [
          {
            "name": "id_or_code",
            "in": "path",
            "required": true,
            "description": "The Scryfall ID or set code of the card",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "description": "The collector number of the card",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with rulings data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "source": {
                            "type": "string"
                          },
                          "published_at": {
                            "type": "string",
                            "format": "date"
                          },
                          "comment": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/autocomplete": {
      "get": {
        "operationId": "autocompleteCardName",
        "summary": "Autocomplete a card name",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The partial card name to autocomplete",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with autocomplete suggestions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "catalog"
                      ]
                    },
                    "total_values": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/cards/collection": {
      "post": {
        "operationId": "getCardCollection",
        "summary": "Retrieve multiple cards by a list of identifiers",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "identifiers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "set": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with card collection data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "uri": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bulk-data": {
      "get": {
        "operationId": "getBulkDataList",
        "summary": "Get a list of all bulk data types",
        "description": "Retrieves a list of all available bulk data types from Scryfall.",
        "responses": {
          "200": {
            "description": "A list of bulk data types.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "updated_at": {
                        "type": "string"
                      },
                      "uri": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bulk-data/type": {
      "get": {
        "operationId": "getBulkDataByType",
        "summary": "Get bulk data by type",
        "description": "Filters and retrieves bulk data based on the type.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The filtered bulk data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "updated_at": {
                        "type": "string"
                      },
                      "download_uri": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/catalog/{catalog_type}": {
      "get": {
        "operationId": "getCatalogByType",
        "summary": "Get catalog data by type",
        "description": "Retrieves catalog data from Scryfall based on the specified catalog type.",
        "parameters": [
          {
            "name": "catalog_type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "card-names",
                "artist-names",
                "word-bank",
                "creature-types",
                "planeswalker-types",
                "land-types",
                "artifact-types",
                "enchantment-types",
                "spell-types",
                "powers",
                "toughnesses",
                "loyalties",
                "watermarks",
                "keyword-abilities",
                "keyword-actions",
                "ability-words",
                "formats"
              ]
            },
            "description": "The type of catalog to retrieve."
          }
        ],
        "responses": {
          "200": {
            "description": "The requested catalog data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "catalog_type": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}