Actor

apify/example-call

  • Builds
  • latest 0.0.2 / 2017-11-01
  • Created 2017-10-25
  • Last modified 2018-09-12
  • grade 5

Description

Simple example showing how to call another act. It doesn't accept any input and doesn't generate any output.


API

To run the actor, send a HTTP POST request to:

https://api.apify.com/v2/acts/apify~example-call/runs?token=<YOUR_API_TOKEN>

The POST payload will be passed as input for the actor. For more information, read the docs.


Source code

Based on the apify/actor-node-basic Docker image (see docs).

const Apify = require('apify');

Apify.main(async () => {
    const run = await Apify.call('apify/hello-world', { greeting: 'Hello sir!' });
    console.log('Apify.call() result:');
    console.dir(run);
});