type TrafficDataRequest (v202408)
Stay organized with collections
Save and categorize content based on your preferences.
Defines a segment of traffic for which traffic data should be returned.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202408
Field
|
targeting
|
Targeting
The TargetingDto that defines a segment of traffic.
This attribute is required.
|
requestedDateRange
|
DateRange
The date range for which traffic data are requested. This range may
cover historical dates, future dates, or both.
The data returned are not guaranteed to cover the entire
requested date range. If sufficient data are not available to cover
the entire requested date range, a response may be returned with a
later start date, earlier end date, or both.
This attribute is required.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003eTrafficDataRequest defines a segment of traffic for which data should be returned.\u003c/p\u003e\n"],["\u003cp\u003eIt uses Targeting to define the traffic segment and DateRange to specify the requested period.\u003c/p\u003e\n"],["\u003cp\u003eThe returned data may not cover the entire requested date range due to data availability.\u003c/p\u003e\n"]]],["The `ForecastService` utilizes the `getTrafficData()` function, which relies on the `TrafficDataRequest`. This request requires two key fields: `targeting`, a `TargetingDto` that defines the traffic segment, and `requestedDateRange`, a `DateRange` specifying the period for data. Data returned may not cover the whole `requestedDateRange`, and can include historical, future or both types of dates. Both attributes are mandatory for a request.\n"],null,["# type TrafficDataRequest (v202408)\n\n**Service** \n**ForecastService** **Dependencies** \n[getTrafficData()](/ad-manager/api/reference/v202408/ForecastService#getTrafficData) \n▼\n**TrafficDataRequest**\n\nDefines a segment of traffic for which traffic data should be returned.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202408`\n\n| Field ----- ||\n|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `targeting` | ` `[Targeting](/ad-manager/api/reference/v202408/ForecastService.Targeting)` ` The `TargetingDto` that defines a segment of traffic. This attribute is required. |\n| ### `requestedDateRange` | ` `[DateRange](/ad-manager/api/reference/v202408/ForecastService.DateRange)` ` The date range for which traffic data are requested. This range may cover historical dates, future dates, or both. The data returned are not guaranteed to cover the entire requested date range. If sufficient data are not available to cover the entire requested date range, a response may be returned with a later start date, earlier end date, or both. \u003cbr /\u003e This attribute is required. |"]]