Use the AdScan API to integrate ad tracking and management into your applications.
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer adscan_live_your_api_key_here
You can create and manage API keys from the API Keys page in your dashboard.
https://adscan.com/api/v1/trpc
AdScan uses tRPC for its API. Each procedure is called via a POST request to a specific endpoint.
The endpoint format is: /api/v1/trpc/[router].[procedure]
boards.list - List all your boardsboards.create - Create a new boardboards.update - Update a boardboards.remove - Delete a boardads.list - List ads with filtersads.getDetails - Get detailed ad informationads.addToBoard - Add an ad to a boardads.removeFromBoard - Remove ad from boardads.delete - Delete an adads.listBoardsContaining - Find boards containing a specific adads.getFilterValues - Get available filter optionsads.listTopCompanies - Get top companiescompanies.follow - Follow a companycompanies.unfollow - Unfollow a companyapiKeys.list - List your API keysapiKeys.create - Create a new API keyapiKeys.revoke - Revoke an API keyThis example shows how to fetch all your boards.
POST https://adscan.com/api/v1/trpc/boards.list
Authorization: Bearer adscan_live_your_api_key_here
Content-Type: application/json
{}{
"result": {
"data": [
{
"id": 1,
"name": "My Board",
"order": 0,
"published": true,
"createdAt": "2024-01-01T00:00:00.000Z",
"authorId": "user123",
"views": 0,
"parentBoardId": null
}
]
}
}This example shows how to create a new board.
POST https://adscan.com/api/v1/trpc/boards.create
Authorization: Bearer adscan_live_your_api_key_here
Content-Type: application/json
{
"name": "My New Board",
"parentId": null
}{
"result": {
"data": {
"id": 42,
"name": "My New Board",
"parentId": null
}
}
}This example shows how to fetch ads with various filters.
POST https://adscan.com/api/v1/trpc/ads.list
Authorization: Bearer adscan_live_your_api_key_here
Content-Type: application/json
{
"boardId": 1,
"search": "marketing",
"platforms": ["Facebook", "Google"],
"limit": 20,
"cursor": null
}{
"result": {
"data": {
"ads": [...],
"nextCursor": "ad_hash_123",
"hasMore": true
}
}
}The API returns standard HTTP status codes. Common errors include:
401 Unauthorized - Invalid or missing API key403 Forbidden - You don't have permission to access this resource404 Not Found - Resource not found429 Too Many Requests - Rate limit exceeded500 Internal Server Error - Something went wrong on our endAPI requests are rate-limited to prevent abuse. If you exceed the rate limit, you'll receive a 429 status code. Contact support if you need higher rate limits for your integration.
If you have questions or need help with the API, please contact us at [email protected]