简体   繁体   中英

How To Get Started Working with the Google AdWords API?

I'm a student working on a project related to SEO; I need to write an optimization tool, so I'm writing an application using C# and Windows Forms. The main part of the application is for keyword selection, and I want to use the Google AdWords API to obtain a list of keywords.

I downloaded the C# client library, but can't understand how to set up the project: I am getting the error:

"An API exception has occurred. See ApiExecption and InnerException fields for more details".

Maybe I have made a mistake when I edited the App.config file as I haven't changed anything else. Can anyone advise me where I should begin? I would be grateful to hear your ideas.

Unfortunatley, the AdWords API isn't as open as you might think: It's meant for ad agencies managing large accounts, or software vendors who want to build ad management platforms. You need to apply to Google for an API key to gain access; they used to give them out to nearly anyone with an account, and it took about 14 days to process the application. However, Google has got very strict about their terms and conditions over the past 12 months, and to put it simply, you probably won't meet them if you're building an SEO tool; even if you apply to build a full platform, you'll need to wait six to ten weeks for approval as they've got a huge backlog of applications to process at the moment.

As this is just a student project, you should actually be able to get away with just using the AdWords API sandbox , which is open to anyone with a Google account. This won't give you real keywords or stats, but would demonstrate your understanding of the platform.

Another option would be to check out the Ad Intelligence Service of the adCenter API ; you'd still need to open an adCenter account (with a $5 activation fee), but you should be able to get an adCenter API key without waiting too long. The stats available from Microsoft won't be as extensive as what Google has to offer, but will still be relevant to the at least the US market. Also, being Microsoft, they've got a good range of C# examples .

You could use the sandbox, but it is good only for testing purposes. You won't get real values for traffic estimation and keyword ideas.

To use the sandbox, what you need is a Google account (your gmail account for instance). To initialize the sandbox,

  1. In your App.config, put email/password/developerToken as your email / your password / youremail++USD (eg john.doe@gmail.com++USD)

  2. Run the GetCampaigns.cs code example. It is under v201109/BasicOperations folder in the C# examples project. This will initialize the sandbox.

  3. Run the GetAccountHierarchy.cs code example. It is under v201109/AccountManagement folder. This will give you 5 client emails and their customer ids.

  4. Use one of these customerIds in the ClientCustomerId field of App.config.

  5. Run any other code example.

The video is a bit outdated, due to recent changes in AdWords API, I need to update it.

you can find a very good article series about adwords api there: Google Adwords API it is not that hard to learn how to use it! I think the API itself is very good documented and there is a good suppo from google.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM