ApifyRequestList
Index
Methods
Methods
open
Create a new
ApifyRequestListfrom the standard Apify request list sources input.Each entry in
request_list_sources_inputis a dict with either aurlkey (for a direct URL) or arequestsFromUrlkey (for a remote resource whose response body is scanned for URLs). Optional keysmethod,payload,headers, anduserDataare applied to every request produced from that entry.Parameters
optionalkeyword-onlyname: str | None = None
An optional name for the request list, used for state persistence.
optionalkeyword-onlyrequest_list_sources_input: list[dict[str, Any]] | None = None
A list of request source dicts in the standard Apify format. Each dict must contain either a
urlkey or arequestsFromUrlkey. IfNoneor empty, an empty request list is returned.optionalkeyword-onlyhttp_client: HttpClient | None = None
HTTP client used to fetch remote URL lists (entries with
requestsFromUrl). Defaults toImpitHttpClientif not provided.
Returns ApifyRequestList
A new
ApifyRequestListpopulated with the resolved requests.
A request list that can be constructed from the standard Apify
requestListSourcesActor input format.This extends the Crawlee
RequestListwith the ability to parse the request list sources input commonly used in Apify Actors. It supports two kinds of entries:urlkey are converted to requests directly.requestsFromUrlkey point to a remote resource (e.g. a plain-text file). The resource is fetched and all URLs found in the response body are extracted and converted to requests.Both kinds of entries can optionally specify
method,payload,headers, anduserDatafields that will be applied to every request created from that entry.Usage