Now Available: AdWords API Local Database Sync
September 29th, 2008 | Published in Google Adwords API
Today, we're pleased to announce the AdWords API Local Database Sync project. The scripts that make up the project can be used to schedule reports using the AdWords API, store the results in a local database (using SQLite), and then run queries against the database.
If you recall, one of the recommendations listed on our recent list of "AdWords API: Top Ten Practices" extolled the virtues of maintaining your AdWords account information in a local database, and using the AdWords API to keep that information up to date. Querying a local database offers speed and cost advantages compared to making repeated AdWords API calls when answering questions like "How many active AdWords campaigns do I have across all my accounts?" Maintaining a local database with historical information can also help you answer questions that the AdWords API alone can't, like "Which keywords were updated in my accounts during the past week?" Now, with the AdWords API Local Database Sync you can answer these questions.
Here are some of the technical details: The scripts are written in Python, and make use of the SOAPpy libraries for accessing the AdWords API SOAP service. The Python code is written against the dbapi2 database API, and by default it will use the SQLite implementation and store the report data in a SQLite database file on the local file system. It's possible to swap out the SQLite libraries for another database library that supports the dbapi2 interface.
While some developers may have already written their own in-house AdWords database synchronization code, we wanted to provide a standalone, open source solution for those developers who don't yet have such a system in place. We're also hopeful that the code serves as a helpful example of scheduling and parsing AdWords API reports, and that even folks who are already maintaining their own databases will get something out of the project.
Visit the project's home on Google Code and give it a try!
Cheers,
-Jeffrey Posnick, AdWords API Team
If you recall, one of the recommendations listed on our recent list of "AdWords API: Top Ten Practices" extolled the virtues of maintaining your AdWords account information in a local database, and using the AdWords API to keep that information up to date. Querying a local database offers speed and cost advantages compared to making repeated AdWords API calls when answering questions like "How many active AdWords campaigns do I have across all my accounts?" Maintaining a local database with historical information can also help you answer questions that the AdWords API alone can't, like "Which keywords were updated in my accounts during the past week?" Now, with the AdWords API Local Database Sync you can answer these questions.
Here are some of the technical details: The scripts are written in Python, and make use of the SOAPpy libraries for accessing the AdWords API SOAP service. The Python code is written against the dbapi2 database API, and by default it will use the SQLite implementation and store the report data in a SQLite database file on the local file system. It's possible to swap out the SQLite libraries for another database library that supports the dbapi2 interface.
While some developers may have already written their own in-house AdWords database synchronization code, we wanted to provide a standalone, open source solution for those developers who don't yet have such a system in place. We're also hopeful that the code serves as a helpful example of scheduling and parsing AdWords API reports, and that even folks who are already maintaining their own databases will get something out of the project.
Visit the project's home on Google Code and give it a try!
Cheers,
-Jeffrey Posnick, AdWords API Team