Actor picture

Example Counter

apify/example-counter

This act simply counts from one up. In each run it prints one number. Its state (counter position) is stored in named key-value store. Name of the store is example-counter and you can find in Apify app under the Storages.

You need to have an Apify account with an API token.

  1. To run the actor from your program externally, copy-paste the code below into your program (based on programming language)

  2. Replace <YOUR_API_TOKEN> with your own token (you can find it here)

1
2
3
4
5
6
7
8
const Apify = require('Apify');

Apify.client.setOptions({ token: '<YOUR_API_TOKEN>' });

const run = await Apify.call('apify/example-counter', { });

console.log('Actor finished, here is the output:');
console.dir(run.output);
For further information, check out these resources
  • Modified
  • Last run
  • Used30 times
  • Used by5 users
Categories