Skip to main content

Actors

An actor is a program packaged as a Docker image that scrapes or automates something. Every actor has an input schema (which generates its input form), a README, one or more versions, and optional pricing. You can run public actors from the Store, actors shared with you, and your own.

Actors are named username~name, for example lantfly~tiktok-scraper. The API accepts the actor's ID, this slug, the username/name form, or an alias (the actor page lists them under Also answers to:).

The Store​

Open Actors → Store in the Console. Each card shows the actor's title, rating (average stars and number of reviews), a Quality badge and its price on your plan.

  • Search by name and filter by category.
  • Sort by Best quality (the default), Most runs, Highest rated or Newest.

The quality score (0 to 100) is recomputed every night from the actor's recent success rate on other accounts' runs, its ratings, how recently it was maintained, and how many paying accounts use it. Deprecated actors score low.

With the API:

Search the Store
curl -s "https://lantfly.com/api/v3/actors?search=tiktok&sort=quality" \
-H "Authorization: Bearer $LANTFLY_TOKEN"

GET /api/v3/actors?my=1 lists your own actors instead (Actors → My actors in the Console).

Run an actor​

  1. Open the actor and stay on the Input tab.
  2. Fill in the form. List fields take one value per line: press Enter to add one, or paste several lines at once. Your last input for each actor is remembered in your browser; Reset to the example brings back the example input.
  3. Optionally change the Run options: Memory (MB), Timeout (seconds), and the cost caps Max items and Max cost per run (USD).
  4. Click Start. To keep this input for later, click Save as task instead (see Tasks).

The API tab of the actor shows ready-to-copy requests for this actor, such as "Start a run and wait for it". From code:

Start a run
curl -s -X POST "https://lantfly.com/api/v3/actors/lantfly~web-scraper/runs" \
-H "Authorization: Bearer $LANTFLY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": { "startUrls": [{ "url": "https://example.com" }], "maxPagesPerCrawl": 5 },
"options": { "memory_mb": 1024, "timeout_secs": 600, "max_items": 1000 }
}'
FieldMeaning
inputThe actor's input. It is checked against the input schema; a mismatch answers 422.
options.memory_mbMemory for the run. Defaults to the actor's own default; 128 MB to 8,192 MB by default.
options.timeout_secsTime limit, after which the run ends as TIMED-OUT. Defaults to the actor's own default.
options.buildA version number or build to run instead of the default version.
options.max_itemsCap on paid dataset items for this run.
options.max_total_charge_usdCap on pay-per-event and pay-per-result charges for this run. Compute is billed on top.
wait_for_finish0 to 60 seconds to wait for the run to finish before answering.
webhooksUp to 10 webhooks for this run only. See Webhooks.

What happens next is covered in Runs.

Versions​

An actor has one or more versions, numbered like 1.2. Each version points at an image tag and carries:

  • the input schema, dataset schema (dataset views shown on the run's Output tab) and output schema;
  • a changelog;
  • environment variables, up to 100 per version. Mark a variable as Secret and its value is stored encrypted, masked as *** in logs, and never shown again. Names cannot start with LANTFLY_, ACTOR_, CRAWLEE_ or other prefixes reserved by the platform;
  • standby settings (see Standby).

One version is the default build. New runs use it unless they name another one; runs that already started are not changed. On the Versions & builds tab you can Add version, Make default and delete versions other than the default.

Only people who can edit the actor see its environment variables.

Builds​

You can build your own actors on Lantfly instead of pushing a ready image:

  • From Git: on Versions & builds, click New build and give the Repository (a public HTTPS repository), Branch or tag, the Version, the Dockerfile and its Context. A successful build adds the version and, by default, makes it the default build.
  • From your machine: lantfly push with the CLI uploads your files and builds them.

Builds have a live log and can be aborted while queued or running. Only one build of an actor runs at a time.

To write an actor, see Build actors and the Actor SDK.

Sharing a private actor​

A private actor is visible only to its account. To let someone else run it, the owner or an admin of the owning account opens Versions & builds → Sharing and shares it with a person (by email) or with an organization they belong to.

  • People it is shared with can see and run the actor. Their runs are theirs and are billed to them.
  • Revoking a share refuses new runs at once; runs that already started finish.

Actors shared with you appear in your actor list and can be run like your own.

Reviews​

Public actors have a Reviews tab with the average rating, the distribution of stars and the reviews, newest first (or sorted by highest or lowest rating).

To write a review:

  • your account must have at least one finished, successful run of the actor (or a run that was charged);
  • you cannot review an actor of your own account or of an organization you share members with;
  • each account (personal or organization) writes one review per actor: 1 to 5 stars, an optional title (up to 120 characters) and text (up to 5,000 characters). You can edit or delete it later.

A new review may wait for moderation before it is shown; the Your review box says when it is pending or hidden. The actor's developer can post one reply under each review.

Pricing​

Every run pays for compute: compute units, where 1 CU is 1 GB of memory for 1 hour, at the price listed on your billing page. Proxy traffic through the Lantfly proxy is billed per GB.

On top of that, an actor's developer can set pay-per-result or pay-per-event prices:

ModelHow you are charged
Pay per resultA price per dataset item, the result_item event, counted when the run finishes.
Pay per eventA price per named event the actor reports while it runs, for example one per page opened or per profile read.

The Pricing card on the actor's Input tab shows the price for your plan, the base price and the price per tier.

  • Prices can differ by plan. A developer may set a lower price for higher plans. You pay your plan's tier price, or the base price when your tier has none.
  • The price is locked when the run starts. A price change only applies to runs that start after it.
  • You can cap the cost of each run. Max items (options.max_items) stops paying for results past that count. Max cost per run (options.max_total_charge_usd) stops counting events and results once the run's charges reach that amount. Leave them empty for no limit.
  • Charges never exceed what your account can spend. Events and results beyond your remaining usage, credit and overage room are not counted.
  • The run's Usage tab shows each charged event and its count; the API returns them in charged_event_counts.

A developer's price per event is at most $1.00, and per result at most $0.10.

Publishing a paid actor

If you publish a public actor with a price per result or per event, you earn a share of what other accounts are charged for those results and events (compute and proxy are not shared). See Billing & usage → Earnings in the Console and Billing.

Standby​

An actor version can run in standby mode: Lantfly keeps a warm run of the actor for your account and forwards HTTP requests sent to https://lantfly.com/api/v3/standby/:actor/... to the actor's web server, starting a run when needed. Standby runs are billed like any run and stop after an idle timeout.

Standby is turned on per version through the API (standby on PATCH /api/v3/actors/:actor/versions/:version):

FieldMeaning
is_enabledTurns standby on.
desired_idle_instances0 or 1; 1 keeps the run after the idle timeout.
max_requests_per_runMost requests one standby run handles (1 to 1,000, default 4).
idle_timeout_secsSeconds without requests before the run stops (30 to 86,400, default 300).
memory_mbytesMemory of standby runs.

Calling standby needs a token that may run actors; read-only tokens are refused. Up to 5 standby requests can wait at the same time per account.

Deprecated actors​

An actor marked Deprecated can still run, but its developer no longer recommends it. Look in its README for a replacement.