API Documentation

Documentation for the DSA Lookup API endpoints. All endpoints return JSON responses and follow standard HTTP status codes.

Rate Limiting

All API endpoints are subject to rate limiting. Please respect the rate limit headers in responses:

  • X-RateLimit-Limit - Maximum requests per window (3600 per hour)
  • X-RateLimit-Remaining - Remaining requests in current window
  • X-RateLimit-Reset - Time when the rate limit resets (Unix timestamp)

GET /stats

Retrieve database statistics and overview

Description

Returns comprehensive statistics about the DSA database including total actions, user bans, guild bans, and available filters for search.

Endpoint

GET /api/stats

Query Parameters

No query parameters required.

Response Format

{
  "data": {
    "overview": {
      "totalActions": number,
      "userActions": number,
      "guildActions": number,
      "lastUpdated": string
    },
    "actionsByType": {
      "users": Array<{ name: string; count: number; percentage: number }>,
      "guilds": Array<{ name: string; count: number; percentage: number }>
    },
    "protectionOfMinors": {
      "automated": {
        "underAged": { count: number; percentage: number },
        "csamMaterial": { count: number; percentage: number },
        "total": number
      },
      "manual": {
        "underAged": { count: number; percentage: number },
        "csamMaterial": { count: number; percentage: number },
        "total": number
      }
    },
    "detectionMethod": {
      "automated": { count: number; percentage: number },
      "manual": { count: number; percentage: number },
      "total": number
    },
    "contentLegality": {
      "illegal": { count: number; percentage: number },
      "legal": { count: number; percentage: number },
      "total": number
    },
    "categoryTags": {
      "statistics": Array<{ name: string; count: number; percentage: number }>
    },
    "availableFilters": {
      "categories": string[],
      "tags": string[],
      "contentTypes": string[]
    }
  }
}

Status Codes

200
Success - Statistics returned
503
Service Unavailable - Data processing in progress

GET /search

Search and filter DSA actions

Description

Search through DSA actions with advanced filtering, sorting, and pagination capabilities. Returns detailed action information with pagination metadata.

Endpoint

GET /api/search

Query Parameters

Filter Parameters

type - Action type
parsedId - Parsed ID
category - Action category
platformName - Platform name
decisionGround - Decision ground
startDate - Start date (ISO format)
endDate - End date (ISO format)

Array Parameters (comma-separated)

categorySpecification - Category specifications
contentType - Content types
decisionVisibility - Decision visibility types

Boolean Parameters

incompatibleContentIllegal - true/false
automatedDetection - true/false

Sorting & Pagination

sort - applicationDate, contentDate, createdAt, type, category
order - asc, desc
limit - Results per page (1-100, default: 20)
offset - Pagination offset
includeTotalCount - Include total count in response

Response Format

{
  "actions": [
    {
      "uuid": string,
      "type": string,
      "parsedId": string,
      "decisionVisibility": string[] | null,
      "decisionVisibilityOther": string | null,
      "endDateVisibilityRestriction": string | null,
      "decisionMonetary": string | null,
      "decisionMonetaryOther": string | null,
      "endDateMonetaryRestriction": string | null,
      "decisionProvision": string | null,
      "endDateServiceRestriction": string | null,
      "decisionAccount": string | null,
      "endDateAccountRestriction": string | null,
      "accountType": string | null,
      "decisionGround": string,
      "decisionGroundReferenceUrl": string | null,
      "illegalContentLegalGround": string | null,
      "illegalContentExplanation": string | null,
      "incompatibleContentGround": string,
      "incompatibleContentExplanation": string | null,
      "incompatibleContentIllegal": boolean | null,
      "category": string,
      "categoryAddition": string[] | null,
      "categorySpecification": string[] | null,
      "categorySpecificationOther": string | null,
      "contentType": string[],
      "contentTypeOther": string | null,
      "contentLanguage": string | null,
      "contentDate": string,
      "contentIdEan": string | null,
      "territorialScope": string[] | null,
      "applicationDate": string,
      "decisionFacts": string,
      "sourceType": string,
      "sourceIdentity": string | null,
      "automatedDetection": boolean,
      "automatedDecision": string,
      "platformName": string,
      "platformUid": string,
      "createdAt": string
    }
  ],
  "pagination": {
    "total": number | undefined,
    "limit": number,
    "offset": number,
    "hasMore": boolean,
    "nextOffset": number | undefined,
    "prevOffset": number | undefined,
    "totalPages": number | undefined,
    "currentPage": number | undefined,
    "comment": string
  }
}

Status Codes

200
Success - Search results returned
503
Service Unavailable - Data processing in progress

GET /notifications

Retrieve system notifications

Description

Returns active system notifications including banners and toasts. Expired notifications are automatically filtered out.

Endpoint

GET /api/notifications

Query Parameters

No query parameters required.

Response Format

[
  {
    "id": string,
    "variant": "info" | "success" | "warning" | "danger",
    "type": "banner" | "toast",
    "message": string,
    "expiresIn": number | null,
    "timestamp": number
  }
]

Status Codes

200
Success - Notifications returned

General Information

Base URL

https://dsa.discord.food/api

Content Type

All endpoints return application/json

Error Responses

When an error occurs, the response will include an error message and appropriate HTTP status code.

Rate Limiting

All endpoints implement rate limiting. Check the response headers for rate limit information:

  • X-RateLimit-Limit - Maximum requests per window
  • X-RateLimit-Remaining - Remaining requests in current window
  • X-RateLimit-Reset - Time when the rate limit resets (Unix timestamp)