---
type: "Source File"
title: "!/usr/bin/env python3"
description: "#!/usr/bin/env python3 \"\"\"MiniMax web search — supplement to brave_scorer. Usage: python3 minimax_search.py \"query\" NOTE: MiniMax's web_search plugin requires a separate account entitlement that is not enabled on this."
resource: "https://www.copecheck.com"
tags: ["copecheck", "main", "source-file", "py"]
timestamp: "2026-06-02T11:49:56Z"
site: "main"
source_path: "copecheck/minimax_search.py"
---

# !/usr/bin/env python3

Source path: `copecheck/minimax_search.py`  
Index snapshot generated: `2026-11-24T13:42:54Z`  
File modified: `2026-06-02T11:49:56Z`

```py
#!/usr/bin/env python3
"""MiniMax web search — supplement to brave_scorer. Usage: python3 minimax_search.py "query"

NOTE: MiniMax's web_search plugin requires a separate account entitlement that is not
enabled on this key. This script uses MiniMax-M2.7 for LLM-based analysis instead.
For live web results, pair with brave_scorer.py.
"""
import sys, os, json
import requests

[redacted secret-like line]
query = sys.argv[1] if len(sys.argv) > 1 else "AI job displacement"

payload = {
    "model": "MiniMax-M3",
    "messages": [
        {"role": "user", "content": (
            f"Analyse the following topic and summarise key claims, narratives, and evidence: {query}. "
            "Include any statistics, prominent figures, and typical arguments made for and against this position."
        )}
    ],
[redacted secret-like line]
}

resp = requests.post(
    "https://api.minimax.io/v1/chat/completions",
[redacted secret-like line]
    json=payload,
    timeout=30,
)

resp.raise_for_status()
data = resp.json()
text = data.get("choices", [{}])[0].get("message", {}).get("content", "")
print(json.dumps({"query": query, "result": text}, indent=2))
```
