Skip to main content

List Competitors

Path Parameters

brandId
string
required
Brand ID

Response

competitors
Competitor[]
Array of competitor objects

Example Request

curl -X GET "https://api.opensight.ai/api/brands/brand_123/competitors" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "competitors": [
    {
      "id": "comp_123",
      "brand_id": "brand_123",
      "name": "Competitor Inc",
      "website_url": "https://competitor.com",
      "created_at": "2024-01-15T10:00:00Z"
    }
  ]
}

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Add Competitor

Path Parameters

brandId
string
required
Brand ID

Request Body

name
string
required
Competitor name (1-255 characters)
website_url
string
required
Valid competitor website URL

Response

competitor
Competitor
The created competitor object

Example Request

curl -X POST "https://api.opensight.ai/api/brands/brand_123/competitors" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Competitor Inc",
    "website_url": "https://competitor.com"
  }'

Example Response

{
  "competitor": {
    "id": "comp_123",
    "brand_id": "brand_123",
    "name": "Competitor Inc",
    "website_url": "https://competitor.com",
    "created_at": "2024-01-15T10:00:00Z"
  }
}

Errors

  • 403 Forbidden - Competitor limit reached for your plan
  • 404 Not Found - Brand not found or user doesn’t own it
  • 409 Conflict - Competitor already exists for this brand
  • 400 Bad Request - Invalid input data

Plan Limits

  • Free: 2 competitors per brand
  • Starter: 5 competitors per brand
  • Growth: 5 competitors per brand

Remove Competitor

Path Parameters

brandId
string
required
Brand ID
competitorId
string
required
Competitor ID

Response

success
boolean
Returns true if successful

Example Request

curl -X DELETE "https://api.opensight.ai/api/brands/brand_123/competitors/comp_123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "success": true
}

Errors

  • 404 Not Found - Brand or competitor not found, or user doesn’t own the brand

Get Competitor Comparison

Path Parameters

brandId
string
required
Brand ID

Response

share_of_voice
object[]
Share of voice percentages across all tracked brands
gaps
object[]
Prompts where competitors are mentioned but your brand is not
leaderboard
object[]
Rankings per prompt showing how brands compare

Example Request

curl -X GET "https://api.opensight.ai/api/brands/brand_123/competitors/comparison" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "share_of_voice": [
    {
      "brand_name": "Acme Inc",
      "percentage": 45.5
    },
    {
      "brand_name": "Competitor Inc",
      "percentage": 35.2
    },
    {
      "brand_name": "Other Corp",
      "percentage": 19.3
    }
  ],
  "gaps": [
    {
      "prompt": "Best project management software for teams",
      "competitors_present": ["Competitor Inc", "Other Corp"]
    }
  ],
  "leaderboard": [
    {
      "prompt": "Top CRM software for small businesses",
      "rankings": [
        {
          "name": "Acme Inc",
          "score": 85
        },
        {
          "name": "Competitor Inc",
          "score": 72
        }
      ]
    }
  ]
}

Errors

  • 404 Not Found - Brand not found or user doesn’t own it

Build docs developers (and LLMs) love