Why is the "usageTotalUsd" Field Missing Sometimes...
# apify-platform
y
The [
usageTotalUsd
](https://docs.apify.com/api/client/js/reference/interface/ActorRun#usageTotalUsd) field of an
ActorRun
is sometimes defined and sometimes missing. I can't tell the rhyme or reason for when this happens. For example,
Copy code
js
const actorRun = await actorClient.call()
console.log(actorRun.usageTotalUsd)
may log "undefined" or may log a number. What is reason behind the
usageTotalUsd
field being missing sometimes? Thank you!
h
Someone will reply to you shortly. In the meantime, this might help: -# This post was marked as solved by YBtheS. [View answer]().
l
Just a very unlikely guess, but perhaps the run you're checking has not finished yet?
l
The field is not present for Actors that use PPR or PPE pricing models. This is gonna change in the future but for now the field is returned only for a PPU run, with a breakdown of the usage.
y
Oh okay, thank you. For those with the same issue using PPR, it seems you can get the total run cost by doing
actorRun.pricingInfo.pricePerUnitUsd
multiplied the number of results. I have not tested this though. I’m just guessing.
l
Yeah, you can technically do the same with PPE since you have the breakdown of all the events, it's just way more tedious 😅