Indiwtf logo

Indiwtf API

Start using our easy-to-use API that allows you to programmatically monitor internet censorship in Indonesia.

Create your API token here to start using Indiwtf API.

Introduction

The Indiwtf API provides developers with tools to check website blocking status in Indonesia. Our API allows you to:

  • Check if a specific domain is blocked in Indonesia.
  • Retrieve a list of blocked domains.
  • Monitor your API usage.

Base URL

https://indiwtf.com/api

Authentication

All API requests require authentication using an API token. Add your token as a query parameter to each request:

https://indiwtf.com/api/check?domain=example.com&token=YOUR_API_TOKEN

GET /check

Check if a specific domain is blocked in Indonesia. Returns the domain status and associated IP address.

Endpoint

GET https://indiwtf.com/api/check?domain=example.com&token=YOUR_API_TOKEN

Query Parameters

Parameter
Type
Description
token
string
Authentication token.
domain
string
The domain to check.

Responses

The API returns a JSON response with the following structure:

When a domain is blocked:

{
  "domain": "reddit.com",
  "status": "blocked",
  "ip": "36.86.63.185"
}

When a domain is not blocked:

{
  "domain": "google.com",
  "status": "allowed",
  "ip": "216.239.38.120"
}

Errors

The API may return the following error responses:

Error Message: Invalid API token
HTTP Status: 401 Unauthorized
Description: The API token provided appears to be invalid or incorrect, please double-check and ensure it is accurate.
{
  "error": "Invalid API token"
}
Error Message: Invalid domain format
HTTP Status: 400 Bad Request
Description: The provided domain has an invalid format.
{
  "error": "Invalid domain format"
}
Error Message: Error resolving IP address for {domain}
HTTP Status: 400 Bad Request
Description: An error occurred while resolving the IP address for the domain.
{
  "error": "Error resolving IP address for {domain}"
}

GET /blocklist

Access real-time data on internet censorship across Indonesia.

Endpoint

GET https://indiwtf.com/api/blocklist?source=trustpositif&token=YOUR_API_TOKEN

Query Parameters

Parameter
Type
Description
token
string
Authentication token.
year
integer
The year for which to retrieve data.
source
string
Filter source, either trustpositif or apjii. Default is trustpositif.

Response

{
  "2024": {
    "04": {
      "blocked_domains": 3123501,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202404.txt"
    },
    "05": {
      "blocked_domains": 3353080,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202405.txt"
    },
    "06": {
      "blocked_domains": 3659939,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202406.txt"
    },
    "07": {
      "blocked_domains": 4047887,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202407.txt"
    },
    "08": {
      "blocked_domains": 4408042,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202408.txt"
    },
    "09": {
      "blocked_domains": 4857225,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202409.txt"
    },
    "10": {
      "blocked_domains": 5417331,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202410.txt"
    },
    "11": {
      "blocked_domains": 5688515,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202411.txt"
    },
    "12": {
      "blocked_domains": 5944605,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202412.txt"
    }
  },
  "2025": {
    "01": {
      "blocked_domains": 6207893,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202501.txt"
    },
    "02": {
      "blocked_domains": 6297024,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202502.txt"
    },
    "03": {
      "blocked_domains": 6471124,
      "url": "https://storage.devstatic.com/indiwtf/blocklist/trustpositif-202503.txt"
    }
  }
}

Errors

Error Message: Invalid API token
HTTP Status: 401 Unauthorized
{
  "error": "Invalid API token"
}

GET /usage

Retrieve your API usage statistics, including request count and rate limits.

Endpoint

GET https://indiwtf.com/api/usage?token=YOUR_API_TOKEN

Query Parameters

Parameter
Type
Description
token
string
Authentication token.

Response

{
  "plan": "basic",
  "term": "monthly",
  "usage": {
    "requests_today": 143,
    "requests_this_month": 2567,
    "total_requests": 2567
    "limits": {
      "monthly": 10000
    },
    "remaining": {
      "monthly": 7433
    }
  }
}

Errors

Error Message: Invalid API token
HTTP Status: 401 Unauthorized
{
  "error": "Invalid API token"
}

Code Examples

Below are examples of how to use the /check endpoint in various programming languages.

JavaScript

// Using fetch API
const apiToken = 'YOUR_API_TOKEN';
const baseURL = 'https://indiwtf.com/api';

async function checkDomain(domain) {
  try {
    const url = `${baseURL}/check?domain=${domain}&token=${apiToken}`;
    const response = await fetch(url);
    const data = await response.json();
    
    if (!response.ok) {
      throw new Error(data.error || `API error: ${response.status}`);
    }
    
    return data;
  } catch (error) {
    console.error('Error checking domain:', error);
    throw error;
  }
}

// Usage
checkDomain('example.com')
  .then(result => {
    if (result.status === 'blocked') {
      console.log(`${result.domain} is blocked in Indonesia`);
    } else {
      console.log(`${result.domain} is accessible in Indonesia`);
    }
  })
  .catch(error => {
    console.error(`Error: ${error.message}`);
  });