Nudg3Docs

API Reference

Complete reference for all Nudg3 Public API v1 endpoints

API Reference

This section contains the complete reference for the Nudg3 Public API v1 endpoints.

Base URL

All API requests should be made to:

https://api.nudg3.ai/api/v1

For local development:

http://localhost:8000/api/v1

Authentication

All endpoints require authentication via API key (except health check):

Authorization: Bearer nudg3_live_ak_your_key

Or use the X-API-Key header:

X-API-Key: nudg3_live_ak_your_key

See Authentication for details on obtaining and managing API keys.

API Tiers

The Public API is organized into two tiers:

TierScopeEndpoints
Basicread:analyticsAll analytics endpoints
Premiumread:analytics + export:dataAnalytics + Export endpoints

Endpoint Categories

System

Basic API information and health checks.

EndpointMethodDescriptionAuth
/GETAPI root with endpoint listingNo
/healthGETHealth check endpointNo

Analytics (Tier 1 - Basic)

Core analytics endpoints for brand visibility tracking.

EndpointMethodDescription
/dashboardGETBrand visibility scores and metrics
/brandsGETList brands/competitors
/brands/{brand_id}GETGet brand details with metrics
/promptsGETList prompt templates
/prompts/{prompt_id}GETGet prompt performance metrics
/sourcesGETDomain-level source analytics
/urlsGETURL-level citations
/urls-detailedGETDetailed URL analytics with trends
/responsesGETAI provider response list
/aio-metricsGETGoogle AI Overview metrics
/aio-metrics/prompt/{id}GETPer-prompt AIO metrics
/filtersGETAvailable filter values

Analytics Endpoints

Detailed analytics endpoint documentation

Exports (Tier 2 - Premium)

Data export endpoints for BI tool integration.

EndpointMethodDescriptionFormat
/exports/chat-responsesGETFull LLM responsesCSV/TSV
/exports/sources-citationsGETComplete citation recordsCSV
/exports/dashboard-graphGETTime-series visibility dataCSV
/exports/prompts-mentionsGETPrompt-mention pairsCSV

Export Endpoints

Data export endpoint documentation

Request Format

Headers

All requests should include:

Authorization: Bearer nudg3_live_ak_your_key
Content-Type: application/json

Query Parameters

Common query parameters across analytics endpoints:

ParameterTypeDescription
start_datedateFilter start date (YYYY-MM-DD). Defaults to 30 days ago
end_datedateFilter end date (YYYY-MM-DD). Defaults to today
modelsarrayFilter by AI provider names (openai, anthropic, google, perplexity)
model_idsarrayFilter by specific model IDs (gpt-4o-mini, claude-3-5-haiku)
tagsarrayFilter by prompt template tags
pageintegerPage number (default: 1)
per_pageintegerItems per page (max: 100, default: 50)

Export-Specific Parameters

Export endpoints use different date parameters and have additional options:

ParameterTypeRequiredDescription
date_fromdateYesStart date for export (YYYY-MM-DD)
date_todateYesEnd date for export (YYYY-MM-DD)
formatstringNoExport format: csv (default) or tsv
excel_compatiblebooleanNoAdd BOM for Excel compatibility
include_type_hintsbooleanNoInclude type hints row in export

Important: Export endpoints use date_from and date_to (both required), while analytics endpoints use start_date and end_date (both optional).

Workspace Isolation: API keys are workspace-scoped. The workspace is automatically determined from your API key - you don't need to pass a workspace_id parameter.

Example Request

curl https://api.nudg3.ai/api/v1/dashboard \
  -H "Authorization: Bearer nudg3_live_ak_your_key"

The Public API v1 is read-only. All endpoints use GET method.

Response Format

Success Response

Successful responses return JSON with a standard envelope:

{
  "success": true,
  "data": {
    // Response data here
  },
  "message": "Human-readable success message"
}

For paginated endpoints, the data includes pagination info:

{
  "success": true,
  "data": {
    "items": [...],
    "pagination": {
      "page": 1,
      "per_page": 50,
      "total": 156,
      "total_pages": 4,
      "has_next": true,
      "has_prev": false
    }
  },
  "message": "Retrieved 50 items"
}

Error Response

Error responses follow a consistent format:

{
  "success": false,
  "detail": "Human-readable error message"
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Rate Limits

API requests are rate limited per workspace:

TierPer MinutePer Hour
Basic60600
Premium3003,000

See Rate Limits for details.

Pagination

List endpoints support page-based pagination:

GET /api/v1/brands?page=2&per_page=50

Response includes pagination metadata:

{
  "success": true,
  "data": {
    "competitors": [...],
    "pagination": {
      "page": 2,
      "per_page": 50,
      "total": 156,
      "total_pages": 4,
      "has_next": true,
      "has_prev": true
    }
  },
  "message": "Retrieved 50 brands"
}

Filtering

Most endpoints support filtering:

GET /api/v1/dashboard?models=openai,anthropic&start_date=2026-01-01&end_date=2026-01-31

Versioning

The API is versioned via URL path (/v1/). Breaking changes will be released under new versions.

The current API version is v1. Subscribe to our changelog for updates.