I am attempting to extract a series of traffic estimations for
keywords, using the same location filter I could use on the traffic
estimator service page. (location: US) with the new 201109 API release
(
http://code.google.com/apis/adwords/docs/reference/v201109/TrafficEstimatorService.CampaignEstimateRequest.html
).
Looking up the CriteriaID for the united states on
http://code.google.com/apis/adwords/docs/appendix/countrycodes.html, I
see that the CriteriaID is 2840.
With this information, I constructed the following SOAP message:
?xml version=1.0 encoding=UTF-8?
soap:Envelope xmlns:namesp1=https://adwords.google.com/api/adwords/o/
v201109 xmlns:namesp2=https://adwords.google.com/api/adwords/cm/
v201109 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
soap:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
soap:Header
namesp1:RequestHeader
namesp2:authToken/namesp2:authToken
namesp2:clientCustomerId**/
namesp2:clientCustomerId
namesp2:developerToken**/
namesp2:developerToken
namesp2:userAgent**/namesp2:userAgent
/namesp1:RequestHeader
/soap:Header
soap:Body
namesp1:get
namesp1:selector
namesp1:campaignEstimateRequests
namesp1:EstimateRequest.TypeCampaignEstimateRequest/
namesp1:EstimateRequest.Type
namesp1:adGroupEstimateRequests
namesp1:EstimateRequest.TypeAdgroupEstimateRequest/
namesp1:EstimateRequest.Type
namesp1:keywordEstimateRequests
namesp1:EstimateRequest.TypeKeywordEstimateRequest/
namesp1:EstimateRequest.Type
namesp1:keyword
namesp2:textla vega isd/namesp2:text
namesp2:matchTypeBROAD/namesp2:matchType
/namesp1:keyword
namesp1:maxCpc
namesp2:ComparableValue.TypeMoney/
namesp2:ComparableValue.Type
namesp2:microAmount2/
namesp2:microAmount
/namesp1:maxCpc
/namesp1:keywordEstimateRequests
/namesp1:adGroupEstimateRequests
namesp1:criteria
namesp2:id2840/namesp2:id
namesp2:Criterion.TypeLocation/
namesp2:Criterion.Type
/namesp1:criteria
/namesp1:campaignEstimateRequests
/namesp1:selector
/namesp1:get
/soap:Body
/soap:Envelope
I left the campaign and adgroup ids blank, because I want traffic
estimates only for the keyword, and I added a criteria at the
campaignEstimateRequest level, so it affects all the keywords.
However, when sending this message, I get an exception:
ns2:ApplicationException.TypeApiException/
ns2:ApplicationException.Type
ns2:errors xsi:type=ns2:RequestError xmlns:xsi=http://
www.w3.org/2001/XMLSchema-instance
ns2:fieldPathselector.campaignEstimateRequests[0].criteria.criteria[0]/
ns2:fieldPath
ns2:triggercom.google.ads.api.services.campaignmgmt.common.criterion.Criterion/
ns2:trigger
ns2:errorStringRequestError.UNSUPPORTED_TYPE_IS_USED/
ns2:errorString
ns2:ApiError.TypeRequestError/ns2:ApiError.Type
ns2:reasonINVALID_INPUT/ns2:reason
/ns2:errors
If I omit the criteria field, the response is as expected, and I get a
global traffic estimation for the keyword.
Apparently the criteria has an invalid type, but the documentation
specifies that Language and Location are valid criteria to use at this
point. I've been trying to figure this out for a day now, and the
documentation isn't terribly helpful. Can anybody spot what's wrong?
Benjamin
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en