Skip to main content

Newsletter AI Agent Actor API

This document provides technical details about the Newsletter AI Agent Apify Actor API, including input schema, output format, and usage examples.

Actor Input Schema

The Newsletter AI Agent Actor accepts the following input parameters:

Parameters

Actor Output Schema

The actor outputs the generated newsletter in the following format:

Output Fields

Error Output Schema

If an error occurs during newsletter generation, the actor will output:

Error Fields

Usage Examples

Running the Actor via Apify Console

  1. Navigate to the Newsletter AI Agent on the Apify platform
  2. Set the topic input parameter to your desired topic
  3. Click “Run” to start the actor
  4. Wait for the actor to complete
  5. View the results in the “Dataset” tab

Running the Actor via Apify API Client (Python)

Running the Actor via Apify API Client (JavaScript)

Actor Lifecycle

  1. The actor initializes and loads environment variables
  2. It processes the input parameters (using default if none provided)
  3. It creates a NewsletterCrew instance with the necessary agents
  4. The Researcher Agent gathers information about the topic
  5. The Writer Agent transforms the research into a newsletter draft
  6. The Editor Agent reviews and improves the draft
  7. The final newsletter is returned as output

Resource Usage

The Newsletter AI Agent performs web scraping and uses large language models, which can be resource-intensive. The actor typically takes 3-5 minutes to generate a newsletter, depending on the complexity of the topic and the amount of information available.

Next Steps