https://github.com/kritzware/adwords-js
Node.js unofficial library for Google AdWords API
https://github.com/kritzware/adwords-js
adwords google javascript nodejs
Last synced: about 2 months ago
JSON representation
Node.js unofficial library for Google AdWords API
- Host: GitHub
- URL: https://github.com/kritzware/adwords-js
- Owner: kritzware
- License: mit
- Created: 2017-03-29T22:21:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-22T10:52:12.000Z (about 8 years ago)
- Last Synced: 2025-02-05T07:15:44.936Z (4 months ago)
- Topics: adwords, google, javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# adwords-js
Node.js unofficial library for Google AdWords API**NOTE:** This package is unfinished and not suitable for production use as of yet.
## Requirements
A valid Adwords **`developerToken`**, **`clientCustomerId`** and **`accessToken`**## Example
```javascript
const Adwords = require('adwords-js')const adwords = new Adwords({
developer_token : 'your_developer_token',
client_customer_id : 'your_client_customer_id',
access_token : 'your_access_token'
})/* Construt AWQL query */
const awql = adwords.build({
report: 'KEYWORDS_PERFORMANCE_REPORT',
fields: [
"Id",
"Criteria",
"Clicks",
"Cost",
"Impressions"
],
date: {
from : '2017-04-18',
to : '2017-04-22'
// range: 'LAST_7_DAYS'
}
})
/*
SELECT+Id,Criteria,Clicks,Cost,Impressions+FROM+KEYWORDS_PERFORMANCE_REPORT+DURING+20170418,20170422
*/adwords.query(awql)
.then(res => {
/*
[
{ 'Keyword ID': 295056043,
Keyword: 'keyword1',
Clicks: 0,
Cost: 0,
Impressions: 0
},
{ 'Keyword ID': 41943402,
Keyword: 'keyword2',
Clicks: 0,
Cost: 0,
Impressions: 0
}
]
*/
})
.catch(err => {
// e.g. "AuthenticationError.OAUTH_TOKEN_INVALID"
})
```