{
  "openapi": "3.0.1",
  "info": {
    "title": "CoinMarketCap Scraped",
    "description": "Coin market cap scraping",
    "version": "0.0",
    "x-build-id": "lJIoryWr4FvYkIfL7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apificasion~CoinMarketCap-Scraped/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apificasion-CoinMarketCap-Scraped",
        "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/apificasion~CoinMarketCap-Scraped/runs": {
      "post": {
        "operationId": "runs-sync-apificasion-CoinMarketCap-Scraped",
        "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/apificasion~CoinMarketCap-Scraped/run-sync": {
      "post": {
        "operationId": "run-sync-apificasion-CoinMarketCap-Scraped",
        "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": "Scrape Mode",
            "enum": [
              "top_coins",
              "coin_details",
              "trending",
              "gainers_losers",
              "most_visited",
              "recently_added",
              "exchanges",
              "global_metrics",
              "historical_chart",
              "custom_urls"
            ],
            "type": "string",
            "description": "Select the type of CoinMarketCap data you want to scrape.",
            "default": "top_coins"
          },
          "coins": {
            "title": "Coin Symbols or Slugs",
            "type": "array",
            "description": "Specify coin symbols (e.g. BTC, ETH, SOL, PEPE, DOGE) or slugs (e.g. bitcoin, ethereum, solana). Required for 'Specific Coin Details' and 'Historical Price Chart' modes.",
            "items": {
              "type": "string"
            },
            "default": [
              "BTC",
              "ETH",
              "SOL"
            ]
          },
          "maxItems": {
            "title": "Max Items to Scrape",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of coins, exchanges, or records to collect. Set to 0 or leave empty for no limit.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort By (Listings)",
            "enum": [
              "market_cap",
              "volume_24h",
              "percent_change_24h",
              "percent_change_1h",
              "percent_change_7d",
              "circulating_supply",
              "name",
              "symbol"
            ],
            "type": "string",
            "description": "Attribute to sort listings by.",
            "default": "market_cap"
          },
          "sortType": {
            "title": "Sort Direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Ascending or Descending sort order.",
            "default": "desc"
          },
          "convert": {
            "title": "Quote / Convert Currency",
            "type": "string",
            "description": "Fiat or crypto currency to quote prices in (e.g. USD, EUR, GBP, BTC, ETH, JPY, CAD, AUD).",
            "default": "USD"
          },
          "cryptoType": {
            "title": "Cryptocurrency Asset Type",
            "enum": [
              "all",
              "coins",
              "tokens"
            ],
            "type": "string",
            "description": "Filter by asset class: all, coins (own blockchain), or tokens (smart contract).",
            "default": "all"
          },
          "includeDetails": {
            "title": "Enrich with Deep Details (Contracts, Socials, Description)",
            "type": "boolean",
            "description": "If enabled in 'Top Cryptocurrencies' or 'Trending' mode, fetches deep metadata (smart contracts on all chains, social links, website, whitepaper, GitHub, audits) for every coin.",
            "default": false
          },
          "chartRange": {
            "title": "Historical Chart Range",
            "enum": [
              "1D",
              "7D",
              "1M",
              "1Y",
              "ALL"
            ],
            "type": "string",
            "description": "Time range for 'Historical Price Chart Data' mode.",
            "default": "7D"
          },
          "urls": {
            "title": "Custom CoinMarketCap URLs",
            "type": "array",
            "description": "Specific CoinMarketCap URLs to scrape when in 'Custom CoinMarketCap URLs' mode (e.g. https://coinmarketcap.com/currencies/solana/).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy settings to avoid rate limits or IP bans. Recommended for high-volume scrapes.",
            "default": {
              "useApifyProxy": false
            }
          },
          "debugLog": {
            "title": "Debug Logging",
            "type": "boolean",
            "description": "Enable verbose console logging for troubleshooting and development.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}