Create a GEO (LLM visibility) tracking report using Bright Data datasets (mandatory) and output an HTML report with actions.
You help the user:
The Bright Data API is mandatory for automated collection.
example.com)BRIGHTDATA_API_KEY env var (or provided by user)CHATGPT_DATASET_ID = "gd_m7aof0k82r803d5bjm"
PERPLEXITY_DATASET_ID = "gd_m7dhdot1vw9a7gc1n"
GEMINI_DATASET_ID = "gd_mbz66arm2mf9cu856y"
IMPORTANT: Before running the script, ask the user which chatbots they want to run:
They can select one, two, or all three. Only pass the dataset IDs for the selected chatbots to the script.
Avoid exposing the BrightData API key in chat messages or code.
Check if key exists: Before running the script, check if BRIGHTDATA_API_KEY is already set in the environment:
# Check without exposing the value
if [ -z "$BRIGHTDATA_API_KEY" ]; then echo "Not set"; else echo "Set"; fi
If key is not set: Ask the user to export it themselves with these instructions:
export BRIGHTDATA_API_KEY="your-key-here"Never read or display the key: If you need to verify it's set, only check if the variable exists (is non-empty), never echo or display its value.
If missing: stop and ask the user to set them using the export command above.
Use:
geo-state-report/scripts/brightdata-geo.pyIt:
results.json (HTML report is NOT generated by the script).Output structure: All files are saved in a dated folder (YYYY-MM-DD) within the specified --out-dir:
{out-dir}/{YYYY-MM-DD}/results.json - Complete results data{out-dir}/{YYYY-MM-DD}/snapshots/{chatbot}.json - Snapshot metadata per chatbot{out-dir}/{YYYY-MM-DD}/raw/{chatbot}-{snapshot_id}.json - Raw snapshot data{out-dir}/{YYYY-MM-DD}/report.html - HTML report (generated by AI, see below)# Ensure BRIGHTDATA_API_KEY is set (user should export it themselves)
python3 geo-state-report/scripts/brightdata-geo.py \
--check-url "https://example.com" \
--prompts-file prompts.txt \
--chatgpt-dataset-id "gd_m7aof0k82r803d5bjm" \
--perplexity-dataset-id "gd_m7dhdot1vw9a7gc1n" \
--gemini-dataset-id "gd_mbz66arm2mf9cu856y" \
--target-domains "example.com" \
--brand-terms "Example,Example Product" \
--out-dir ./geo-run
# Files will be saved in: ./geo-run/2025-01-15/ (or current date)
Note: Only include the dataset ID flags for chatbots the user selected (ChatGPT, Perplexity, and/or Gemini).
After the script completes successfully, you MUST:
Read the results.json file from the dated output folder
Analyze the data and provide initial conclusions, including:
Generate the HTML report (report.html) in the same dated output folder:
{out-dir}/{YYYY-MM-DD}/report.htmlPresent these conclusions clearly and concisely to the user, and let them know the HTML report has been generated.
IMPORTANT: The Python script does NOT generate the HTML report. YOU (the AI) must generate report.html from scratch after reading the results.json file. Create a customized, beautiful report based on:
Report generation guidelines:
Read the results.json after script execution to understand the actual data
Generate the HTML report by:
Design principles:
Required elements:
report.html (generated by AI, saved to the dated output folder)holly-and-stick.comUse guidance from obsidian/GEO Playbook.md: