{
  "openapi": "3.0.1",
  "info": {
    "title": "CoinGecko Coin Rankings, Trending & Categories",
    "description": "Get CoinGecko coin rankings, search results, per-coin detail, trending coins, and category listings with price, market cap, and 24h change, in your choice of currency.",
    "version": "1.1",
    "x-build-id": "5J9pjVjwAi3y3uqXV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~coingecko-coin-rankings-trending-and-categories/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-coingecko-coin-rankings-trending-and-categories",
        "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/dataspryva~coingecko-coin-rankings-trending-and-categories/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-coingecko-coin-rankings-trending-and-categories",
        "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/dataspryva~coingecko-coin-rankings-trending-and-categories/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-coingecko-coin-rankings-trending-and-categories",
        "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": [
              "markets",
              "search",
              "byId",
              "trending",
              "categories"
            ],
            "type": "string",
            "description": "Choose what to collect: ranked market data, matching coins, one or more full coin profiles, the current trending list, or the category directory. Older `coins`/`rankings` values are mapped in code, but this form validates the five current modes.",
            "default": "markets"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Coin name or symbol to search for (mode=search). Example: bitcoin, sol, doge. Legacy key `query` is also accepted."
          },
          "coinIds": {
            "title": "Coin IDs or URLs",
            "type": "array",
            "description": "CoinGecko IDs (bitcoin, ethereum) or full coingecko.com coin URLs. Used by mode=byId for full profiles, and by mode=markets to restrict rankings to these coins. Legacy `coinId` and `ids` are accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "vsCurrency": {
            "title": "Quote currency",
            "enum": [
              "usd",
              "eur",
              "gbp",
              "jpy",
              "cny",
              "krw",
              "aud",
              "cad",
              "chf",
              "inr",
              "brl",
              "mxn",
              "rub",
              "try",
              "zar",
              "aed",
              "sar",
              "hkd",
              "sgd",
              "nzd",
              "sek",
              "nok",
              "dkk",
              "pln",
              "czk",
              "huf",
              "php",
              "idr",
              "myr",
              "thb",
              "twd",
              "vnd",
              "pkr",
              "bdt",
              "lkr",
              "ngn",
              "ars",
              "clp",
              "bmd",
              "bhd",
              "kwd",
              "mmk",
              "gel",
              "uah",
              "ils",
              "vef",
              "xdr",
              "xag",
              "xau",
              "btc",
              "eth",
              "ltc",
              "bch",
              "bnb",
              "eos",
              "xrp",
              "xlm",
              "link",
              "dot",
              "yfi",
              "sol",
              "bits",
              "sats"
            ],
            "type": "string",
            "description": "Currency used for every price field. All 63 currencies supported by CoinGecko's public API are listed. Legacy `currency` and `quoteCurrency` are accepted.",
            "default": "usd"
          },
          "order": {
            "title": "Ranking order",
            "enum": [
              "market_cap_desc",
              "market_cap_asc",
              "volume_desc",
              "volume_asc",
              "id_asc",
              "id_desc"
            ],
            "type": "string",
            "description": "How mode=markets sorts coins. Legacy `sort` and `orderBy` are accepted.",
            "default": "market_cap_desc"
          },
          "category": {
            "title": "Category filter",
            "type": "string",
            "description": "Only return coins in this CoinGecko category (mode=markets), e.g. decentralized-finance-defi, layer-1, stablecoins. Run mode=categories to discover slugs. Legacy `categoryId` is accepted."
          },
          "startPage": {
            "title": "Starting page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "First 250-coin page to read in mode=markets. Use it to resume a deep ranking after CoinGecko's rate limit. Legacy `page` is accepted.",
            "default": 1
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum records to return. Rankings page through CoinGecko 250 at a time, so values above 250 cost extra requests and may wait on the public rate limit. Legacy `limit` is accepted.",
            "default": 50
          },
          "includeSparkline": {
            "title": "Include 7-day sparkline",
            "type": "boolean",
            "description": "Add the raw 168-hour price series (sparklineIn7d) to each ranking record. Off keeps records small.",
            "default": false
          },
          "minMarketCap": {
            "title": "Minimum market cap",
            "minimum": 0,
            "type": "number",
            "description": "Drop coins whose market cap is below this value in the chosen quote currency (mode=markets)."
          },
          "maxMarketCap": {
            "title": "Maximum market cap",
            "minimum": 0,
            "type": "number",
            "description": "Drop coins whose market cap is above this value in the chosen quote currency (mode=markets)."
          },
          "minRank": {
            "title": "Minimum market cap rank",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Drop coins ranked above this number, e.g. 101 to skip the top 100 (mode=markets)."
          },
          "maxRank": {
            "title": "Maximum market cap rank",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Drop coins ranked below this number, e.g. 500 to stop at rank 500 (mode=markets)."
          },
          "minVolume24h": {
            "title": "Minimum 24h volume",
            "minimum": 0,
            "type": "number",
            "description": "Drop coins whose 24-hour trading volume is below this value (mode=markets). Legacy `min24hVolume` is accepted."
          },
          "maxVolume24h": {
            "title": "Maximum 24h volume",
            "minimum": 0,
            "type": "number",
            "description": "Drop coins whose 24-hour trading volume is above this value (mode=markets)."
          },
          "categoryOrder": {
            "title": "Category order",
            "enum": [
              "market_cap_desc",
              "market_cap_asc",
              "name_desc",
              "name_asc",
              "market_cap_change_24h_desc",
              "market_cap_change_24h_asc"
            ],
            "type": "string",
            "description": "How mode=categories sorts the category directory. Legacy `catOrder` is accepted.",
            "default": "market_cap_desc"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}