This API exposes three ways to execute the Instagram followers-count Actor and retrieve results. The important domain concepts are Actor, Run, Dataset, and Key-value store. The Actor is the program you execute; a Run is a single execution of that Actor; runs may produce a Dataset (multiple result items) and/or write a value into the Actor’s Key-value store (single output values or files). Which operation you call depends entirely on which artifact you need and whether you want the call to wait until the run finishes.
How the domain is organized
-
An Actor is the scraping job (the Instagram followers-count scraper). A single run of that Actor produces a Run record, and the run can emit two kinds of artifacts: a Dataset (an ordered collection of items) and a Key-value store (a place for single values or blobs).
-
The three operations map to three common workflows:
run-sync-apify-instagram-followers-count-scraper: start the Actor, wait for it to finish, and return the Actor’s Key-value store OUTPUT in the response. Use this when the Actor writes a single result (for example: a follower count, a summary object) to the key-value store.run-sync-get-dataset-items-apify-instagram-followers-count--3f77: start the Actor, wait for it to finish, and return the Actor’s Dataset items in the response. Use this when the Actor produces structured rows (for example: per-account result objects) that you want as an array.runs-sync-apify-instagram-followers-count-scraper: start the Actor and return the Run metadata immediately (run id, start time, status, etc.). Use this when you only need confirmation that the run started or need the run id for later inspection.
Entry points — what to call first
Decide what the user actually asked for, then pick the matching entry point:
-
If the user asks for a single follower count or a single summary value, call
run-sync-apify-instagram-followers-count-scraperwith the Actor input inbody. The synchronous call waits and should return the Key-value store OUTPUT where that single value is written. -
If the user asks for a list of results, detailed rows, or bulk output (multiple accounts), call
run-sync-get-dataset-items-apify-instagram-followers-count--3f77. The response will contain the dataset items array rather than a key-value value. -
If the user only wants the run started (for example, to schedule or trigger work and record the run id), call
runs-sync-apify-instagram-followers-count-scraper. This returns the run metadata; it does not wait for final artifacts.
Always supply the token parameter (the Apify token) and provide the Actor input JSON in the operation’s body. Inspect the Actor’s input schema before forming body so you know the expected keys (usernames, input array, proxy settings, limits, etc.).
Typical user tasks and the sequence to accomplish them
-
Get follower count for one Instagram handle
- Call
run-sync-apify-instagram-followers-count-scraperwithbodycontaining the target handle(s) per the Actor’s input schema and thetoken. - Extract the follower count from the response
body(the Actor’s Key-value store OUTPUT). If the response shape is unexpected, inspect the returnedbodyto locate the stored key (commonly namedOUTPUTor similar).
- Call
-
Get structured results for many handles
- Call
run-sync-get-dataset-items-apify-instagram-followers-count--3f77withbodycontaining the list of handles andtoken. - Use the returned array of dataset items as the canonical list of per-account results.
- Call
-
Trigger a run and keep the run id for later
- Call
runs-sync-apify-instagram-followers-count-scraperwithbodyandtoken. - Record the run id from the returned run metadata. Other API operations (if available) can later use that id to fetch logs, dataset contents, or key-value entries.
- Call
Response expectations and what to look for
-
The
run-sync-*operations wait for the Actor to finish. Successful responses typically include the artifact you requested (dataset items or key-value OUTPUT) inbody. If the Actor fails or times out, thebodywill indicate error details instead of the expected artifact. -
runs-sync-*returns run metadata immediately. Look for the run identifier andstatusfields to determine whether the run started successfully. That run id is the handle for any follow‑up retrieval operations. -
The concrete structure of
bodyis Actor-specific. Expect variations: some Actors place a single JSON object under anOUTPUTkey, others return a plain value, others return an array of items. Inspect the returnedbodyto discover where the data lives.
Non-obvious gotchas and operational tips
-
Always pass the
tokenparameter. Every operation requires it explicitly. -
Choose the synchronous vs. metadata operation intentionally:
- Use the synchronous variants when the user needs final results in one step. These calls will wait for completion and return artifacts.
- Use the runs/metadata variant when you only need confirmation the run started or you want to manage long-running work externally.
-
The Actor may write results to either a Dataset or a Key-value store (or both). If a single value is expected (e.g., follower count), prefer the Key-value store sync call. If per-account rows are expected, prefer the Dataset sync call.
-
Response shapes are not standardized across actors. Do not assume a field name for follower count—inspect response
bodyfor the actual key. Typical places to check: top-levelbody,body.items(for datasets), or anOUTPUTkey (for key-value store outputs). -
Synchronous runs can time out if the Actor takes very long. If the response indicates the run is still in progress or shows an error, start a run with the metadata operation and use the run id to fetch results later (if retrieval endpoints exist).
-
If a run fails, the synchronous endpoints will return error information in the
body. Look forstatusor error details to decide whether to retry with adjusted input.
Quick decision guide
- Need a single scalar or summary now →
run-sync-apify-instagram-followers-count-scraper(Key-value OUTPUT). - Need a list of detailed rows/items →
run-sync-get-dataset-items-apify-instagram-followers-count--3f77(Dataset items). - Only need the run id/metadata (non-blocking) →
runs-sync-apify-instagram-followers-count-scraper.
Use the operation whose returned artifact matches what the user asked for; inspect the Actor input schema before calling so the body contains the correct keys (usernames, arrays, or other Actor-specific options).