This actor-focused API runs an Apify Instagram tagged-scraper and gives two synchronous flavors of results plus a fire-and-forget start. The important concepts are Actor run, dataset items, and the Actor run Key-Value store OUTPUT. Each operation requires the Apify token and an actor body that must conform to the actor's InputSchema (inspect the schema before calling to learn required fields like tag names, limits, proxy settings, etc.).
How the domain is organized
- An Actor execution produces two common result locations: the Actor dataset (a list of items) and the Actor Key-Value store (a named key-value map). This actor stores structured scraping results in the dataset and often a small summary or single JSON object under the
OUTPUTkey in the Key-Value store. - A Run is the execution instance of the Actor. The operations exposed here either start a run and return the run metadata immediately, or start a run and wait until completion and then return data from the dataset or Key-Value store.
- No repository/owner-style IDs are required. The primary inputs you must supply are the Apify
tokenand thebodymatchingInputSchema(the actor's input fields). The run metadata returned by the start operation can be stored externally if you need to reference this run later.
Entry points — which operation to call first
Choose the operation according to what you need back and whether you want to wait for completion:
-
To start a run and return the run metadata immediately (no waiting for scraping to finish), call
runs-sync-apify-instagram-tagged-scraper. The response body followsRunsResponseSchemaand contains the run id and run status. -
To start a run and wait until it finishes, returning the Actor Key-Value store
OUTPUTvalue, callrun-sync-apify-instagram-tagged-scraper. Use this when the user expects a compact summary or single-object result that the actor writes toOUTPUT. -
To start a run and wait until it finishes, returning the Actor dataset items, call
run-sync-get-dataset-items-apify-instagram-tagged-scraper. Use this when the user asks for the full structured items the scraper produced.
Always inspect the actor's InputSchema before populating body. Many common options (tag name, maximum items to fetch, date ranges, proxy configuration) live there; providing sensible limits prevents unbounded runs.
Common user tasks and the operation to use
-
Scrape posts for a given hashtag and return structured records: call
run-sync-get-dataset-items-apify-instagram-tagged-scraperwith thebodycontaining the tag and any limits. The operation waits for completion and returns the dataset items in the responsebody. -
Get a small summary (for example, counts or a single JSON summary the actor writes to
OUTPUT): callrun-sync-apify-instagram-tagged-scraper. The responsebodycontains the Key-Value storeOUTPUTcontent. -
Start a scrape but don't wait for the results (create a run record only): call
runs-sync-apify-instagram-tagged-scraper. Use this when you want a run id immediately and will handle results outside this API (note: this API surface does not provide separate follow-up fetch operations for runs or datasets). -
If a user asks for CSV/exports: request the dataset items via
run-sync-get-dataset-items-apify-instagram-tagged-scraperand perform conversion to CSV locally from the returned item list (the operation returns the items directly). If the actor writes an export file to Key-Value store, fetchOUTPUTviarun-sync-apify-instagram-tagged-scraper.
Response shapes and where to look for results
-
run-sync-get-dataset-items-apify-instagram-tagged-scraperreturns astatusand abodycontaining the dataset items. Inspect the returnedbodydirectly for the list of scraped records. -
run-sync-apify-instagram-tagged-scraperreturns astatusand abodythat contains the Key-Value storeOUTPUTvalue (often a summary object). Look for theOUTPUTstructure in the responsebody. -
runs-sync-apify-instagram-tagged-scraperreturns run metadata underRunsResponseSchema. Use fields like the run id and run status if you need to record or reference the run.
Always examine the returned status and body to decide what to present to the user; the exact item fields and summary structure come from the actor and are visible in the returned body.
Non-obvious patterns and gotchas
-
These operations are the only run-related endpoints available here: they either block until completion (the two
run-sync-...operations) or return metadata immediately (runs-sync-...). There is no provided separate "fetch dataset after run" or "check run status later" operation in this set. If the user needs to poll or retrieve results asynchronously outside the synchronous response, plan for that limitation — capture run metadata fromruns-sync-...if you want a record of the run id. -
Inspect
InputSchemabefore populatingbody. The actor commonly exposes limits such asmaxItemsor selectors for date windows; supplying those reduces runtime and avoids very large datasets that can cause long waits or timeouts. -
Choose the result flavor deliberately:
- Use
run-sync-get-dataset-items-...when the user expects the full list of scraped records. - Use
run-sync-apify-instagram-tagged-scraperwhen the user expects a small summary or single JSON underOUTPUT. - Use
runs-sync-...when you only want to start the job and capture run metadata immediately.
- Use
-
Synchronous calls may take time. If the actor will scrape many items or large date ranges,
run-sync-*may block for a long time. Prefer limiting the scope inbody(if supported) or starting the run withruns-sync-...to obtain a run id and handle results through other tooling if available. -
Authentication is always required via the
tokenparameter. Provide a valid Apify token with appropriate permissions for the actor run. -
Do not assume dataset pagination or unlimited returns from
run-sync-get-dataset-items-...; if the actor produces extremely large datasets the synchronous response may be large. UseInputSchemalimits where available.
Quick decision checklist
When a user asks to scrape or retrieve Instagram-tagged data, decide as follows and then call the matching operation:
- Need structured list of scraped items now →
run-sync-get-dataset-items-apify-instagram-tagged-scraper(setbodyperInputSchema). - Need the actor's short summary / single JSON output →
run-sync-apify-instagram-tagged-scraper. - Just start the run and record run id →
runs-sync-apify-instagram-tagged-scraper(returns run metadata).
Reference the actor's InputSchema for required fields and sensible limits before calling. Inspect the returned status and body to extract dataset items, the Key-Value OUTPUT, or run metadata as appropriate.