The forecast includes the available, matched, possible, delivered, and reserved units. It can also include all the contending line items and the available units for each targeting breakdown depending on the options set in the AvailabilityForecastOptions. By default, neither is included in the forecast.
You can refer to this sample java code of getAvailabilityForecast available in the ForecastService and all the available client libraries of the Ad Manager API. Hope this helps.
![]() |
Ad Manager API Team |
However, if you're interested in checking the available inventory for a specific set of criteria, you can do so by querying the ad units using the PQL statement and checking the forecasted inventory using the ForecastService . This is similar to what was discussed earlier regarding line items which is the Inventory shown in the check inventory feature of the UI for a lineitem. This forecast includes the available, matched, possible, delivered, and reserved units. You can refer to this sample java code of getAvailabilityForecast available in the ForecastService and all the available client libraries of the Ad Manager API.
targeting = { # Existing targeting parameters... 'customTargeting': custom_criteria_set }You can get the particular LineItem using this Python code sample by adding the filter. You may refer to the PQL guide for more information.
statement = ad_manager.StatementBuilder(version='v202311') .Where('Id = :line_item_id') .WithBindVariable('line_item_id', line_item_id) .Limit(1) .ToStatement()
![]() |
Ad Manager API Team |
![]() |
Ad Manager API Team |
[2025-08-14 16:49:12Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02qVZdo:ref" (ADR-00213051)
![]() |
Ad Manager API Team |
[2025-08-18 17:37:40Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02qVZdo:ref" (ADR-00213051)