REST API — Database Delivery

Database Delivery API

Programmatic access to download and manage your AI tools blocklist database files. Automate daily updates, retrieve the category taxonomy, and keep your enforcement points in sync with the latest classifications.

4Endpoints
RESTArchitecture
JSONResponses
CSVFile Delivery
api — bash
$ curl -H "X-API-Key: ••••••••••••" \
    "https://www.aitoolsblocklist.com/api/database/?action=database_info"

{
  "plan": "Full Database ($499/month)",
  "database_file": "ai_tools_full.csv",
  "last_updated": "2026-07-12 05:30:02 UTC",
  "file_size_human": "839.85 KB"
}
$ 
API-Key Authentication
HTTPS Only
CSV Downloads
JSON Metadata
Daily Exports
cURL-Ready
Overview

One API for your database files, taxonomy and subscription

The Database Delivery API allows you to programmatically retrieve, download, and manage your AI tools blocklist database files from aitoolsblocklist.com.

Automated Downloads

Automate recurring database updates — schedule and script database file downloads with standard HTTP tooling.

File Metadata

Pull metadata about your current file — when it was last updated and how large it is — before you download.

Category Taxonomy

Retrieve the master list of 18 categories and 170+ subcategories of AI tools, complete with domain counts.

Secure Access

Check the status of your API key and subscription. API-key authentication ensures only authorized clients access their data.

Base URL
https://www.aitoolsblocklist.com/api/database/
How requests work
All endpoints are accessed by appending an action query parameter to the base URL. Your API key is shown on your account dashboard and in your activation email.
Prefer a plain link instead of an API? Your profile also contains a personal download.php?token=… URL that always serves the latest daily export.
Authentication

Two ways to present your API key

Every request must include a valid API key. You can pass it in one of two ways.

HTTP Header

Recommended

Include the key in the X-API-Key request header:

bash
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://www.aitoolsblocklist.com/api/database/?action=database_info"

Query Parameter

Alternative

Append api_key to the URL:

bash
curl "https://www.aitoolsblocklist.com/api/database/?action=database_info&api_key=YOUR_API_KEY"
Security note: The header method is strongly recommended because query parameters may appear in server logs and browser history.
Status Code Meaning Cause
401 Unauthorized No API key was provided in the request.
403 Forbidden The API key is invalid, expired, or does not have access to this resource.
Endpoints

Four GET endpoints, one action parameter

Metadata, database delivery, the category taxonomy and subscription status — each behind a single query parameter.

GET /api/database/?action=database_info

Database Info

Returns metadata about your plan's current database file (ai_tools_full.csv on the Full Database plan, ai_tools_5k.csv on the 5K Domains plan): when it was last updated and its size in bytes and human-readable form.

Example Request
bash
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://www.aitoolsblocklist.com/api/database/?action=database_info"
Example Response
json
{
  "client": "Example Company Inc.",
  "plan": "Full Database ($499/month)",
  "database_file": "ai_tools_full.csv",
  "last_updated": "2026-07-12 05:30:02 UTC",
  "last_updated_unix": 1783920602,
  "file_size_bytes": 859011,
  "file_size_human": "839.85 KB"
}
GET /api/database/?action=download_database

Download Database

Downloads the main database CSV file. The response is streamed with a Content-Disposition: attachment header so the browser (or your HTTP client) will save it directly to disk.

Columns: domain, relevant_categories_of_ai_tool
A tool can belong to more than one category (e.g. openai.com is both a foundation-model API and a general assistant), so relevant_categories_of_ai_tool lists every applicable category as Category > Subcategory pairs delimited by | .
Example Request
bash
curl -H "X-API-Key: YOUR_API_KEY" -o database.csv \
  "https://www.aitoolsblocklist.com/api/database/?action=download_database"
The file is streamed directly. Use the -o flag in cURL (or equivalent) to save to a local file.
GET /api/database/?action=download_categories

Download Categories

Downloads the ai_tools_categories.csv file, which contains the master list of all AI-tool categories and subcategories used in the database, with per-pair domain counts (columns: category, subcategory, domain_count).

Example Request
bash
curl -H "X-API-Key: YOUR_API_KEY" -o ai_tools_categories.csv \
  "https://www.aitoolsblocklist.com/api/database/?action=download_categories"
GET /api/database/?action=status

API Key Status

Returns the current status of your API key and a summary of your subscription, including the database file you are subscribed to, when it was last updated, and its size.

Example Request
bash
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://www.aitoolsblocklist.com/api/database/?action=status"
Example Response
json
{
  "client": "Example Company Inc.",
  "api_key_active": true,
  "plan": "Full Database ($499/month)",
  "subscribed_database": "ai_tools_full.csv",
  "database_last_updated": "2026-07-12 05:30:02 UTC",
  "database_file_size": "839.85 KB"
}
What the API delivers

