How to fill the SERP Overlap Keyword Clustering Template with DataForSEO
============================================================

Data source: DataForSEO SERP API: Google Organic (the top organic results for a query).
A helper command builds the input rows from saved API responses.

The overlap command compares every pair of saved SERPs from the same location, language and device and fills all six columns for you.

1. Request the data
   POST https://api.dataforseo.com/v3/serp/google/organic/live/advanced
   Body:
   [
     {
       "keyword": "your keyword",
       "location_code": 2840,
       "language_code": "en",
       "device": "desktop",
       "depth": 10
     }
   ]
   Send one task per query with identical location, language and device, and save each response.
   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. Convert it to the input CSV (offline, Python 3.10+, no API call, no credentials):
   python3 Automation/dataforseo_import.py overlap --input serp-*.json --output my-inputs.csv --depth 10 --cutoff 0.3

4. Complete the columns DataForSEO can't supply:
   - Nothing. Every input column fills automatically.

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

Filled automatically: Query A, Query B, Unique URLs A, Unique URLs B, Shared URLs, Review cutoff
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/