Skip to content

Apify Actors

Apify Actors lets you run powerful web‑scraping and automation scripts from the Apify platform directly inside your Nappai dashboard.
You choose an Actor, give it a JSON configuration, and the component returns the scraped data or a ready‑to‑use tool for agents.

How it Works

When you click Run, the component talks to the Apify API using the token you set in the Apify credential.

  1. It sends the JSON you entered in Run input to the chosen Actor.
  2. The Actor runs on Apify’s servers and stores its results in a dataset.
  3. The component pulls that dataset, optionally keeps only the fields you listed in Output fields, and can flatten nested data if you tick Flatten output.
  4. The final data is returned as a list of Data objects, and a small helper tool is also created so agents can call the same Actor later.

Inputs

  • Actor: The specific Apify Actor name or ID to run.
    Example: apify/website-content-crawler.
    Find Actor IDs in the Apify Store: https://apify.com/store

  • Output fields: Specify which fields to keep from the Actor’s dataset, separated by commas.
    If left empty, all fields are returned.
    Use dot notation for nested fields (e.g., metadata.title).
    Dots become underscores in the output (metadata_title).
    Example: text, url, metadata.title

  • Flatten output: If checked, nested keys like {'a': {'b': 1}} become {'a_b': 1}.
    Useful when you want a simple flat structure for downstream processing.

  • Run input: JSON configuration for the selected Actor.
    Refer to the Actor’s documentation on Apify for required parameters.
    Example for apify/website-content-crawler:

    {
    "startUrls": [
    {
    "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
    }
    ],
    "maxCrawlDepth": 0
    }

Note: The component requires an Apify credential.

  1. Add a new credential of type Apify in the Nappai credentials section.
  2. Enter your Apify API Token (a password‑type field).
  3. In the component, select that credential in the Credential field.
    The token is not shown in the input list to keep it secure.

Outputs

  • Output: A list of Data objects containing the scraped or extracted information.
    Use this output to feed other components, store results, or display them in dashboards.

  • Tool: A ready‑to‑use tool that agents can call to run the same Actor again.
    Useful when building conversational agents that need to trigger web scraping on demand.

Usage Example

  1. Add the component to your workflow.
  2. Select the Apify credential you created earlier.
  3. Set the Actor to apify/website-content-crawler.
  4. Paste the Run input JSON (the example above).
  5. (Optional) Enter text, url in Output fields to keep only those columns.
  6. Run the workflow.
  7. The Output will contain the scraped page text and URL, ready for further processing or display.
  • Data Processor – Clean or transform the data returned by Apify Actors.
  • Web Scraper – Built‑in scraper for simple sites that don’t need a full Actor.
  • Agent – Use the generated Tool to let an AI agent trigger scraping during a conversation.

Tips and Best Practices

  • Test with a small Run input first to confirm the Actor works before scaling up.
  • Use Output fields to limit the amount of data you pull back; this speeds up the workflow.
  • Enable Flatten output if you plan to feed the data into components that expect flat JSON.
  • Keep your Apify token secure; never expose it in public workflows or logs.
  • Check the Actor’s documentation on Apify for any required parameters or rate limits.

Security Considerations

  • The Apify token is stored in a credential and never appears in the component’s input list.
  • Ensure the credential is only shared with trusted users.
  • Use the Flatten output option only when necessary to avoid accidental data exposure.
  • Monitor your Apify account for any unusual activity that might indicate a compromised token.