TargetingIdeaService values differs from web interface

177 views
Skip to first unread message

Paul S

unread,
Jun 19, 2013, 3:44:54 PM6/19/13
to adwor...@googlegroups.com
Last week I had written a script to get Local and Global Search Volumes, CPC and Competition values using TargetingIdeaService.  I'm using API v201302, and utilize NetworkSearchParameter to exclude "targetSearchNetwork", and LocationSearchParameter to find local values.  Last week I seem to have had this working, the values being returned matched those in the Keyword Tool.  However I noticed today the values were different, and I cannot find the reason for the discrepancy. 

This is the relevant code I'm using to fetch Local SearchVol, CPC and Competition:

  // Get the service, which loads the required classes.
  $targetingIdeaService = $user->GetService('TargetingIdeaService', 'v201302');

  // Create selector.
  $selector = new TargetingIdeaSelector();
  $selector->requestType = 'STATS';
  $selector->ideaType = 'KEYWORD';
  $selector->requestedAttributeTypes = array('KEYWORD_TEXT', 'SEARCH_VOLUME', 'AVERAGE_CPC', 'COMPETITION');

  // Create related to query search parameter, performs EXACT queries
  $relatedToQuerySearchParameter = new RelatedToQuerySearchParameter();
  $relatedToQuerySearchParameter->queries = array('network equipment','electricity','skiing');
  $selector->searchParameters[] = $relatedToQuerySearchParameter;

  // Exclude Search Partners from results
  $networkSearchParameter = new NetworkSearchParameter();
  $networkSetting = new networkSetting();
  $networkSetting->targetGoogleSearch=true;
  $networkSetting->targetSearchNetwork=false;
  $networkSetting->targetContentNetwork=false;
  $networkSetting->targetPartnerSearchNetwork=false;
  $networkSearchParameter->networkSetting = $networkSetting;
  $selector->searchParameters[] = $networkSearchParameter;

  // Set location to US only
  $locationTargetParameter = new LocationSearchParameter();
  $unitedStates = new Location();
  $unitedStates->id = 2840;
  $locationTargetParameter->locations[] = $unitedStates;
  $selector->searchParameters[] = $locationTargetParameter;

// Set selector paging (required by this service).
  $selector->paging = new Paging(0, AdWordsConstants::RECOMMENDED_PAGE_SIZE);

  do {
    // Make the get request.
    $page = $targetingIdeaService->get($selector);
    // Data is printed here... 
  } while ($page->totalNumEntries > $selector->paging->startIndex);


The resulting return values for my test keywords are:

'network equipment': CPC=$5.13, SearchVol=390, Comp=0.925299
'electricity': CPC=$3.57, SearchVol=49500, Comp=0.176958
'skiing': CPC=$2.98, SearchVol=33100, Comp=0.028606

The values I see on the web interface when I search for the same keywords, as Exact, location set to US and all other filters off:

'network equipment': CPC=$7.97, SearchVol=320, Comp=High
'electricity': CPC=$5.99, SearchVol=33100, Comp=Low
'skiing': CPC=$3.27, SearchVol=22200, Comp=Low

All the values I get from the API but Competition are wrong, however this exact script was reporting the same values less than a week ago.  I've tried changing the NetworkSearchParameter settings and location settings and simply cannot find what is causing my values to differ from the web interface. 

I'm at a loss to explain why this worked before and doesn't anymore.  Can somebody explain what I may have done wrong, or why this isn't working anymore? 

Thank you

Danial Klimkin

unread,
Jun 24, 2013, 8:00:07 AM6/24/13
to adwor...@googlegroups.com
Hello Paul,


The API reports monthly stats while the UI few months average (refer to the "?" tooltip in the UI). For some months they match and it looks like they are the same values, which is not.


-Danial, AdWords API Team.

Paul byrne gl

unread,
Jul 11, 2013, 7:25:02 AM7/11/13
to adwor...@googlegroups.com
This thread explains the reason

api no more matches keyword tool,
but it matches keyword planner

Thanks
Reply all
Reply to author
Forward
0 new messages