All placed keywords of particular website

16 views
Skip to first unread message

netimpact

unread,
Feb 16, 2010, 6:40:58 AM2/16/10
to AdWords API Forum
Hi folks,

does somebody now how to get all keywords placed for a particular
site, plus the cpc of the keyword? I assume, I need some kind of
approval from owner of the partner site to be able retrieve any
information with my account, is that right?

I would be very thankful if somebody would show some sample code for
v2009 (or v13).

cheers,
NI

netimpact

unread,
Feb 17, 2010, 10:06:29 AM2/17/10
to AdWords API Forum
The code bellow is a part or cut together used the examples of php
client library.
Works fine, but what to do if I have 100.000 keywords and I want o
keep my database up to date?

To reduce costs I would like to retrieve changed keywords only instead
of fetching all 100.000 keywords every hour.
(i.e CPC of a keyword has changed, keyword is activated/deactivated,
campaign activated/deactivated)

Any Idea? Thanks,
NI


$user = new AdWordsUser();

// Log SOAP XML request and response.
$user->LogDefaults();

## Get Campaings

// Get the CampaignService.
$campaignService = $user->GetCampaignService('v200909');

// Create selector.
$selector = new CampaignSelector();
$selector->campaignStatuses = array('ACTIVE');

// Get campaigns.
$page = $campaignService->get($selector);

foreach ($page->entries as $campaign) {
//$this->assertTrue( is_numeric($campaign->id));
print_r("\ncampaign id: " . $campaign->id . ' name: ' . $campaign-
>name );
}
print "\n\n";

## Get AdGroups

//first Campaign
$campaign = $page->entries[0];

$adGroupService = $user->GetAdGroupService('v200909');

// Create selector.
$selector = new AdGroupSelector();
// $selector->campaignId = $campaign->id;

// Get groups.
$page = $adGroupService->get($selector);

if (isset($page->entries)) {
foreach ($page->entries as $adGroup) {
// $this->assertTrue( is_numeric($adGroup->id));
print_r("\ngroup id: " . $adGroup->id . ' name: ' . $adGroup-
>name);
}
}
print "\n\n";

// ## Get Keywords

// first AdGroup
$adGroup = $page->entries[1];

// Get the AdGroupCriterionService.
$adGroupCriteriaService = $user-
>GetAdGroupCriterionService('v200909');

// Create selector.
$selector = new AdGroupCriterionSelector();
$selector->userStatuses = array('ACTIVE');

// Create id filter.
$idFilter = new AdGroupCriterionIdFilter();
$idFilter->adGroupId = $adGroup->id;
$idFilter->campaignId = $campaign->id;
$selector->idFilters = array($idFilter);

// Get all active ad group criteria.
$page = $adGroupCriteriaService->get($selector);

# Id and CPC
# $adGroupCriterion->criterion->id
# $adGroupCriterion->stats->averageCpc

AdWords API Advisor

unread,
Feb 17, 2010, 6:05:05 PM2/17/10
to AdWords API Forum
Hi,

Unfortunately there is no way in the API to request only changed
keywords.

Best,
- Eric Koleda, AdWords API Team

netimpact

unread,
Feb 18, 2010, 6:28:01 AM2/18/10
to AdWords API Forum
Thank you Eric for your reply.

Is there a possibility to create reports, which display changes (like
activated/deactivated, cpc) and fetch the reports using the API, or
push a csv- or json file to a fileserver (any protocol)?


regards,
NI


On Feb 18, 12:05 am, AdWords API Advisor

AdWords API Advisor

unread,
Feb 18, 2010, 12:03:28 PM2/18/10
to AdWords API Forum
Hi NI,

There is no report that will just return changed data, or even tell
you when the objects were last changed. The only solution currently
is to fetch all of the data in the account.

Best,
- Eric

netimpact

unread,
Mar 4, 2010, 7:56:13 AM3/4/10
to AdWords API Forum
Hi,

can a report with selectedReportType=URL or selectedReportType=Keyword
show me all DestinationURL's and Keywords and the CPC of a particular
day?

What I need is a List of active Keywords with DestinationURL and CPC
for the current day (or yesterday). The reports I have generated vary
from in row count depending of day or selected period (day(s)). I
assume that not all active Keywords or DestinationUrls are listed in
generated reports. If so, why reports do not list all Keywords/
DestinationURL's?

Any other suggestion or hint is welcome to solve my problem.

Best regards,
NI


On Feb 18, 6:03 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:


> Hi NI,
>
> There is no report that will just return changed data, or even tell
> you when the objects were last changed.  The only solution currently
> is to fetch all of the data in the account.
>
> Best,
> - Eric
>

> On Feb 18, 6:28 am,netimpact<d...@netimpact.de> wrote:
>
>
>
> > Thank you Eric for your reply.
>
> > Is there a possibility to create reports, which display changes (like
> > activated/deactivated, cpc) and fetch the reports using the API, or
> > push a csv- or  json file to a fileserver (any protocol)?
>
> > regards,
> > NI
>
> > On Feb 18, 12:05 am, AdWords API Advisor
>
> > <adwordsapiadvi...@google.com> wrote:
> > > Hi,
>
> > > Unfortunately there is no way in the API to request only changed
> > > keywords.
>
> > > Best,
> > > - Eric Koleda, AdWords API Team
>

AdWords API Advisor

unread,
Mar 8, 2010, 12:48:49 PM3/8/10
to AdWords API Forum
Hi,

By default keyword performance reports will not include keywords that
did not receive any impressions over the time frame of the report. If
you want to include these keywords as well then you need to set the
DefinedReportJob.includeZeroImpression field to "true".

http://code.google.com/apis/adwords/docs/developer/DefinedReportJob.html#includeZeroImpression

Best,
- Eric

Reply all
Reply to author
Forward
0 new messages