Adsense API
Query Adsense-related site data by domain or publisher ID.
Endpoint
GET /api/v1/adsenseAuthentication
Authorization: Bearer YOUR_API_KEYRequest Parameters
Provide exactly one of the following:
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | No | Target domain |
pubId | string | No | Adsense publisher ID, for example pub-3661441281163245 |
Validation Rules
domainandpubIdcannot be provided together- at least one of them must be provided
Query by Domain
GET /api/v1/adsense?domain=twitter.com
Authorization: Bearer YOUR_API_KEYResponse Example: Domain
{
"code": "ok",
"message": "ok",
"data": {
"endpoint": "adsense",
"costCredits": 3,
"remainingCredits": 97,
"query": {
"domain": "twitter.com"
},
"domain": "twitter.com",
"publisherIds": {
"direct": [
"pub-3661441281163245"
],
"reseller": []
},
"total": {
"direct": 1,
"reseller": 0,
"all": 1
}
}
}Query by PubId
GET /api/v1/adsense?pubId=pub-3661441281163245
Authorization: Bearer YOUR_API_KEYResponse Example: PubId
{
"code": "ok",
"message": "ok",
"data": {
"endpoint": "adsense",
"costCredits": 3,
"remainingCredits": 97,
"query": {
"pubId": "pub-3661441281163245"
},
"adSenseId": "pub-3661441281163245",
"domains": [
"x.com",
"proxy-solutions.net"
],
"count": 2
}
}Response Fields
| Field | Description |
|---|---|
data.endpoint | Fixed value: adsense |
data.costCredits | Credits consumed by this request |
data.remainingCredits | Remaining credits after deduction |
data.query.domain | Normalized domain parameter when querying by domain |
data.query.pubId | Publisher ID parameter when querying by pubId |
data.domain | Returned domain for the domain query |
data.publisherIds | Publisher IDs grouped by direct and reseller |
data.total | Counts for direct, reseller, and all in the domain query |
data.adSenseId | Returned publisher ID for the pubId query |
data.domains | Domains associated with the publisher ID |
data.count | Number of returned domains |
Billing
Each request deducts 3 credits