# Content Filter API

> Content Filter checks URLs against a comprehensive blocklist of 200,000+ domains categorized as ads-malware, fake news, gambling, adult content, or social media. Returns the specific category for blocked domains, plus every category a domain appears in across a 1.7M-domain index.

**Endpoint:** `POST https://api.apiverve.com/v1/contentfilter`  
**Category:** Networking  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/contentfilter

## Overview

A content filter API for parental control apps, workplace web filters and link moderation. Send a URL or bare domain and find out whether it sits on a blocklist, along with the exact listed domain that matched and a simple safe or unsafe rating. Subdomains are covered: a page on any subdomain of a blocked site is caught through its parent domain.

Content Filter uses the StevenBlack hosts project, which aggregates blocklists from multiple reputable sources, and the lists are refreshed daily. Each blocked domain falls into one of five categories: ads-malware, fakenews, gambling, porn, or social.

The Free plan returns the blocked flag, the matched domain and the safety rating, which is enough to warn before a redirect, hold a chat message that contains a risky link, or stop a page loading in a kid safe browser. Paid plans add the category, so you can block gambling and adult content but allow social media, and a categories list that adds The Block List Project's drugs, piracy, crypto, ads, tracking, ransomware, gambling and adult lists.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/contentfilter" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.pornhub.com/video/123"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | The URL or domain to check |

## Response fields

- `url` — string · The full URL that was checked for safety
- `domain` — string · The extracted domain from the URL checked
- `isBlocked` — boolean · Whether the domain is on the blocklist, or tagged gambling, adult or ransomware in the larger category index
- `category` — string · Content category: ads-malware, fakenews, gambling, porn, social · (premium)
- `matchedDomain` — string · The specific blocklisted domain that matched
- `safetyRating` — string · Safety assessment: safe or unsafe
- `categories` — array · Every category the domain or a parent domain appears in across all lists (ads-malware, fakenews, gambling, porn, social, drugs, piracy, crypto, ads, tracking, ransomware), including ones that do not set isBlocked; null if unavailable · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "url": "https://www.pornhub.com/video/123",
    "domain": "www.pornhub.com",
    "isBlocked": true,
    "category": "porn",
    "matchedDomain": "pornhub.com",
    "safetyRating": "unsafe",
    "categories": [
      "porn"
    ]
  }
}
```

## Use cases

- **Parental Controls** — Block inappropriate content for children including adult sites, gambling, and fake news
- **Workplace Filtering** — Keep employees focused by detecting social media and entertainment sites
- **Safe Browsing Apps** — Build family-friendly browsers that warn users about unsafe content
- **Content Moderation** — Screen user-submitted URLs before allowing them on your platform

## SDKs

- **npm** — `npm install @apiverve/contentfilter` (https://www.npmjs.com/package/@apiverve/contentfilter)
- **NuGet** — `dotnet add package APIVerve.API.ContentFilter` (https://www.nuget.org/packages/APIVerve.API.ContentFilter)
- **Source** — https://github.com/apiverve/contentfilter-api

## More

- Full reference: https://docs.apiverve.com/ref/contentfilter
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
