REST API Reference

API Overview

Ad Unblock provides a REST API that allows developers to access data and functionality to integrate with our service. This documentation covers the available endpoints, request parameters, and response formats.

API Base URL

All API requests should be made to: https://config.adunblocker.com

Authentication

The current public endpoints do not require authentication. Private API endpoints for account management and analytics require an API key, which will be documented in a future release.

Available Endpoints

Valid Script Sources

GET/valid_script_sources.json

This endpoint returns a list of all valid script sources that can be used with Ad Unblock. Use this to verify if a script source is valid or to obtain the official list of approved domains for hosting Ad Unblock scripts.

Request

GET https://config.adunblocker.com/valid_script_sources.json

Response

The response is a JSON array containing strings of valid domains for Ad Unblock scripts.

Example Response:
[
  "cdn.adunblock.com",
  "scripts.adunblock.com",
  "secure.adunblock-cdn.io"
]
Usage Notes:
  • Only load Ad Unblock scripts from these approved domains to ensure security and functionality.
  • The list may be updated periodically as new domains are added or removed.
  • We recommend caching this list with a reasonable TTL (e.g., 24 hours) to reduce API calls.

Status Codes

Status CodeDescription
200 OKThe request was successful and the response contains the list of valid script sources.
404 Not FoundThe requested resource could not be found.
500 Internal Server ErrorAn error occurred on the server.

Rate Limits

To ensure the stability of our service, we apply rate limits to all API endpoints. Current rate limits are set to 100 requests per minute per IP address. If you exceed this limit, you will receive a 429 Too Many Requests response.

CORS

Our API supports Cross-Origin Resource Sharing (CORS) for all endpoints, allowing you to make requests from your browser-based applications.

API Versioning

The current API is v1, which is the default version. Future API releases will be versioned explicitly in the URL.

Need Help with the API?

If you have questions about our API or encounter any issues, our developer support team is here to help.

Contact Developer Support