Actor in C# Example avatar
Actor in C# Example

Deprecated

Pricing

Pay per usage

Go to Store
Actor in C# Example

Actor in C# Example

Deprecated

Developed by

Patrik Trefil

Patrik Trefil

Maintained by Community

Example actor built in C# programming language. Downloads HTML from any page. Works on Apify platform and locally.

0.0 (0)

Pricing

Pay per usage

2

Total users

7

Monthly users

1

Last modified

3 years ago

Example Apify actor in C#

Minimal example for developing Apify actor in C# programming language. Here is the actor's page on the Apify store. The code is open source.

The example:

  • Reads user provided URL from input
  • Does HTTP request to get HTML from this URL
  • Saves HTML into OUTPUT record in Key Value Store

This actor works both on Apify platform and locally.

Local usage

For local usage, you need to:

  1. Clone the repository
  2. Install dotnet
  3. Create local storage with apify init or manually create folder path apify_storage/key_value_stores/default/
  4. Add INPUT.json file input inside this path that looks like this:
{
"url": "https://apify.com"
}
  1. Build and run the solution with dotnet run
  2. You can find OUTPUT.html next to INPUT.json