How to fill the AI Share of Voice Calculator with DataForSEO
============================================================

Data source: DataForSEO AI Optimization: LLM Mentions (AI answers (ChatGPT or Google AI Overviews) that mention a domain or keyword, with their cited sources).
A helper command builds the input rows from saved API responses.

Count citations per domain from your LLM Mentions responses (or from the AI Citation Tracker), one count per answer per domain, then fill the CSV.

1. Request the data
   POST https://api.dataforseo.com/v3/ai_optimization/llm_mentions/search_mentions/live
   Body:
   [
     {
       "target": [
         {
           "domain": "yourdomain.com"
         }
       ],
       "platform": "chat_gpt",
       "location_code": 2840,
       "language_code": "en",
       "limit": 100
     }
   ]
   Auth: HTTP Basic with your DataForSEO API login and password. Keep credentials out of shared files.

2. Save the complete JSON response (not just the task ID) next to this folder, e.g. response.json.

3. Fill Input-Template-blank.csv using the counts or prices described above.

4. Complete the columns DataForSEO can't supply:
   - Domain
   - Answers citing domain
   - Valid corpus answers
   - All answer-domain citations
   - Corpus ID

5. Open the workbook, clear the demo rows in Workspace (lime input cells only), and paste the CSV values at cell A13.

Filled automatically: the audit trail only (Source reference)
Source reference fills automatically with the task ID, endpoint, location, language, device and snapshot time, so every row is traceable.

Costs: estimate them first with the DataForSEO Cost Calculator (template 38). Live endpoints cost more than task_post/task_get.
Docs: https://docs.dataforseo.com/v3/