SuperAPI AI Directory

grok-search

General & other

View repository

Updated 10-16 06:15

About this skill

Use this skill when:

  • an AI agent needs current web evidence
  • an AI agent needs current X evidence
  • the caller wants JSON-first output with citations
  • the caller needs explicit control over domains, handles, dates, or depth

Environment:

  • requires XAI_API_KEY
  • also reads optional .env.local and .env from the caller's current working directory

Behavior:

  • JSON-first by default
  • citations are preserved in normalized output
  • text mode is available for manual inspection
  • image understanding is enabled for web and X search
  • video understanding is enabled for X search

Run:

  • node {baseDir}/scripts/grok-search.mjs "query"
  • node {baseDir}/scripts/grok-search.mjs "query" --mode x
  • node {baseDir}/scripts/grok-search.mjs "query" --format text
  • node {baseDir}/scripts/selftest.mjs

References:

  • see references/xai-search-capabilities.md for the supported search surface