type TrafficDataRequest (v202411)
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/v202411
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\u003eThe ForecastService, specifically the getTrafficData() method, allows you to retrieve traffic data for defined segments.\u003c/p\u003e\n"],["\u003cp\u003eTraffic data is requested by specifying targeting criteria using the \u003ccode\u003eTargetingDto\u003c/code\u003e object and a date range using the \u003ccode\u003eDateRange\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eWhile the requested date range can span past, present, and future dates, returned data might not cover the entire range due to data availability.\u003c/p\u003e\n"]]],["The `ForecastService` utilizes the `getTrafficData()` function to retrieve traffic data. It requires a `TrafficDataRequest`, which defines the segment of traffic. This request mandates two fields: `targeting`, specifying the traffic segment through `TargetingDto`, and `requestedDateRange`, indicating the desired period via `DateRange`. Data may not cover the entire range if insufficient, possibly returning adjusted start or end dates. The namespace for this service is `https://www.google.com/apis/ads/publisher/v202411`.\n"],null,["# type TrafficDataRequest (v202411)\n\n**Service** \n**ForecastService** **Dependencies** \n[getTrafficData()](/ad-manager/api/reference/v202411/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/v202411`\n\n| Field ----- ||\n|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `targeting` | ` `[Targeting](/ad-manager/api/reference/v202411/ForecastService.Targeting)` ` The `TargetingDto` that defines a segment of traffic. This attribute is required. |\n| ### `requestedDateRange` | ` `[DateRange](/ad-manager/api/reference/v202411/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. |"]]