{
  "openapi": "3.0.1",
  "info": {
    "title": "Crypto Prices API - CoinMarketCap Market Cap, Listings, OHLCV",
    "description": "Crypto prices API for CoinMarketCap: top cryptocurrency listings with live price, market cap, volume and % change, coin quotes, ID map, metadata, global market cap and BTC dominance, exchange rankings and historical OHLCV. Free keyless mode, or bring your own API key.",
    "version": "0.1",
    "x-build-id": "rPtJmDH8jyYpJSU3G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~crypto-prices-market-cap-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-crypto-prices-market-cap-api",
        "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/nabeelbaghoor~crypto-prices-market-cap-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-crypto-prices-market-cap-api",
        "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/nabeelbaghoor~crypto-prices-market-cap-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-crypto-prices-market-cap-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "listingsLatest",
              "quotesLatest",
              "cryptoMap",
              "cryptoInfo",
              "globalMetrics",
              "exchangeListings",
              "exchangeMap",
              "ohlcvHistorical"
            ],
            "type": "string",
            "description": "Free without a key (Keyless Public API, rows not charged): listings, latest quotes, cryptocurrency ID map, metadata, global metrics and exchange ID map. Need your own CoinMarketCap API key: exchange listings, and historical OHLCV (Startup plan or higher).",
            "default": "listingsLatest"
          },
          "coins": {
            "title": "Coins",
            "type": "array",
            "description": "Latest quotes, metadata and historical OHLCV. One coin per line, read as the coin ID type below: symbols (BTC, ETH, SOL), slugs (bitcoin, ethereum) or CoinMarketCap IDs (1, 1027). A symbol returns every coin that uses it; use slugs or IDs for exactly one. Up to 1,000 per run, sent 100 per request.",
            "items": {
              "type": "string"
            }
          },
          "coinIdType": {
            "title": "Coin ID type",
            "enum": [
              "symbol",
              "slug",
              "id"
            ],
            "type": "string",
            "description": "How the coins list is read.",
            "default": "symbol"
          },
          "contractAddress": {
            "title": "Contract address",
            "type": "string",
            "description": "Metadata only. One token contract address, such as 0xc40af1e4fecfa05ce6bab79dcd8b373d2e436c4e. Read in addition to any coins."
          },
          "convert": {
            "title": "Convert currencies",
            "type": "string",
            "description": "Listings, latest quotes, global metrics, exchange listings and OHLCV. Fiat or crypto symbols to price in, comma separated: USD, EUR, GBP, BTC. Keyless runs take one; keys take up to 120 (OHLCV up to 3), each extra one costing a provider credit. The first one fills the price columns; every currency stays in the quote field.",
            "default": "USD"
          },
          "sort": {
            "title": "Listings sort",
            "enum": [
              "market_cap",
              "market_cap_strict",
              "name",
              "symbol",
              "date_added",
              "price",
              "circulating_supply",
              "total_supply",
              "max_supply",
              "num_market_pairs",
              "market_cap_by_total_supply_strict",
              "volume_24h",
              "volume_7d",
              "volume_30d",
              "percent_change_1h",
              "percent_change_24h",
              "percent_change_7d"
            ],
            "type": "string",
            "description": "Listings only. The field to rank cryptocurrencies by. Market cap uses CoinMarketCap's rank methodology; strict market cap is price times circulating supply.",
            "default": "market_cap"
          },
          "sortDir": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Listings and exchange listings.",
            "default": "desc"
          },
          "cryptocurrencyType": {
            "title": "Cryptocurrency type",
            "enum": [
              "all",
              "coins",
              "tokens"
            ],
            "type": "string",
            "description": "Listings only. Coins (own blockchain), tokens (on another platform) or both.",
            "default": "all"
          },
          "tag": {
            "title": "Tag",
            "enum": [
              "all",
              "defi",
              "filesharing"
            ],
            "type": "string",
            "description": "Listings only. The listings endpoint accepts these three tag values only.",
            "default": "all"
          },
          "priceMin": {
            "title": "Minimum price (USD)",
            "type": "number",
            "description": "Listings only. Lowest USD price to include."
          },
          "priceMax": {
            "title": "Maximum price (USD)",
            "type": "number",
            "description": "Listings only. Highest USD price to include."
          },
          "marketCapMin": {
            "title": "Minimum market cap",
            "type": "number",
            "description": "Listings only. Lowest market cap to include."
          },
          "marketCapMax": {
            "title": "Maximum market cap",
            "type": "number",
            "description": "Listings only. Highest market cap to include."
          },
          "volume24hMin": {
            "title": "Minimum 24h volume (USD)",
            "type": "number",
            "description": "Listings only. Lowest 24 hour USD volume to include."
          },
          "volume24hMax": {
            "title": "Maximum 24h volume (USD)",
            "type": "number",
            "description": "Listings only. Highest 24 hour USD volume to include."
          },
          "percentChange24hMin": {
            "title": "Minimum 24h % change",
            "type": "number",
            "description": "Listings only. Lowest 24 hour percent change to include, for example -5."
          },
          "percentChange24hMax": {
            "title": "Maximum 24h % change",
            "type": "number",
            "description": "Listings only. Highest 24 hour percent change to include, for example 20."
          },
          "listingStatus": {
            "title": "Listing status",
            "enum": [
              "active",
              "inactive",
              "untracked"
            ],
            "type": "string",
            "description": "Cryptocurrency and exchange ID maps. Active (default), inactive (no longer traded) or untracked (listed but not yet meeting the methodology).",
            "default": "active"
          },
          "cryptoMapSort": {
            "title": "ID map sort",
            "enum": [
              "cmc_rank",
              "id"
            ],
            "type": "string",
            "description": "Cryptocurrency ID map only.",
            "default": "cmc_rank"
          },
          "exchangeSort": {
            "title": "Exchange listings sort",
            "enum": [
              "volume_24h",
              "volume_24h_adjusted",
              "name",
              "exchange_score"
            ],
            "type": "string",
            "description": "Exchange listings only.",
            "default": "volume_24h"
          },
          "exchangeCategory": {
            "title": "Exchange category",
            "enum": [
              "all",
              "spot",
              "derivatives",
              "dex",
              "lending"
            ],
            "type": "string",
            "description": "Exchange listings only.",
            "default": "all"
          },
          "exchangeMapSort": {
            "title": "Exchange map sort",
            "enum": [
              "id",
              "volume_24h"
            ],
            "type": "string",
            "description": "Exchange ID map only.",
            "default": "id"
          },
          "exchangeSlugs": {
            "title": "Exchange slugs",
            "type": "array",
            "description": "Exchange ID map only. Optional exchange slugs, one per line: binance, coinbase-exchange, kraken. When set, the other exchange map filters are ignored, as the provider documents.",
            "items": {
              "type": "string"
            }
          },
          "cryptoId": {
            "title": "Exchanges trading this crypto ID",
            "minimum": 1,
            "type": "integer",
            "description": "Exchange ID map only. Optional CoinMarketCap cryptocurrency ID; returns only exchanges listing it (1 is Bitcoin)."
          },
          "timePeriod": {
            "title": "OHLCV time period",
            "enum": [
              "daily",
              "hourly"
            ],
            "type": "string",
            "description": "Historical OHLCV only. Daily or hourly candles.",
            "default": "daily"
          },
          "interval": {
            "title": "OHLCV sampling interval",
            "enum": [
              "daily",
              "hourly",
              "weekly",
              "monthly",
              "yearly",
              "1h",
              "2h",
              "3h",
              "4h",
              "6h",
              "12h",
              "1d",
              "2d",
              "3d",
              "7d",
              "14d",
              "15d",
              "30d",
              "60d",
              "90d",
              "365d"
            ],
            "type": "string",
            "description": "Historical OHLCV only. How often the time period is sampled: daily returns every day, weekly the first day of each week, 2d every other day, and so on.",
            "default": "daily"
          },
          "timeStart": {
            "title": "OHLCV start",
            "type": "string",
            "description": "Historical OHLCV only. Exclusive start, as YYYY-MM-DD (recommended for daily), a UTC time or a Unix timestamp. To get the candle for 2026-01-31, start at 2026-01-30."
          },
          "timeEnd": {
            "title": "OHLCV end",
            "type": "string",
            "description": "Historical OHLCV only. Inclusive end. Left empty, it is now."
          },
          "count": {
            "title": "OHLCV periods",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Historical OHLCV only. Number of periods back from the end when no start is given (provider default 10, ceiling 10,000). It includes the current unfinished period, so ask for one more than you need."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns (and, with your key, charges for). Also the page size for paged modes, up to the documented 5,000 for listings.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Optional pacing. Left empty, keyless runs send 6 per minute (the shared anonymous pool trips after a few quick calls) and keyed runs 20. Plans allow from 30 per minute up; the actor also waits and retries on HTTP 429."
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Optional. Your own CoinMarketCap API key from pro.coinmarketcap.com. Left empty, the actor reads the free Keyless Public API. Sent only in the documented X-CMC_PRO_API_KEY header and never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}