Actor

chin/apify-factual

  • Builds
  • latest 0.0.16 / 2017-11-16
  • Created 2017-11-16
  • Last modified 2018-10-09
  • grade 2

Description

Sadly, this actor has no description.


API

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

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

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


Example input

Content type: application/json; charset=utf-8

{ 
    "key": "a5beccd850f886dbe16be10558260d90",
    "webUrl": "http://factual.com/data/t/places",
    "siteKey": "6Leb2swSAAAAAI2NhmlHOSIC8bgeBcuaj-PCB4h9"
}

Source code

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

const Apify = require('apify');
const request = require('request-promise');

Apify.main(async () => {
    // Get input of your act
    const input = await Apify.getValue('INPUT');
    console.log('My input:');
    console.dir(input);

    // Do something useful here
    const html = await request('http://factual.com/data/t/places');

    // And then save output
    const output = {
        html,
        crawledAt: new Date(),
    };
    console.log('My output:');
    console.dir(output);
    await Apify.setValue('OUTPUT', output);
});