API Reference
Custom Classification

Custom Classification

Build your own classification layer on top of Frontrun's AI. Define rules that auto-tag entities, manually tag companies, and query with your custom data merged in.


Classification Rules

Rules auto-classify entities based on pattern matching. When you query /follows/enriched, matching entities get your custom tags, sectors, and types applied automatically.

Create a Rule

POST /v1/classify/rulesFree

curl -X POST https://frontrun.vc/v1/classify/rules \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "DeFi Protocols",
    "conditions": {
      "bio_keywords": ["defi", "lending protocol", "liquidity"],
      "must_be_company": true
    },
    "actions": {
      "custom_sector": "DeFi",
      "tags": ["watchlist", "defi-protocol"],
      "priority": "high"
    }
  }'

Conditions

All conditions must match (AND logic). Within bio_keywords, any keyword triggers a match (OR logic).

FieldTypeDescription
bio_keywordsstring[]Match if bio contains any of these keywords (case-insensitive)
username_patternstringRegex pattern to match against username
sector_containsstringMatch if AI-classified sector contains this string
must_be_companybooleantrue = only companies, false = only individuals

Actions

FieldTypeDescription
custom_sectorstringOverride sector classification
custom_entity_typestringOverride entity type
tagsstring[]Tags to apply (e.g., ["watchlist", "competitor"])
prioritystring"high", "medium", or "low"

List Rules

GET /v1/classify/rulesFree

Update a Rule

PUT /v1/classify/rules/:idFree

Delete a Rule

DELETE /v1/classify/rules/:idFree


Custom Tags

Manually tag individual entities with your own sectors, types, and notes.

Add/Update Tags

POST /v1/tagsFree

curl -X POST https://frontrun.vc/v1/tags \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "stealth_ai_co",
    "tags": ["portfolio", "series-a"],
    "custom_sector": "AI Infrastructure",
    "notes": "Series A target Q2."
  }'
FieldTypeRequiredDescription
twitter_user_idstringOne of theseEntity's Twitter user ID
usernamestringrequiredEntity's username
tagsstring[]NoCustom tags
custom_sectorstringNoSector override
custom_entity_typestringNoEntity type override
notesstringNoFree-text notes

List Tags

GET /v1/tagsFree

# All tagged entities
curl ".../v1/tags"
 
# Filter by tag
curl ".../v1/tags?tag=portfolio"
 
# Filter by custom sector
curl ".../v1/tags?sector=DeFi"

Remove Tags

DELETE /v1/tags/:twitter_user_idFree


On-Demand Classification

POST /v1/classify

Classify specific entities with AI classification + your custom rules + your custom tags merged.

Cost: $0.03/entity

curl -X POST https://frontrun.vc/v1/classify \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"usernames": ["stealth_ai_co", "dev_infra_xyz"]}'
{
  "total": 2,
  "cost_cents": 6,
  "balance_cents": 4839,
  "results": [
    {
      "twitter_user_id": "1111111111",
      "username": "stealth_ai_co",
      "description": "Automating enterprise workflows with LLMs",
      "classification": {
        "is_company": true,
        "confidence": "high",
        "sector": "AI/ML",
        "entity_type": "startup",
        "sub_category": "Enterprise AI",
        "tags": []
      },
      "custom": {
        "tags": ["portfolio", "series-a"],
        "sector": "AI Infrastructure",
        "notes": "Series A target Q2."
      }
    }
  ]
}