You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/02_concepts/03_storages.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,10 +183,10 @@ To check if all the requests in the queue are handled, you can use the <ApiLink
183
183
184
184
## Storage clients
185
185
186
-
Behind the scenes, the SDK uses storage clients to communicate with the storage backend. The appropriate client is selected automatically based on the runtime environment — on the Apify platform, data is persisted via the Apify API, while local runs use the filesystem. For most use cases, you don't need to think about storage clients at all. To learn about the available implementations, how to switch between a single and shared request queue, or how to configure a custom client, see the [Storage clients](./storage-clients) page. For a deeper look at how storage clients work internally, see the [Crawlee storage clients guide](https://crawlee.dev/python/docs/guides/storage-clients).
186
+
Behind the scenes, the SDK uses storage clients to communicate with the storage backend. The appropriate client is selected automatically based on the runtime environment. On the Apify platform, data is persisted via the Apify API, while local runs use the filesystem. For most use cases, you don't need to think about storage clients at all. To learn about the available implementations, how to switch between a single and shared request queue, or how to configure a custom client, see the [Storage clients](./storage-clients) page. For a deeper look at how storage clients work internally, see the [Crawlee storage clients guide](https://crawlee.dev/python/docs/guides/storage-clients).
187
187
188
188
## Conclusion
189
189
190
-
This page has covered the three storage types — datasets, key-value stores, and request queues — how they are emulated on the local filesystem, how to open named and unnamed storages, and how to read from and write to each through the `Actor` shortcuts and the storage classes.
190
+
This page has covered the three storage types (datasets, key-value stores, and request queues): how they are emulated on the local filesystem, how to open named and unnamed storages, and how to read from and write to each through the `Actor` shortcuts and the storage classes.
191
191
192
192
For comprehensive information about storage on the Apify platform, see the [storage documentation](https://docs.apify.com/platform/storage), including the pages on [datasets](https://docs.apify.com/platform/storage/dataset), [key-value stores](https://docs.apify.com/platform/storage/key-value-store), and [request queues](https://docs.apify.com/platform/storage/request-queue).
Copy file name to clipboardExpand all lines: docs/02_concepts/04_actor_events.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ During its runtime, the Actor receives Actor events sent by the Apify platform o
14
14
15
15
## Event types
16
16
17
-
A listener can optionally receive a single argument — a Pydantic model with the event's data. The table below lists the events, the type of that data object, and when each event is emitted.
17
+
A listener can optionally receive a single argument, a Pydantic model with the event's data. The table below lists the events, the type of that data object, and when each event is emitted.
18
18
19
19
<table>
20
20
<thead>
@@ -105,6 +105,6 @@ You can optionally specify a `key` (the key-value store key under which the stat
105
105
106
106
## Conclusion
107
107
108
-
This page has described the events emitted during a run — `SYSTEM_INFO`, `MIGRATING`, `ABORTING`, `PERSIST_STATE`, and `EXIT` — how to handle them with <ApiLinkto="class/Actor#on">`Actor.on`</ApiLink>, and how to persist state automatically with <ApiLinkto="class/Actor#use_state">`Actor.use_state`</ApiLink>.
108
+
This page has described the events emitted during a run (`SYSTEM_INFO`, `MIGRATING`, `ABORTING`, `PERSIST_STATE`, and `EXIT`): how to handle them with <ApiLinkto="class/Actor#on">`Actor.on`</ApiLink>, and how to persist state automatically with <ApiLinkto="class/Actor#use_state">`Actor.use_state`</ApiLink>.
109
109
110
110
For more details on platform events and state persistence, see the [system events](https://docs.apify.com/platform/actors/development/programming-interface/system-events) and [state persistence](https://docs.apify.com/platform/actors/development/state-persistence) documentation on the Apify platform.
Copy file name to clipboardExpand all lines: docs/02_concepts/05_proxy_management.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ You can then use that input to create the proxy configuration:
106
106
107
107
## Using the generated proxy URLs
108
108
109
-
`ProxyConfiguration` only generates proxy URLs — it does not make requests itself. Pass a generated URL to whichever HTTP client your Actor uses to route requests through the proxy.
109
+
`ProxyConfiguration` only generates proxy URLs. It does not make requests itself. Pass a generated URL to whichever HTTP client your Actor uses to route requests through the proxy.
110
110
111
111
### HTTPX
112
112
@@ -124,6 +124,6 @@ pip install httpx
124
124
125
125
## Conclusion
126
126
127
-
This page has explained how to manage proxies with the <ApiLinkto="class/ProxyConfiguration">`ProxyConfiguration`</ApiLink> class — using Apify Proxy or your own servers, keeping sessions sticky across requests, configuring tiered proxy rotation, and feeding proxy settings from Actor input.
127
+
This page has explained how to manage proxies with the <ApiLinkto="class/ProxyConfiguration">`ProxyConfiguration`</ApiLink> class: using Apify Proxy or your own servers, keeping sessions sticky across requests, configuring tiered proxy rotation, and feeding proxy settings from Actor input.
128
128
129
129
For full details on proxy configuration options, see the <ApiLinkto="class/ProxyConfiguration">`ProxyConfiguration`</ApiLink> API reference and the [Apify Proxy documentation](https://docs.apify.com/proxy).
Copy file name to clipboardExpand all lines: docs/02_concepts/06_interacting_with_other_actors.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,6 @@ When you set `gracefully=True`, the platform sends `ABORTING` and `PERSIST_STATE
65
65
66
66
## Conclusion
67
67
68
-
This page has shown how to interact with other Actors from your code — starting a run with <ApiLinkto="class/Actor#start">`Actor.start`</ApiLink>, waiting for it to finish with <ApiLinkto="class/Actor#call">`Actor.call`</ApiLink> or <ApiLinkto="class/Actor#call_task">`Actor.call_task`</ApiLink>, transforming a run with <ApiLinkto="class/Actor#metamorph">`Actor.metamorph`</ApiLink>, and stopping one with <ApiLinkto="class/Actor#abort">`Actor.abort`</ApiLink>.
68
+
This page has shown how to interact with other Actors from your code: starting a run with <ApiLinkto="class/Actor#start">`Actor.start`</ApiLink>, waiting for it to finish with <ApiLinkto="class/Actor#call">`Actor.call`</ApiLink> or <ApiLinkto="class/Actor#call_task">`Actor.call_task`</ApiLink>, transforming a run with <ApiLinkto="class/Actor#metamorph">`Actor.metamorph`</ApiLink>, and stopping one with <ApiLinkto="class/Actor#abort">`Actor.abort`</ApiLink>.
69
69
70
70
For the full list of methods for interacting with other Actors, see the <ApiLinkto="class/Actor">`Actor`</ApiLink> API reference. For more details on running Actors and Actor tasks on the platform, see the [Actors](https://docs.apify.com/platform/actors) and [Actor tasks](https://docs.apify.com/platform/actors/tasks) documentation.
Copy file name to clipboardExpand all lines: docs/02_concepts/08_access_apify_api.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ import ActorNewClientExample from '!!raw-loader!roa-loader!./code/08_actor_new_c
12
12
13
13
The Apify SDK provides a built-in instance of the [Apify API Client](https://docs.apify.com/api/client/python) for accessing Apify platform features beyond what the SDK covers directly.
14
14
15
-
The SDK wraps the most common operations — opening storages, reading input, charging, and starting other Actors — in convenient high-level methods. When you need something it does not expose directly, such as managing schedules, listing your Actors and runs, working with builds or webhook dispatches, or reading another run's dataset, you can reach the full [Apify API](https://docs.apify.com/api/v2) through the client. It provides a dedicated sub-client for each API resource — among them `dataset`, `key_value_store`, `request_queue`, `run`, `actor`, `task`, `schedule`, `webhook`, and `user` — and each operation returns plain Python data structures.
15
+
The SDK wraps the most common operations (opening storages, reading input, charging, and starting other Actors) in convenient high-level methods. When you need something it does not expose directly, such as managing schedules, listing your Actors and runs, working with builds or webhook dispatches, or reading another run's dataset, you can reach the full [Apify API](https://docs.apify.com/api/v2) through the client. It provides a dedicated sub-client for each API resource (among them `dataset`, `key_value_store`, `request_queue`, `run`, `actor`, `task`, `schedule`, `webhook`, and `user`), and each operation returns plain Python data structures.
16
16
17
17
## Actor client
18
18
@@ -24,20 +24,20 @@ For example, to get the details of your user, you can use this snippet:
24
24
{ActorClientExample}
25
25
</RunnableCodeBlock>
26
26
27
-
You select a resource with the matching method — for example `Actor.apify_client.dataset('<dataset_id>')` for a dataset or `Actor.apify_client.run('<run_id>')` for an Actor run — and then call the operation you need on the returned sub-client.
27
+
You select a resource with the matching method (for example,`Actor.apify_client.dataset('<dataset_id>')` for a dataset or `Actor.apify_client.run('<run_id>')` for an Actor run), and then call the operation you need on the returned sub-client.
28
28
29
29
## Actor new client
30
30
31
-
If you want to create a completely new instance of the client — for example, to use a different user's token or change the client configuration — you can use the <ApiLinkto="class/Actor#new_client">`Actor.new_client`</ApiLink> method. It accepts an optional `token` and `api_url`, along with retry and timeout settings (`max_retries`, `min_delay_between_retries`, `timeout`), and returns a fresh `ApifyClientAsync`:
31
+
If you want to create a completely new instance of the client (for example, to use a different user's token or change the client configuration), you can use the <ApiLinkto="class/Actor#new_client">`Actor.new_client`</ApiLink> method. It accepts an optional `token` and `api_url`, along with retry and timeout settings (`max_retries`, `min_delay_between_retries`, `timeout`), and returns a fresh `ApifyClientAsync`:
This is useful when the Actor's own token is not the right one — for instance, when acting on behalf of another user — or when you want different retry and timeout behavior than the shared `Actor.apify_client` instance.
37
+
This is useful when the Actor's own token is not the right one, for instance when acting on behalf of another user, or when you want different retry and timeout behavior than the shared `Actor.apify_client` instance.
38
38
39
39
## Conclusion
40
40
41
-
This page has shown how to reach the Apify API directly — through the built-in client exposed by <ApiLinkto="class/Actor#apify_client">`Actor.apify_client`</ApiLink>, or a freshly configured one created with <ApiLinkto="class/Actor#new_client">`Actor.new_client`</ApiLink> — for platform features the SDK does not wrap directly.
41
+
This page has shown how to reach the Apify API directly for platform features the SDK does not wrap. You can use the built-in client exposed by <ApiLinkto="class/Actor#apify_client">`Actor.apify_client`</ApiLink>, or a freshly configured one created with <ApiLinkto="class/Actor#new_client">`Actor.new_client`</ApiLink>.
42
42
43
43
For the full API client documentation, see the [Apify API Client for Python](https://docs.apify.com/api/client/python).
Copy file name to clipboardExpand all lines: docs/02_concepts/09_logging.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ When you create an Actor from an Apify-provided template, either in Apify Consol
20
20
21
21
## Manual configuration
22
22
23
-
If you are not using an Apify template — or you want to override what it sets up — you can configure the log level and the log formatting yourself.
23
+
If you are not using an Apify template, or you want to override what it sets up, you can configure the log level and the log formatting yourself.
24
24
25
25
### Configuring the log level
26
26
@@ -119,4 +119,4 @@ You can further decide whether you want to redirect just new logs of the ongoing
119
119
120
120
## Conclusion
121
121
122
-
This page has covered how the SDK logs through the `apify` logger — setting the log level, formatting output with <ApiLinkto="class/ActorLogFormatter">`ActorLogFormatter`</ApiLink>, using the logger at each level, and redirecting logs from other Actor runs back into the parent run. For more on the underlying logging machinery, see Python's standard [`logging`](https://docs.python.org/3/library/logging.html) module documentation.
122
+
This page has covered how the SDK logs through the `apify` logger: setting the log level, formatting output with <ApiLinkto="class/ActorLogFormatter">`ActorLogFormatter`</ApiLink>, using the logger at each level, and redirecting logs from other Actor runs back into the parent run. For more on the underlying logging machinery, see Python's standard [`logging`](https://docs.python.org/3/library/logging.html) module documentation.
Copy file name to clipboardExpand all lines: docs/02_concepts/10_configuration.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This will cause the Actor to persist its state every 10 seconds:
27
27
28
28
## Configuring via environment variables
29
29
30
-
All configuration options can also be set via environment variables. Most options are read from an environment variable named after the option in uppercase; many options accept several aliases — commonly with an `APIFY_`, `ACTOR_`, or `CRAWLEE_` prefix. See the <ApiLinkto="class/Configuration">`Configuration`</ApiLink> API reference for the full list of configuration options.
30
+
All configuration options can also be set via environment variables. Most options are read from an environment variable named after the option in uppercase; many options accept several aliases, commonly with an `APIFY_`, `ACTOR_`, or `CRAWLEE_` prefix. See the <ApiLinkto="class/Configuration">`Configuration`</ApiLink> API reference for the full list of configuration options.
31
31
32
32
For example, this Actor run will keep the contents of its local storages instead of purging them on start:
33
33
@@ -48,7 +48,7 @@ The table below lists a few options you are most likely to set yourself. When ru
48
48
|`log_level`|`APIFY_LOG_LEVEL`|`'INFO'`| Minimum severity of log messages that are printed. |
49
49
|`headless`|`APIFY_HEADLESS`|`True`| Whether to run browsers in headless mode. |
50
50
|`storage_dir`|`APIFY_LOCAL_STORAGE_DIR`|`'./storage'`| Directory holding local storages when running outside the platform. |
51
-
|`is_at_home`|`APIFY_IS_AT_HOME`|`False`| Set by the platform —`True` when the Actor runs on Apify. |
51
+
|`is_at_home`|`APIFY_IS_AT_HOME`|`False`| Set by the platform.`True` when the Actor runs on Apify. |
Copy file name to clipboardExpand all lines: docs/02_concepts/11_pay_per_event.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,6 @@ Because pricing configuration is stored by the Apify platform, all events will h
79
79
80
80
## Conclusion
81
81
82
-
This page has covered the pay-per-event pricing model — charging for events with <ApiLinkto="class/Actor#charge">`Actor.charge`</ApiLink>, respecting the charge limit so your Actor stops once the budget is exhausted, querying the <ApiLinkto="class/ChargingManager">`ChargingManager`</ApiLink>, handling the transition from another pricing model, and testing charging locally.
82
+
This page has covered the pay-per-event pricing model: charging for events with <ApiLinkto="class/Actor#charge">`Actor.charge`</ApiLink>, respecting the charge limit so your Actor stops once the budget is exhausted, querying the <ApiLinkto="class/ChargingManager">`ChargingManager`</ApiLink>, handling the transition from another pricing model, and testing charging locally.
83
83
84
84
For comprehensive details on pay-per-event pricing and Actor monetization, see the [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) and [monetization](https://docs.apify.com/platform/actors/publishing/monetize) documentation on the Apify platform.
0 commit comments