我正在开发.net应用程序,我需要获取搜索量或平均每次点击费用等关键字的一些信息...我已将此网络服务添加到我的应用程序中 https://adwords.google.com/api/adwords/o/v201309/TargetingIdeaService?wsdl(链接到TargetingIdeaService)
我编写了以下代码,但是我迷路了,我不知道如何发送请求以及如何获取查询结果......(AdwordsService)是Web服务的名称。
Dim Keywords(2) As String
Keywords(0) = "Domain Tester"
Keywords(1) = "Domain Appraisal"
Dim Selector As New AdwordsService.TargetingIdeaSelector()
Selector.requestType = AdwordsService.RequestType.IDEAS
Selector.ideaType = AdwordsService.IdeaType.KEYWORD
Dim Ar(4) As AdwordsService.AttributeType
Ar(0) = AdwordsService.AttributeType.KEYWORD_TEXT
Ar(1) = AdwordsService.AttributeType.COMPETITION
Ar(2) = AdwordsService.AttributeType.SEARCH_VOLUME
Ar(3) = AdwordsService.AttributeType.AVERAGE_CPC
Selector.requestedAttributeTypes = Ar
Dim LangageParam = New AdwordsService.LanguageSearchParameter()
Dim English = New AdwordsService.Language()
English.id = 1000
Dim LangArray(1) As AdwordsService.Language
LangArray(0) = English
LangageParam.languages = LangArray
Dim relatedToQuerySearchParameter As New AdwordsService.RelatedToQuerySearchParameter()
relatedToQuerySearchParameter.queries = Keywords
Dim searchParameters(2) As AdwordsService.SearchParameter
searchParameters(0) = relatedToQuerySearchParameter
searchParameters(1) = LangageParam
Selector.searchParameters = searchParameters
Selector.paging = New AdwordsService.Paging()