CommentKeyword API Documentation

Integrate Instagram automation into your applications with our powerful Keywords API. Manage comment keywords and automated responses programmatically.

Version 1.0REST APIJSON Format

Getting Started

Base URL: https://commentkeyword.com/api

What You Can Do

  • List and search your Instagram comment keywords
  • Create new keywords with automated responses
  • Update existing keywords and their settings
  • Delete keywords when no longer needed
  • Configure comment replies and DM messages

Authentication

CommentKeyword uses Personal Access Tokens (PATs) for API authentication. Tokens are scoped to your workspace and require specific permissions.

Generating Access Tokens

  1. Navigate to Settings in your CommentKeyword dashboard
  2. Go to the API Access section
  3. Click "Generate New Token"
  4. Assign the required permissions:
    • keywords:read - View keywords
    • keywords:write - Create and update keywords
    • keywords:delete - Delete keywords
  5. Copy the token immediately (it won't be shown again)

Using Tokens

Include your token in the Authorization header:

curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
     https://commentkeyword.com/api/keywords

Security Best Practices

  • • Keep tokens secure - treat them like passwords
  • • Rotate tokens regularly for security
  • • Revoke tokens when no longer needed
  • • Assign minimal permissions required for your use case

API Endpoints

GET/api/keywords

Retrieve all keywords for your workspace with filtering and pagination.

Query Parameters

  • search - Filter keywords containing text
  • status - Filter by active/inactive
  • limit - Number of results (max 100)
  • offset - Pagination offset

Permission Required

keywords:read
POST/api/keywords

Create a new keyword for automated Instagram engagement.

Required Fields

  • keyword - The keyword to match

Optional Fields

  • matchMode - "exact" or "contains"
  • commentReplies - Array of reply variants
  • dmMessages - Array of DM variants
  • delaySec - Delay before DM (1-60 sec)

Permission Required

keywords:write
GET/api/keywords/{id}

Retrieve details for a specific keyword by ID.

Path Parameters

  • id - Keyword ID (number)

Permission Required

keywords:read
PUT/api/keywords/{id}

Update an existing keyword. Only provided fields will be updated.

Updatable Fields

  • keyword - Change the keyword text
  • matchMode - Update match type
  • commentReplies - Update replies
  • dmMessages - Update DM messages
  • delaySec - Update delay timing
  • isActive - Enable/disable keyword

Permission Required

keywords:write
DELETE/api/keywords/{id}

Permanently delete a keyword.

Path Parameters

  • id - Keyword ID (number)

Permission Required

keywords:delete

Error Handling

The API uses standard HTTP status codes and returns detailed error information in JSON format.

Error Response Format

{
  "error": "Error Type",
  "message": "Detailed error description"
}

Common Status Codes

400Bad Request - Invalid parameters
401Unauthorized - Invalid token
403Forbidden - Insufficient permissions
404Not Found - Keyword not found
409Conflict - Duplicate keyword
500Server Error - Contact support

Code Examples

JavaScript/Node.js

const COMMENTKEYWORD_TOKEN = 'your_token_here';
const BASE_URL = 'https://commentkeyword.com/api';

// Get all keywords
async function getKeywords() {
  const response = await fetch(`${BASE_URL}/keywords`, {
    headers: {
      'Authorization': `Bearer ${COMMENTKEYWORD_TOKEN}`,
      'Content-Type': 'application/json'
    }
  });
  return response.json();
}

// Create a new keyword
async function createKeyword(keyword, options = {}) {
  const response = await fetch(`${BASE_URL}/keywords`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${COMMENTKEYWORD_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      keyword,
      ...options
    })
  });
  return response.json();
}

Python

import requests

COMMENTKEYWORD_TOKEN = 'your_token_here'
BASE_URL = 'https://commentkeyword.com/api'

headers = {
    'Authorization': f'Bearer {COMMENTKEYWORD_TOKEN}',
    'Content-Type': 'application/json'
}

def get_keywords():
    response = requests.get(f'{BASE_URL}/keywords', headers=headers)
    return response.json()

def create_keyword(keyword, **options):
    data = {'keyword': keyword, **options}
    response = requests.post(f'{BASE_URL}/keywords', json=data, headers=headers)
    return response.json()

cURL

# List keywords
curl -H "Authorization: Bearer YOUR_TOKEN" \
     https://commentkeyword.com/api/keywords

# Create keyword  
curl -X POST \
     -H "Authorization: Bearer YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"keyword": "sale", "matchMode": "contains"}' \
     https://commentkeyword.com/api/keywords

# Update keyword
curl -X PUT \
     -H "Authorization: Bearer YOUR_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"delaySec": 15, "isActive": false}' \
     https://commentkeyword.com/api/keywords/15

Rate Limits

100
requests per minute
20
burst allowance
Token
based limiting

Rate Limit Headers

Rate limit information is included in response headers:

  • X-RateLimit-Limit - Request limit per minute
  • X-RateLimit-Remaining - Remaining requests
  • X-RateLimit-Reset - Unix timestamp when limit resets

Need Help?

Documentation

Check our comprehensive help center

Visit Help Center →

System Status

Check our API status and uptime

View Status →

Contact Support

Get help from our support team

Contact Us →