Dataify Yandex Search
Workflow
- Read the user's request and map it to the API fields below.
- Apply defaults from the parameter descriptions only. Do not use the example YAML body as the source of defaults.
- Before every API call, run the bundled script with
--previewand show the complete table to the user:
python3 scripts/yandex_search.py --text "<search query>" --preview
- Ask the user whether they want to modify any parameters. Do not call the API until the user confirms.
- If the user requests changes, adjust the arguments, show the complete preview table again, and ask for confirmation again.
- After confirmation, check the token. If the user did not provide a token and
DATAIFY_API_TOKENis not available, stop and ask the user to provide a Dataify API token or register at Dataify Dashboard. - Call the API with the confirmed parameters:
python3 scripts/yandex_search.py --text "<search query>" --token "<token>"
- Return the script stdout directly to the user. Do not parse, summarize, translate, filter, reformat, or otherwise process the API response.
Preview Table
Always show a complete field list before calling the API. Do not include Authorization in the table. The table must contain only these columns:
参数名当前值默认值说明
The bundled script generates this table with:
python3 scripts/yandex_search.py --text "<search query>" --preview
Defaults
Use these documented defaults when the user does not specify a field:
engine:yandexjson:1yandex_domain:yandex.comlang:enwhenyandex_domainisyandex.comfamily_mode:1fix_typo:truegroups_on_page:20no_cache:false
No documented default:
text: required from the user request.lr: leave unset unless the user specifies it.p: leave unset unless the user specifies it; page numbering starts from0when specified.
Important corrections from the API example body:
- Do not treat example
family_mode: "0"as the default. The description default is medium, so use1. - Do not treat example
no_cache: "true"as the default. The description saysfalseis the default.
Field Mapping
--json: output format. Use1JSON,2JSON+HTML,3HTML, or4Light JSON.--yandex-domain: Yandex domain such asyandex.com,yandex.ru,ya.ru,yandex.kz,yandex.com.tr, or another supported domain.--lang: search language, for exampleen,ru,tr.--lr: country or region ID.--p: page number, starting from0.--family-mode: safe search mode. Use0off,1moderate,2strict.--fix-typo:trueorfalse.--groups-on-page: maximum result groups per page.--no-cache:trueto bypass cache,falseto use cache.--params-json: JSON object of raw field overrides for unusual requests. Usenullto omit a defaulted field.
For the full field list, read references/api_fields.md only when needed.
Examples
Preview parameters for a normal search:
python3 scripts/yandex_search.py --text "OpenAI latest news" --preview
After user confirmation, call the API:
python3 scripts/yandex_search.py --text "OpenAI latest news" --token "$DATAIFY_API_TOKEN"
Preview Russian Yandex, page 2, HTML output:
python3 scripts/yandex_search.py --text "artificial intelligence news" --yandex-domain yandex.ru --lang ru --p 1 --json 3 --preview
Scan to join WeChat group