I am trying to use the TrafficEstimatorService to return the Max CPC
(upperCPC) for a list of keywords.  But I am not having any luck
returning and values other than 0.  I have manually tried keywords
that I know have enough data and should return a value, but I just get
0's.

Here is my code:

---------------------------------------------------------------------------

Public Shared Function GetKeywordEstimates(ByVal Keyword As String) As
String

        Dim headers As New System.Collections.Generic.Dictionary(Of
String, String)()
        headers.Add("email", "EMAIL")
        headers.Add("password", "PASSWORD")
        headers.Add("useragent", "AGENT")
        headers.Add("developerToken", "TOKEN")
        headers.Add("clientEmail", "CLIENTEMAIL")

        Dim user As New AdWordsUser(headers)

        Dim service As v13.TrafficEstimatorService =
CType(user.GetService(AdWordsService.v13.TrafficEstimatorService),
v13.TrafficEstimatorService)

        ' Set the attributes of the keywords to be estimated.
        Dim myKeyword As New v13.KeywordRequest()
        myKeyword.text = Keyword
        'myKeyword.maxCpc = 50000
        'myKeyword.maxCpcSpecified = True
        myKeyword.type = v13.KeywordType.Broad
        myKeyword.typeSpecified = True

        ' To estimate more keywords, create more KeywordRequest
objects
        ' and add them to the list of keyword to estimate.
        Dim keyReqs() As v13.KeywordRequest = {myKeyword}

        ' Estimate traffic for given keywords.
        Dim estimates() As v13.KeywordEstimate =
service.estimateKeywordList(keyReqs)

        Dim Results As String = ""

        If estimates IsNot Nothing Then

            For i As Integer = 0 To estimates.Length - 1

                Dim estimate As v13.KeywordEstimate = estimates(i)
                Results += estimate.upperCpc.ToString & ", " &
estimate.lowerCpc.ToString

            Next i

        Else
        End If

        Return Results

End Function

---------------------------------------------------------------------------

Is this service no longer avail?  Or perhaps I am not sending the
AdwordsUser data over properly?  I dont get any errors, just no
values.

Any help is GREATLY appreciated.

John

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to