max_crawl_depth
(https://crawlee.dev/python/api/class/BasicCrawlerOptions#max_crawl_depth) . request.userData
. When adding new links in the request handler, just increment the depth by one and use that for each newly enqueued request (https://crawlee.dev/api/core/class/Request)