{
  "openapi": "3.0.1",
  "info": {
    "title": "GemRate Card Grading Population & Sales Data Scraper",
    "description": "Card-grading population data from GemRate — PSA, Beckett, SGC, CGC — plus eBay sales trends. Search cards and sets, pull set/player breakdowns, top cards, population trends, historical replays, and dashboard data. Pick an operation, get structured JSON. Read-only.",
    "version": "0.1",
    "x-build-id": "2k6uw4AUUyL7FbEPz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amrameng~gemrate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amrameng-gemrate-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/amrameng~gemrate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-amrameng-gemrate-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/amrameng~gemrate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-amrameng-gemrate-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",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "search",
              "search-sets",
              "card-details",
              "set-details",
              "items",
              "top-cards",
              "player",
              "trend",
              "set-trend",
              "replay",
              "dashboard",
              "iconic-tracker",
              "universal-pop-report"
            ],
            "type": "string",
            "description": "What to fetch. Each operation uses only a few of the parameters below (see the field guide under \"Parameters\"). The Output tab has a matching table view per operation — pick the view named after your operation.",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Used by **Search cards** and **Search sets**. e.g. \"Michael Jordan\", \"Charizard\", or \"Topps Chrome 2024\". Returns up to 10 matches."
          },
          "gemrateId": {
            "title": "GemRate ID",
            "type": "string",
            "description": "Used by **Card grading details**. The card ID returned in search results (the gemrate_id field)."
          },
          "grader": {
            "title": "Grader",
            "enum": [
              "psa",
              "bgs",
              "sgc",
              "cgc"
            ],
            "type": "string",
            "description": "Grading company. Used by all set/player/trend/replay/top-card operations.",
            "default": "psa"
          },
          "category": {
            "title": "Category",
            "enum": [
              "basketball-cards",
              "baseball-cards",
              "boxing-wrestling-cards-mma",
              "football-cards",
              "golf-cards",
              "hockey-cards",
              "soccer-cards",
              "tcg-cards",
              "non-sport-cards",
              "multi-sport-cards",
              "misc-cards",
              "packs",
              "tickets"
            ],
            "type": "string",
            "description": "Card category. Used by set-details, items, top-cards, player, trend, set-trend, and replay."
          },
          "year": {
            "title": "Year",
            "type": "string",
            "description": "Set year, e.g. \"2024\". Used by set-details, items, trend, set-trend, and replay."
          },
          "setName": {
            "title": "Set name",
            "type": "string",
            "description": "Set name, e.g. \"Topps Chrome\" or \"Prismatic Evolutions\". Used by items, trend, set-trend, and replay. Match the name as it appears on GemRate."
          },
          "playerName": {
            "title": "Player / subject name",
            "type": "string",
            "description": "Used by **Player cards** (the player/subject to list) and by **Card population trend** (the card's name, e.g. \"Charizard\")."
          },
          "parallel": {
            "title": "Parallel (trend)",
            "type": "string",
            "description": "Parallel for **Card population trend**, e.g. \"Base\", \"Holo\", \"Silver Prizm\". For cards that have parallels this must match the card's parallel exactly, or the trend returns no rows. Look it up with the *Cards in a set* operation first."
          },
          "cardNumber": {
            "title": "Card number (trend, optional)",
            "type": "string",
            "description": "Optional card number for **Card population trend** to disambiguate cards with the same name."
          },
          "count": {
            "title": "Top cards count",
            "enum": [
              "100",
              "500",
              "1000"
            ],
            "type": "string",
            "description": "How many cards **Top graded cards** returns: 100, 500, or 1000.",
            "default": "100"
          },
          "date": {
            "title": "Replay date (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Used by **Historical replay** — view a set's grading data as it stood on this date."
          },
          "dashboardDataset": {
            "title": "Dashboard dataset",
            "enum": [
              "grading_data",
              "category_df",
              "player_data",
              "set_data",
              "card_data"
            ],
            "type": "string",
            "description": "Used by **Dashboard datasets**. Leave blank for the main grading-trend table (grading_data), or pick another. Either way, the full payload (all tables) is also saved to the key-value store under DASHBOARD."
          },
          "search": {
            "title": "Filter: contains text",
            "type": "string",
            "description": "Post-filter: keep only rows whose text fields contain this string (case-insensitive). Applies to the list-style operations."
          },
          "limit": {
            "title": "Limit results",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of rows returned after filtering and sorting. 0 = no limit.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "GemRate is behind Cloudflare. Most operations run in a real browser that needs a residential IP to clear Cloudflare from Apify's network — residential is the default and strongly recommended. The two search operations use a lightweight API and work on any proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}