The full classification behind every download

Each daily export carries the complete blocklist with its category taxonomy, ready to load into your enforcement points.

4REST endpoints
18AI-tool categories
170+Subcategories with counts
24hMaximum data age
Python Bash / cURL PowerShell Any HTTP client
Integration Examples

Ready-to-use client snippets

Below are ready-to-use examples in several languages. Replace YOUR_API_KEY with your actual key.

python
import requests

API_KEY = "YOUR_API_KEY"
BASE    = "https://www.aitoolsblocklist.com/api/database/"
HEADERS = {"X-API-Key": API_KEY}

# 1. Check database info
info = requests.get(BASE, params={"action": "database_info"}, headers=HEADERS)
print(info.json())

# 2. Download the database file
resp = requests.get(BASE, params={"action": "download_database"}, headers=HEADERS, stream=True)
with open("database.csv", "wb") as f:
    for chunk in resp.iter_content(chunk_size=8192):
        f.write(chunk)
print("Database downloaded successfully.")

# 3. Download the categories list
resp = requests.get(BASE, params={"action": "download_categories"}, headers=HEADERS, stream=True)
with open("ai_tools_categories.csv", "wb") as f:
    for chunk in resp.iter_content(chunk_size=8192):
        f.write(chunk)
print("Categories file downloaded.")

# 4. Check API key status
status = requests.get(BASE, params={"action": "status"}, headers=HEADERS)
print(status.json())
bash / curl
#!/usr/bin/env bash
API_KEY="YOUR_API_KEY"
BASE="https://www.aitoolsblocklist.com/api/database/"

# Database info (JSON)
curl -s -H "X-API-Key: $API_KEY" "${BASE}?action=database_info" | python3 -m json.tool

# Download the main database file
curl -H "X-API-Key: $API_KEY" -o database.csv "${BASE}?action=download_database"

# Download the categories list
curl -H "X-API-Key: $API_KEY" -o ai_tools_categories.csv "${BASE}?action=download_categories"

# API key status (JSON)
curl -s -H "X-API-Key: $API_KEY" "${BASE}?action=status" | python3 -m json.tool
powershell
$ApiKey  = "YOUR_API_KEY"
$Base    = "https://www.aitoolsblocklist.com/api/database/"
$Headers = @{ "X-API-Key" = $ApiKey }

# Database info
$info = Invoke-RestMethod -Uri "$Base`?action=database_info" -Headers $Headers
$info | ConvertTo-Json -Depth 5

# Download the main database file
Invoke-WebRequest -Uri "$Base`?action=download_database" -Headers $Headers -OutFile "database.csv"
Write-Host "Database downloaded."

# Download the categories list
Invoke-WebRequest -Uri "$Base`?action=download_categories" -Headers $Headers -OutFile "ai_tools_categories.csv"
Write-Host "Categories file downloaded."

# API key status
$status = Invoke-RestMethod -Uri "$Base`?action=status" -Headers $Headers
$status | ConvertTo-Json -Depth 5
Typical Update Workflow

Keep your local copy in sync in four steps

Follow these four steps to keep your local database in sync with the latest release.

1

Check for updates

Call action=database_info and compare the last_updated_unix timestamp with the value you stored from your last download. If the remote timestamp is newer, a new release is available.

2

Download the new database

Call action=download_database to pull the latest CSV. Stream the response to disk to minimize memory usage for large files.

3

Refresh the category taxonomy

Call action=download_categories to download ai_tools_categories.csv — the master list of all 18 categories and 170+ subcategories with per-pair domain counts, so your policy mappings stay complete.

4

Verify and store

Confirm the download completed by checking the file size against the file_size_bytes value from step 1. Store the new last_updated_unix timestamp locally so you can detect future updates.

Error Handling

Standard HTTP status codes, descriptive JSON errors

The API uses standard HTTP status codes. Errors are returned as JSON objects with a descriptive error field.

Status Meaning Description
200 OK Request succeeded. JSON body or file stream is returned.
400 Bad Request The action parameter is missing or not recognized.
401 Unauthorized No API key was provided. Include it via the X-API-Key header or api_key query parameter.
403 Forbidden The API key is invalid, expired, or lacks permission for the requested resource.
404 Not Found The requested database file or categories file does not exist for your account.
json — example error response
{
  "error": "Unauthorized. Please provide a valid API key.",
  "status": 401
}

Need help with the Database Delivery API?

If you have questions about the Database Delivery API, need assistance with integration, or want to report an issue, our team is here to help.

[email protected]