{
  "openapi": "3.0.1",
  "info": {
    "title": "Discogs Scraper",
    "description": "Scrape Discogs, the world's largest music database and marketplace. Search releases, masters, artists, and labels; pull full discographies; resolve marketplace listings and price stats. HTTP-only via the official Discogs API.",
    "version": "1.0",
    "x-build-id": "ZEKaSojPpLbZ19Lwg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~discogs-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-discogs-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/crawlerbros~discogs-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-discogs-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/crawlerbros~discogs-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-discogs-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byRelease",
              "byMaster",
              "byMasterVersions",
              "byArtist",
              "byArtistReleases",
              "byLabel",
              "byLabelReleases",
              "byMarketplaceListing",
              "marketplaceSearch",
              "marketplaceStats",
              "byUrl"
            ],
            "type": "string",
            "description": "What to fetch. Use `search` for free-text database queries, `byRelease`/`byMaster`/`byArtist`/`byLabel` to look up records by ID, or `marketplaceSearch`/`marketplaceStats` for marketplace pricing data.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text query for `mode=search` or `mode=marketplaceSearch`. Example: `miles davis`, `kind of blue`, `daft punk`.",
            "default": "miles davis"
          },
          "type": {
            "title": "Search type",
            "enum": [
              "any",
              "release",
              "master",
              "artist",
              "label"
            ],
            "type": "string",
            "description": "Restrict search to a particular Discogs entity (mode=search). `release` returns specific pressings; `master` returns canonical works.",
            "default": "release"
          },
          "format": {
            "title": "Format",
            "enum": [
              "any",
              "Vinyl",
              "CD",
              "Cassette",
              "DVD",
              "Blu-ray",
              "File",
              "Box Set",
              "Reel-To-Reel",
              "8-Track Cartridge",
              "Flexi-disc",
              "Acetate",
              "Shellac",
              "Mini-Disc",
              "DAT",
              "VHS",
              "Memory Stick",
              "SACD",
              "HDCD",
              "All Media"
            ],
            "type": "string",
            "description": "Filter to a physical or digital format (mode=search).",
            "default": "any"
          },
          "genre": {
            "title": "Genre",
            "enum": [
              "any",
              "Blues",
              "Brass & Military",
              "Children's",
              "Classical",
              "Electronic",
              "Folk, World, & Country",
              "Funk / Soul",
              "Hip Hop",
              "Jazz",
              "Latin",
              "Non-Music",
              "Pop",
              "Reggae",
              "Rock",
              "Stage & Screen"
            ],
            "type": "string",
            "description": "Discogs genre filter (mode=search).",
            "default": "any"
          },
          "style": {
            "title": "Style",
            "type": "string",
            "description": "Discogs style filter, e.g. `House`, `Free Jazz`, `Hard Rock` (mode=search)."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country of release, free-text (e.g. `US`, `UK`, `Germany`) (mode=search)."
          },
          "yearMin": {
            "title": "Year (min)",
            "minimum": 1890,
            "maximum": 2100,
            "type": "integer",
            "description": "Drop releases issued before this year."
          },
          "yearMax": {
            "title": "Year (max)",
            "minimum": 1890,
            "maximum": 2100,
            "type": "integer",
            "description": "Drop releases issued after this year."
          },
          "releaseId": {
            "title": "Release ID (mode=byRelease)",
            "type": "string",
            "description": "Discogs numeric release ID, e.g. `7426074`."
          },
          "masterId": {
            "title": "Master ID (mode=byMaster / byMasterVersions)",
            "type": "string",
            "description": "Discogs numeric master ID, e.g. `65664`."
          },
          "artistId": {
            "title": "Artist ID (mode=byArtist / byArtistReleases)",
            "type": "string",
            "description": "Discogs numeric artist ID, e.g. `108713`."
          },
          "labelId": {
            "title": "Label ID (mode=byLabel / byLabelReleases)",
            "type": "string",
            "description": "Discogs numeric label ID, e.g. `1`."
          },
          "listingId": {
            "title": "Listing ID (mode=byMarketplaceListing)",
            "type": "string",
            "description": "Discogs marketplace listing ID."
          },
          "urls": {
            "title": "Discogs URLs (mode=byUrl)",
            "type": "array",
            "description": "Direct Discogs URLs (release / master / artist / label / listing).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "year",
              "title",
              "format",
              "label",
              "artist",
              "catno",
              "country",
              "have",
              "want"
            ],
            "type": "string",
            "description": "Sort order for search and discography modes.",
            "default": "default"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending.",
            "default": "desc"
          },
          "minHave": {
            "title": "Min collection 'have' count",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop releases owned by fewer collectors than this."
          },
          "minWant": {
            "title": "Min wantlist count",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop releases wanted by fewer collectors than this."
          },
          "marketplaceCondition": {
            "title": "Marketplace condition (record)",
            "enum": [
              "any",
              "Mint (M)",
              "Near Mint (NM or M-)",
              "Very Good Plus (VG+)",
              "Very Good (VG)",
              "Good Plus (G+)",
              "Good (G)",
              "Fair (F)",
              "Poor (P)"
            ],
            "type": "string",
            "description": "Filter marketplace search by media condition.",
            "default": "any"
          },
          "apiToken": {
            "title": "Discogs personal access token (optional)",
            "type": "string",
            "description": "Discogs personal access token. Increases rate limits from 25 req/min (anonymous) to 60 req/min (authenticated). Anonymous works fine for small runs. Get one at https://www.discogs.com/settings/developers."
          },
          "userAgent": {
            "title": "User-Agent contact",
            "type": "string",
            "description": "Discogs requires a custom User-Agent string identifying your app.",
            "default": "Apify-DiscogsScraper/1.0 +https://apify.com"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}