{
  "openapi": "3.0.1",
  "info": {
    "title": "Discogs Search Scraper",
    "description": "Searches Discogs across releases, master releases, artists and labels. Returns full tracklist, catalog number, community rating, and live marketplace price range for individual releases.",
    "version": "0.1",
    "x-build-id": "ZQn1fDcIr491ogYmM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~discogs-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-discogs-search-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/scrapyx~discogs-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-discogs-search-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/scrapyx~discogs-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-discogs-search-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": {
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "Free-text searches — one crawl per entry, each with its own SEARCH_SUMMARY row. Leave empty and set at least one filter below to browse by filter alone (e.g. every Reggae release with no search term at all).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "entityType": {
            "title": "Entity type",
            "enum": [
              "release",
              "master",
              "artist",
              "label"
            ],
            "type": "string",
            "description": "Which of Discogs' four indexed types to search. Each returns a genuinely different result shape (verified) — a specific pressing, the canonical work across all its pressings, an artist, or a record label.",
            "default": "release"
          },
          "format": {
            "title": "Format",
            "type": "string",
            "description": "Exact format facet, e.g. 'Vinyl', 'CD', 'Cassette'. Must match Discogs' own facet text exactly (case and spacing matter). A bogus value genuinely narrows to zero results here rather than silently returning everything, so a typo is safe — just empty.",
            "default": ""
          },
          "genre": {
            "title": "Genre",
            "type": "string",
            "description": "Exact genre facet, e.g. 'Rock', 'Electronic', 'Hip Hop', 'Jazz'. Same exact-match behaviour as Format.",
            "default": ""
          },
          "style": {
            "title": "Style",
            "type": "string",
            "description": "Exact style facet — a finer-grained tag than genre, e.g. 'Trip Hop', 'Alternative Rock', 'Downtempo'. Same exact-match behaviour as Format.",
            "default": ""
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Country of release, e.g. 'US', 'UK', 'Germany'.",
            "default": ""
          },
          "year": {
            "title": "Year",
            "type": "string",
            "description": "Exact release year, e.g. '1997'.",
            "default": ""
          },
          "decade": {
            "title": "Decade",
            "type": "string",
            "description": "Decade, e.g. '1990' for the 1990s.",
            "default": ""
          },
          "maxItems": {
            "title": "Max results per query",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many results per query. Set to 0 for unlimited — Discogs' pagination is genuinely honest here (25 results/page, past the real last page it returns an empty array rather than clamping back to page 1), so an unlimited crawl terminates correctly.",
            "default": 50
          },
          "includeReleaseDetails": {
            "title": "Fetch full release details",
            "type": "boolean",
            "description": "For entityType='release' only: fetch each release's detail page for the full tracklist, catalog number, community rating, and live marketplace price range (offer count, low/high price). Ignored (with a log warning) for master/artist/label searches, which this actor does not have a detail parser for.",
            "default": true
          },
          "surface": {
            "title": "Data surface",
            "enum": [
              "auto",
              "web",
              "api"
            ],
            "type": "string",
            "description": "Where to read from. 'auto' (default) tries the website first (fast, Discogs' own GraphQL result objects with `__typename`, JSON-LD marketplace price range on release pages) and falls back to the official API (api.discogs.com) for any query or release the website's Cloudflare challenge blocks. 'api' skips the website entirely: deterministic, but rate-limited to 25 requests/min without a token (60/min with one) and rows carry the API's field names instead. 'web' never falls back. Every row says which surface produced it in `_source`.",
            "default": "auto"
          },
          "discogsToken": {
            "title": "Discogs personal access token (optional)",
            "type": "string",
            "description": "Optional. Generate one at discogs.com/settings/developers. Only used for API calls (the fallback surface, or all calls with surface='api'); it raises the API rate limit from 25 to 60 requests/min. Never logged and never sent to the website."
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many requests may be in flight at once. This absorbs latency variance; it is NOT the throttle — the crawl rate is set by 'Minimum interval between requests' below.",
            "default": 5
          },
          "minRequestInterval": {
            "title": "Minimum interval between requests (seconds)",
            "minimum": 0.05,
            "maximum": 10,
            "type": "number",
            "description": "The actual speed control: the shortest gap between two requests to Discogs, across all workers.",
            "default": 0.4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "www.discogs.com sits behind a Cloudflare challenge that is probabilistic per request from cloud egress; the actor rotates exit IP + browser fingerprint and falls back to the official Discogs API (api.discogs.com, never challenged in our measurements) when the web surface is blocked. Apify datacenter proxy is the default: measured identically to residential here, at a fraction of the cost. Leaving this empty runs on the container's own IP.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}