Enception Logo
REST APILLM Crawling Service

Keywords & Answers API

API for managing keywords and accessing AI-generated answers. Used by LLM crawling services to track brand mentions across ChatGPT, Perplexity, Gemini, and other AI platforms.

Authentication

All endpoints require authentication via the X-API-Key header:

curl -H "X-API-Key: $LLM_CRAWLING_SERVICE_TOKEN" \
  https://enception.ai/api2/keywords

Note: API key cannot perform DELETE operations. Access is scoped to clients within the configured team only.

Keywords API

GET/api2/keywords

Fetch keywords for accessible clients.

Query Parameters

ParameterTypeRequiredDescription
client_idUUIDNoFilter by specific client

Response

{
  "keywords": [
    {
      "id": "uuid",
      "client_id": "uuid",
      "core_keyword": "best crm software",
      "extended_keywords": ["crm for small business"],
      "platforms": ["chatgpt", "perplexity", "gemini"],
      "interval_days": 1,
      "locale": "us",
      "next_queried": "2024-01-15T00:00:00Z"
    }
  ]
}
POST/api2/keywords

Create a new keyword.

Request Body

FieldTypeRequiredDescription
client_idUUIDYesClient this keyword belongs to
core_keywordstringYesPrimary keyword to track
extended_keywordsstring[]NoRelated keywords
platformsstring[]NoAI platforms to query
interval_daysnumberNoQuery frequency in days (default: 1)
localestringNoGeographic locale (default: "us")

Example Request

curl -X POST https://enception.ai/api2/keywords \
  -H "X-API-Key: $LLM_CRAWLING_SERVICE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "abc-123",
    "core_keyword": "best project management software",
    "platforms": ["chatgpt", "perplexity"]
  }'
PUT/api2/keywords

Update an existing keyword. Requires id field.

DELETE/api2/keywords?id={id}

Delete a keyword by ID. Not available via API key.

Answers API

POST/api2/answers

Create a new answer from an AI platform response.

Request Body

FieldTypeRequiredDescription
keyword_idUUIDYesKeyword this answer belongs to
core_keywordstringYesThe core keyword text
platformstringYesAI platform (chatgpt, perplexity, gemini, etc.)
answerstringYesThe full answer text
date_queriedstringYesDate queried (YYYY-MM-DD)
sourcesstring[]NoSource URLs cited
brands_mentionedstring[]NoBrands mentioned in answer
GET/api2/answers

Fetch answers for accessible clients' keywords.

Query Parameters

ParameterTypeDescription
client_idUUIDFilter by specific client
keyword_idUUIDFilter by specific keyword (optimized)
keyword_idsstringComma-separated UUIDs (optimized)
datestringFilter by date (YYYY-MM-DD)

Performance Tip: Using keyword_id or keyword_ids bypasses client filtering and is significantly faster.

GET/api2/answers/{id}

Fetch a single answer with full details including answer text.

POST/api2/answers/analyze-brands

Analyze answer text to extract brand mentions using GPT.

Request Body

{
  "answer": "The top CRM solutions include Salesforce...",
  "clientBrand": "Acme CRM",
  "alternativeNames": ["Acme", "AcmeCRM"]
}

Response

{
  "brands": ["Salesforce", "HubSpot", "Acme CRM"]
}

Error Responses

Status CodeDescription
400Bad Request - Missing or invalid parameters
401Unauthorized - Invalid or missing authentication
403Forbidden - No access to requested resource
404Not Found - Resource doesn't exist
500Internal Server Error