Run python3 <skill-dir>/scripts/anysearch.py. Start with the smallest probe that can answer, read only sources that contribute evidence.
Pick the entry point
| User asks for… | Do |
|---|---|
| A field or record that a data source owns (a quote, a filing, a filtered paper list, a flight status) | Vertical search: get_sub_domains --domains <d> once, then search "<q>" --domain <d> --sub_domain <d.x> --sdp k=v,…. Output defaults to snippet here because the body is the answer. |
| Candidate pages for an ordinary question | search "<query>" --format compact --max-results 5; --format snippet --max-chars 300 when titles alone cannot pick a winner. |
| Several angles at once | batch_search --query … --query … (≤5), then extract the non-duplicate winners. |
| The full text of chosen pages | extract <url> [<url> …]; one header per document. |
Casual users do not speak in parameters. Translate before calling: company name → ticker (symbol=AAPL, A-shares cn_code=600519.SH), "recent" → period, "highly cited" → sort=cited_by_count:desc. Required parameters you cannot fill get an empty value (cn_code=); never invent fields — take names from the live get_sub_domains schema, not from memory.
Read results with these caveats
- Vertical parameters fail silently. If
--sub_domainis set but the results are ordinary web pages (news sites, Yahoo/Sina quote pages instead of a data row), the upstream ignored your parameters — usually a wrong symbol or key name. Fix the parameter; do not present the web results as structured data. - Sort/filter parameters can corrupt vertical results (observed:
academic.searchwithsort=returned mismatched title/URL/abstract triples). Treat filtered vertical hits as provisional;extractthe URL before citing a title–URL pair. - Compact and snippet carry no dates. For "latest / recent" questions, recency must be judged from extracted pages or from a vertical
periodparameter, not from rank. #Nrank is the only relevance signal; prefer lower ranks when choosing what to extract. Titles identify candidates; onlyextractestablishes a claim.
Flags
All flags accept snake_case and kebab-case (--max-chars = --max_chars). --auto_register, --api_key and -v work before or after the subcommand. stderr is quiet by default; -v prints key-pool bookkeeping. Details: commands.md; output sizing and extract reader backends: payload-control.md.
Access and recovery
The CLI uses anonymous access or its saved key pool. Auto-registration is on by default: when no active key can serve a request it creates an account on anysearch.com and stores a key locally (keys config --auto_register false turns it off). Do not print full keys.
On access failure read the actual error and keys status, then follow the matching branch in keys.md and retry the original query once. Do not repeat an identical request against a persistent failure.
domains.md is a snapshot for orientation only; parameter names and values come from the live schema.