Search + K

Command Palette

Search for a command to run...

Sign In

The actor set here runs the Apify Threads profile scraper and exposes three ways to start runs and retrieve results. Two operations execute the actor and wait for completion, returning the actor’s outputs directly; the third starts a run and returns the run metadata (IDs and locations) so you can inspect outputs later. Always provide an Apify token and the actor body input exactly as the actor expects.

Key entities and how they relate

  • Run: an execution of the actor. A run may produce a Dataset and/or write objects into a Key-Value Store. The run response (the RunsResponseSchema) contains identifiers and locations for those outputs when available.
  • Dataset: an ordered collection of items produced by the actor. Use it when the actor writes multiple records (rows/objects) as the primary result.
  • Key-Value Store (KVS): a simple store for named values. The actor used here writes a single final payload under the OUTPUT key; use the KVS-based operation when you expect a single aggregated result.

These three operations map directly to those entities:

  • run-sync-apify-threads-profile-api-scraper — runs the actor, waits for completion, and returns the KVS OUTPUT value in body.
  • run-sync-get-dataset-items-apify-threads-profile-api-scraper — runs the actor, waits for completion, and returns the actor’s dataset items in body.
  • runs-sync-apify-threads-profile-api-scraper — starts a run and returns the run metadata (IDs, storage links) in body as RunsResponseSchema.

Entry points — what to call first

Decide whether you need immediate data or just run metadata:

  • If the user explicitly wants the scraped data immediately and the actor writes results into the Key-Value Store under OUTPUT, call run-sync-apify-threads-profile-api-scraper. It waits for the run to complete and returns the OUTPUT value in the response body.

  • If the user expects multiple items/rows (an array of records), call run-sync-get-dataset-items-apify-threads-profile-api-scraper to receive the actor’s dataset items in the response body when the run completes.

  • If the user only needs the run ID, storage IDs, or wants to inspect where outputs will land (for example to fetch logs or datasets later), call runs-sync-apify-threads-profile-api-scraper. The returned RunsResponseSchema contains the run identifier and pointers to Dataset/KVS, which tell you whether you should follow up with a dataset or KVS retrieval.

Always include the actor input in body. Inspect the operation’s input schema (the operation signature) to see which input fields the actor requires (actor identifier, start URLs, limits, credentials, etc.).

Common tasks and step-by-step choices

  • Return a single aggregated profile result to a user now:

    • Use run-sync-apify-threads-profile-api-scraper. The response body will be the KVS OUTPUT payload if the actor produced it.
  • Return multiple profile records (rows) to a user now:

    • Use run-sync-get-dataset-items-apify-threads-profile-api-scraper. The response body will contain dataset items returned by the actor at completion.
  • Start a run and report identifiers or let another process fetch results later:

    • Use runs-sync-apify-threads-profile-api-scraper. Inspect the returned RunsResponseSchema in body to find dataset IDs or KVS locations.
  • Decide whether to call a dataset vs KVS operation when uncertain:

    • If unsure how the actor writes outputs, call runs-sync-apify-threads-profile-api-scraper first to get the run metadata. Use the dataset or KVS follow-up that the run metadata indicates, or choose the sync operation that returns the desired output directly.

Response semantics — what to look for in results

  • All three responses include a top-level status string and a body:

    • For the two sync-run operations, body holds the actor-produced payload (KVS OUTPUT or dataset items) when the run completes.
    • For runs-sync-apify-threads-profile-api-scraper, body is a RunsResponseSchema containing the run ID and storage references (dataset ID, KVS IDs) when available.
  • If body is empty or not the expected shape, check the run metadata from the runs-sync operation to see whether the actor produced a dataset or wrote to KVS and whether any error logs are present. The run metadata is the authoritative source for where outputs live.

Gotchas and non-obvious behavior

  • Token is always required: every call requires the Apify token parameter. Provide the correct token with appropriate permissions for the actor and storage.

  • Two flavors of "sync" behavior:

    • The two operations whose names begin with run-sync wait for the actor to finish and return outputs inline. Use them when users want data immediately in the response.
    • The runs-sync operation returns run metadata (including run ID and storage links). Use it when you only need the run identifier or want to inspect where outputs went before fetching them.
  • The actor may write either to Dataset, to the Key-Value Store OUTPUT, or to both. Don’t assume which one is used—inspect run metadata when in doubt or use the appropriate sync operation based on the expected output shape.

  • Large outputs and run duration: since the two run-sync operations wait for completion, they can take as long as the actor needs to scrape and produce results. If a run typically takes long, prefer starting the run and returning the run metadata (via runs-sync) so the caller can retrieve results later.

  • Empty results can be valid: an empty dataset or missing OUTPUT may mean the actor ran successfully but found no data. Confirm by checking run metadata for logs or error indicators.

  • Input must match the actor’s expected schema: supply the actor’s required input fields in body exactly as specified by the operation’s input schema. Missing or malformed inputs will cause the run to fail or produce no data.

Quick decision checklist

  • Need immediate, single aggregated payload -> run-sync-apify-threads-profile-api-scraper.
  • Need immediate array of items -> run-sync-get-dataset-items-apify-threads-profile-api-scraper.
  • Need run ID, storage IDs, or want to delay fetching outputs -> runs-sync-apify-threads-profile-api-scraper.

Use the run metadata in RunsResponseSchema to confirm where outputs are stored before choosing dataset vs key-value retrieval. Provide the correct token and the actor input body as required by the operation signature.