{
  "openapi": "3.0.1",
  "info": {
    "title": "WalletHub Rankings Scraper",
    "description": "Scrape WalletHub.com's data-driven state/city ranking studies - personal finance, economy, health, safety and lifestyle rankings. Fetch any ranking study's full ranked table by URL, pick from 40+ curated popular studies, or browse the latest published studies.",
    "version": "1.0",
    "x-build-id": "z14I95cIs0JZj2A8U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~wallethub-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-wallethub-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~wallethub-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-wallethub-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~wallethub-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-wallethub-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": [
              "ranking",
              "latestStudies"
            ],
            "type": "string",
            "description": "What to fetch. Note: `latestStudies` reads WalletHub's single latest-awards hub page, which lists roughly 100 studies with no further pagination -- `maxItems` above that count will not yield more records.",
            "default": "ranking"
          },
          "topic": {
            "title": "Curated study topic (mode=ranking)",
            "enum": [
              "",
              "https://wallethub.com/edu/states-with-best-healthcare/23457",
              "https://wallethub.com/edu/e/states-with-the-best-schools/5335",
              "https://wallethub.com/edu/best-and-worst-cities-for-first-time-home-buyers/5564",
              "https://wallethub.com/edu/best-worst-cities-for-recreation/5144",
              "https://wallethub.com/edu/best-cities-for-renters/23010",
              "https://wallethub.com/edu/most-least-stressed-cities/22759",
              "https://wallethub.com/edu/e/most-and-least-educated-cities/6656",
              "https://wallethub.com/edu/most-independent-states/36426",
              "https://wallethub.com/edu/best-worst-states-for-summer-road-trips/4648",
              "https://wallethub.com/edu/best-run-cities/22869",
              "https://wallethub.com/edu/most-patriotic-states/13680",
              "https://wallethub.com/edu/best-and-worst-states-for-working-dads/13458",
              "https://wallethub.com/edu/best-cities-for-staycations/4341",
              "https://wallethub.com/edu/states-with-the-best-economies/21697",
              "https://wallethub.com/edu/best-cities-for-families/4435",
              "https://wallethub.com/edu/best-places-for-summer-jobs/21137",
              "https://wallethub.com/edu/most-affordable-cities-for-home-buyers/121950",
              "https://wallethub.com/edu/best-states-for-military-retirees/3915",
              "https://wallethub.com/edu/cities-with-the-most-least-student-debt/91069",
              "https://wallethub.com/edu/best-worst-cities-to-start-a-career/3626",
              "https://wallethub.com/edu/best-states-to-be-a-cop/34669",
              "https://wallethub.com/edu/drug-use-by-state/35150",
              "https://wallethub.com/edu/best-states-for-nurses/4041",
              "https://wallethub.com/edu/best-states-for-working-moms/3565",
              "https://wallethub.com/edu/states-most-addicted-to-gambling/20846",
              "https://wallethub.com/edu/best-cities-to-start-a-business/2281",
              "https://wallethub.com/edu/best-small-cities-to-start-a-business/20180",
              "https://wallethub.com/edu/greenest-states/11987",
              "https://wallethub.com/edu/best-states-for-child-health/34455",
              "https://wallethub.com/edu/best-states-for-working-from-home/72801",
              "https://wallethub.com/edu/most-and-least-financially-literate-states/3337",
              "https://wallethub.com/edu/states-with-highest-lowest-tax-burden/20494",
              "https://wallethub.com/edu/healthiest-cities/31072",
              "https://wallethub.com/edu/state-taxpayer-roi-report/3283",
              "https://wallethub.com/edu/most-stressful-states/32218",
              "https://wallethub.com/edu/most-innovative-states/31890",
              "https://wallethub.com/edu/best-and-worst-states-for-doctors/11376",
              "https://wallethub.com/edu/best-and-worst-states-for-women/10728",
              "https://wallethub.com/edu/best-and-worst-states-to-retire/18592",
              "https://wallethub.com/edu/best-state-capitals/19030",
              "https://wallethub.com/edu/best-states-for-jobs/35641"
            ],
            "type": "string",
            "description": "Pick a popular WalletHub ranking study. Leave as \"Custom URL(s) below\" and use `rankingUrls` to fetch any other study.",
            "default": ""
          },
          "rankingUrls": {
            "title": "Custom ranking study URLs (mode=ranking)",
            "type": "array",
            "description": "Any WalletHub `/edu/...` ranking-study URLs. Combined with `topic` if both are set.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minRank": {
            "title": "Min rank (mode=ranking)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Drop entries ranked better (lower number) than this."
          },
          "maxRank": {
            "title": "Max rank (mode=ranking)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Drop entries ranked worse (higher number) than this."
          },
          "entityNameContains": {
            "title": "Entity name contains (mode=ranking)",
            "type": "string",
            "description": "Case-insensitive substring the state/city name must contain, e.g. `New`."
          },
          "includeMethodology": {
            "title": "Include methodology & expert panel (mode=ranking)",
            "type": "boolean",
            "description": "Emit one extra `methodology` record per study with the scoring-criteria breakdown (categories, weights, metrics), the per-metric \"Metric Highlights\" (each underlying metric's own top-5/bottom-5 states plus a best-vs-worst headline, e.g. \"2x Difference\"), the \"Ask the Experts\" panelist list (name, credentials, photo), the \"You May Also Like\" related studies, and the reader Q&A list.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}