Skip to main content

Get run

GET 

https://api.apify.com/v2/actor-runs/:runId

This is not a single endpoint, but an entire group of endpoints that lets you retrieve the run or any of its default storages.

The endpoints accept the same HTTP methods and query parameters as the respective storage endpoints.

The base path that represents the Actor run object is:

/v2/actor-runs/{runId}{?token}

In order to access the default storages of the Actor run, i.e. log, key-value store, dataset and request queue, use the following endpoints:

  • /v2/actor-runs/{runId}/log{?token}
  • /v2/actor-runs/{runId}/key-value-store{?token}
  • /v2/actor-runs/{runId}/dataset{?token}
  • /v2/actor-runs/{runId}/request-queue{?token}

These API endpoints have the same usage as the equivalent storage endpoints.

For example, /v2/actor-runs/{runId}/key-value-store has the same HTTP method and parameters as the Key-value store object endpoint.

Additionally, each of the above API endpoints supports all sub-endpoints of the original one:

Log

  • /v2/actor-runs/{runId}/log Log

Key-value store

  • /v2/actor-runs/{runId}/key-value-store/keys{?token} Key collection
  • /v2/actor-runs/{runId}/key-value-store/records/{recordKey}{?token} Record

Dataset

Request queue

For example, to download data from a dataset of the Actor run in XML format, send HTTP GET request to the following URL:

https://api.apify.com/v2/actor-runs/{runId}/dataset/items?format=xml

In order to save new items to the dataset, send HTTP POST request with JSON payload to the same URL.

Gets an object that contains all the details about a specific run of an Actor.

By passing the optional waitForFinish parameter the API endpoint will synchronously wait for the run to finish. This is useful to avoid periodic polling when waiting for Actor run to complete.

This endpoint does not require the authentication token. Instead, calls are authenticated using a hard-to-guess ID of the run. However, if you access the endpoint without the token, certain attributes, such as usageUsd and usageTotalUsd, will be hidden.

Request

Path Parameters

    runId stringrequired

    Run ID.

Query Parameters

    waitForFinish double

    The maximum number of seconds the server waits for the run to finish. By default it is 0, the maximum value is 60. If the build finishes in time then the returned run object will have a terminal status (e.g. SUCCEEDED), otherwise it will have a transitional status (e.g. RUNNING).

Responses

Response Headers
    Schema
      data objectrequired
      idstringrequired
      Example: HG7ML7M8z78YcAPEB
      actIdstringrequired
      Example: HDSasDasz78YcAPEB
      userIdstringrequired
      Example: 7sT5jcggjjA9fNcxF
      actorTaskIdstringnullable
      Example: KJHSKHausidyaJKHs
      startedAtstringrequired
      Example: 2019-11-30T07:34:24.202Z
      finishedAtstringrequired
      Example: 2019-12-12T09:30:12.202Z
      statusstringrequired
      Example: RUNNING
      statusMessagestringnullable
      Example: Actor is running
      isStatusMessageTerminalbooleannullable
      Example: false
      meta objectrequired
      originstringrequired

      Possible values: [DEVELOPMENT, WEB, API, SCHEDULER, TEST, WEBHOOK, ACTOR, CLI, STANDBY]

      pricingInfo object
      pricingModel

      Possible values: [PAY_PER_EVENT, PRICE_PER_DATASET_ITEM, FLAT_PRICE_PER_MONTH, FREE]

      apifyMarginPercentagenumberrequired

      In [0, 1], fraction of pricePerUnitUsd that goes to Apify

      createdAtdate-timerequired

      When this pricing info record has been created

      startedAtdate-timerequired

      Since when is this pricing info record effective for a given Actor

      notifiedAboutFutureChangeAtdate-timenullable
      notifiedAboutChangeAtdate-timenullable
      reasonForChangestringnullable
      pricingModelstringrequired

      Possible values: [PAY_PER_EVENT]

      pricingPerEvent objectrequired
      actorChargeEvents object
      property name* ActorChargeEvent
      eventPriceUsdnumberrequired
      eventTitlestringrequired
      eventDescriptionstringrequired
      minimalMaxTotalChargeUsdnumbernullable
      stats objectrequired
      inputBodyLennumber
      Example: 240
      restartCountnumberrequired
      Example: 0
      resurrectCountnumberrequired
      Example: 2
      memAvgBytesnumber
      Example: 267874071.9
      memMaxBytesnumber
      Example: 404713472
      memCurrentBytesnumber
      Example: 0
      cpuAvgUsagenumber
      Example: 33.7532101107538
      cpuMaxUsagenumber
      Example: 169.650735534941
      cpuCurrentUsagenumber
      Example: 0
      netRxBytesnumber
      Example: 103508042
      netTxBytesnumber
      Example: 4854600
      durationMillisnumber
      Example: 248472
      runTimeSecsnumber
      Example: 248.472
      metamorphnumber
      Example: 0
      computeUnitsnumberrequired
      Example: 0.13804
      chargedEventCounts object
      property name* ActorChargeEvent
      eventPriceUsdnumberrequired
      eventTitlestringrequired
      eventDescriptionstringrequired
      options objectrequired
      buildstringrequired
      Example: latest
      timeoutSecsnumberrequired
      Example: 300
      memoryMbytesnumberrequired
      Example: 1024
      diskMbytesnumberrequired
      Example: 2048
      buildIdstringrequired
      Example: 7sT5jcggjjA9fNcxF
      exitCodenumbernullable
      Example: 0
      defaultKeyValueStoreIdstringrequired
      Example: eJNzqsbPiopwJcgGQ
      defaultDatasetIdstringrequired
      Example: wmKPijuyDnPZAPRMk
      defaultRequestQueueIdstringrequired
      Example: FL35cSF7jrxr3BY39
      buildNumberstringrequired
      Example: 0.0.36
      containerUrlstringrequired
      Example: https://g8kd8kbc5ge8.runs.apify.net
      isContainerServerReadybooleannullable
      Example: true
      gitBranchNamestringnullable
      Example: master
      usage object
      oneOf
      usageTotalUsdnumbernullable
      Example: 0.2654
      usageUsd object
      oneOf

    Authorization: http

    name: httpBearertype: httpscheme: bearerdescription: API authentication token.
    apify runs info <RUN ID>
    curl -L 'https://api.apify.com/v2/actor-runs/:runId' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer <token>'
    Request Collapse all
    Base URL
    https://api.apify.com
    Auth
    Parameters
    — pathrequired
    — query
    ResponseClear

    Click the Send API Request button above and see the response here!