搜索翻译
接口说明
将搜索文本从源语种翻译为目标语种。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alimt:TranslateSearch |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| FormatType |
string |
是 |
翻译文本的格式。text 表示按纯文本处理,html 表示按 HTML 格式处理。 |
text |
| SourceLanguage |
string |
是 |
原文语种代码。 |
zh |
| TargetLanguage |
string |
是 |
目标语种代码。 |
en |
| Scene |
string |
是 |
翻译场景,搜索查询场景取值为 query。 |
query |
| SourceText |
string |
是 |
待翻译的搜索文本。 |
今天天气不错 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
86D18195-D89C-4C8C-9DC4-5FCE789CE6D5 |
| Code |
string |
状态码。 |
200 |
| Message |
string |
返回信息。 |
success |
| Data |
object |
翻译结果数据。 |
{"Translated":"The weather is nice today."} |
| Translated |
string |
翻译结果。 |
The weather is nice today. |
示例
正常返回示例
JSON格式
{
"RequestId": "86D18195-D89C-4C8C-9DC4-5FCE789CE6D5",
"Code": "200",
"Message": "success",
"Data": {
"Translated": "The weather is nice today."
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。