有道非官方介面-查詢英語單詞詳細資訊 C# 有道API翻譯 查詢單詞詳細資訊
阿新 • • 發佈:2018-11-21
有道翻譯有官方介面,也有非官方介面。
有道官方介面
官方介面:https://openapi.youdao.com/openapi
可查詢英語單詞註釋、單詞發音、網路釋義(不一定存在),可獲取線上發音地址。
具體使用,可參考 C# 有道API翻譯 查詢單詞詳細資訊
有道非官方介面
何謂非官方介面,即不對外發布、小範圍使用的介面。這種一般人都不知道的介面,官方不能保證資料的準確性
API介面:http://dict.youdao.com/jsonapi
拼接引數:
jsonversion
:json 版本,目前已知取值1
或2
,返回結果大同小異。本文件採用2
client
:客戶端型別,取值mobile
q
:查詢的單詞dicts
:需要查詢哪些字典。目前已知{"count":99,"dicts":[["ec","ce","newcj","newjc","kc","ck","fc","cf","multle","jtj","pic_dict","tc","ct","typos","special","tcb","baike","lang","simple","wordform","exam_dict","ctc","web_search","auth_sents_part","ec21","phrs","input","wikipedia_digest","ee","collins","ugc","media_sents_part","syno","rel_word","longman","ce_new","le","newcj_sents","blng_sents_part","hh"],["ugc"],["longman"],["newjc"],["newcj"],["web_trans"],["fanyi"]]}
keyfrom
:mdict. + 版本號 +.手機平臺
。可為空model
:手機型號。可為空mid
:平臺版本。可為空imei
:未知。可為空vendor
:應用下載平臺。可為空screen
:螢幕寬高。可為空ssid
:使用者名稱。可為空network
:網路狀態,取值wifi
、4G
、5G
等abtest
:ab測試。可為空xmlVersion
:預設使用5.1
案例:查詢account單詞
詳細資料:
1 { 2 "auth_sents_part": { 3 "more": "auth_sents", 4 "sent": [ 5 { 6 "foreign": "This purchase will <b>account</b> for 39.5% of the outstanding shares of the brokerage following the issuance. ", 7 "score": 0.9831430912017822, 8 "source": "FORBES: <i>JP Morgan Sweetens Deal That Is Still Sour For Bear Investors</i>", 9 "speech": "This+purchase+will+account+for+39.5%25+of+the+outstanding+shares+of+the+brokerage+following+the+issuance.+", 10 "speech-size": "30kb", 11 "url": "http://www.forbes.com/2008/03/24/bear-stearns-jpmorgan-markets-equity-cx_po_0324markets06.html" 12 }, 13 { 14 "foreign": "Spouse heirs, of course, can still claim the <b>account</b> as their own and name new heirs. ", 15 "score": 0.9831407070159912, 16 "source": "FORBES: <i>IRA Tips and Traps</i>", 17 "speech": "Spouse+heirs%2C+of+course%2C+can+still+claim+the+account+as+their+own+and+name+new+heirs.+", 18 "speech-size": "25kb", 19 "url": "http://www.forbes.com/forbes/2001/0611/216.html" 20 }, 21 { 22 "foreign": "Best for having your frequent flier <b>account</b> balances within easy reach for spontaneous upgrades. ", 23 "score": 0.9831383228302002, 24 "source": "BBC: <i>Five best air travel apps</i>", 25 "speech": "Best+for+having+your+frequent+flier+account+balances+within+easy+reach+for+spontaneous+upgrades.+", 26 "speech-size": "28kb", 27 "url": "http://www.bbc.com/travel/story/20120619-five-best-air-travel-apps" 28 } 29 ], 30 "sentence-count": 6 31 }, 32 "blng_sents_part": { 33 "more": "blng_sents", 34 "sentence-count": 6, 35 "sentence-pair": [ 36 { 37 "aligned-words": { 38 "src": { 39 "chars": [ 40 { 41 "@e": "4", 42 "@id": "0", 43 "@s": "1", 44 "aligns": { 45 "sc": [ 46 { 47 "@id": "0" 48 } 49 ], 50 "tc": [ 51 { 52 "@id": "0" 53 } 54 ] 55 } 56 }, 57 { 58 "@e": "12", 59 "@id": "1", 60 "@s": "5", 61 "aligns": { 62 "sc": [ 63 { 64 "@id": "1" 65 } 66 ], 67 "tc": [ 68 { 69 "@id": "1" 70 } 71 ] 72 }, 73 "q": [ 74 { 75 "@e": "12", 76 "@s": "5" 77 } 78 ] 79 }, 80 { 81 "@e": "32", 82 "@id": "2", 83 "@s": "13", 84 "aligns": { 85 "sc": [ 86 { 87 "@id": "2" 88 } 89 ], 90 "tc": [ 91 { 92 "@id": "2" 93 } 94 ] 95 } 96 } 97 ] 98 }, 99 "tran": { 100 "chars": [ 101 { 102 "@e": "2", 103 "@id": "0", 104 "@s": "1", 105 "aligns": { 106 "sc": [ 107 { 108 "@id": "0" 109 } 110 ], 111 "tc": [ 112 { 113 "@id": "0" 114 } 115 ] 116 } 117 }, 118 { 119 "@e": "5", 120 "@id": "1", 121 "@s": "3", 122 "aligns": { 123 "sc": [ 124 { 125 "@id": "1" 126 } 127 ], 128 "tc": [ 129 { 130 "@id": "1" 131 } 132 ] 133 } 134 }, 135 { 136 "@e": "9", 137 "@id": "2", 138 "@s": "5", 139 "aligns": { 140 "sc": [ 141 { 142 "@id": "2" 143 } 144 ], 145 "tc": [ 146 { 147 "@id": "2" 148 } 149 ] 150 } 151 } 152 ] 153 } 154 }, 155 "sentence": "His account contradicted itself.", 156 "sentence-eng": "His <b>account</b> contradicted itself.", 157 "sentence-speech": "His+account+contradicted+itself.&le=eng", 158 "sentence-translation": "他的解釋自相矛盾。", 159 "source": "《21世紀大英漢詞典》", 160 "speech-size": "9kb", 161 "url": "http://《21世紀大英漢詞典》/" 162 }, 163 { 164 "aligned-words": { 165 "src": { 166 "chars": [ 167 { 168 "@e": "6", 169 "@id": "0", 170 "@s": "1", 171 "aligns": { 172 "sc": [ 173 { 174 "@id": "0" 175 } 176 ], 177 "tc": [ 178 { 179 "@id": "0" 180 } 181 ] 182 } 183 }, 184 { 185 "@e": "14", 186 "@id": "1", 187 "@s": "7", 188 "aligns": { 189 "sc": [ 190 { 191 "@id": "1" 192 } 193 ], 194 "tc": [ 195 { 196 "@id": "1" 197 } 198 ] 199 } 200 }, 201 { 202 "@e": "23", 203 "@id": "2", 204 "@s": "15", 205 "aligns": { 206 "sc": [ 207 { 208 "@id": "2" 209 } 210 ], 211 "tc": [ 212 { 213 "@id": "5" 214 } 215 ] 216 } 217 }, 218 { 219 "@e": "28", 220 "@id": "3", 221 "@s": "24", 222 "aligns": { 223 "sc": [ 224 { 225 "@id": "3" 226 } 227 ], 228 "tc": [ 229 { 230 "@id": "2" 231 } 232 ] 233 } 234 }, 235 { 236 "@e": "32", 237 "@id": "4", 238 "@s": "29", 239 "aligns": { 240 "sc": [ 241 { 242 "@id": "4" 243 } 244 ], 245 "tc": [ 246 { 247 "@id": "3" 248 } 249 ] 250 } 251 }, 252 { 253 "@e": "40", 254 "@id": "5", 255 "@s": "33", 256 "aligns": { 257 "sc": [ 258 { 259 "@id": "5" 260 } 261 ], 262 "tc": [ 263 { 264 "@id": "4" 265 } 266 ] 267 }, 268 "q": [ 269 { 270 "@e": "40", 271 "@s": "33" 272 } 273 ] 274 } 275 ] 276 }, 277 "tran": { 278 "chars": [ 279 { 280 "@e": "3", 281 "@id": "0", 282 "@s": "1", 283 "aligns": { 284 "sc": [ 285 { 286 "@id": "0" 287 } 288 ], 289 "tc": [ 290 { 291 "@id": "0" 292 } 293 ] 294 } 295 }, 296 { 297 "@e": "5", 298 "@id": "1", 299 "@s": "3", 300 "aligns": { 301 "sc": [ 302 { 303 "@id": "1" 304 } 305 ], 306 "tc": [ 307 { 308 "@id": "1" 309 } 310 ] 311 } 312 }, 313 { 314 "@e": "6", 315 "@id": "2", 316 "@s": "5", 317 "aligns": { 318 "sc": [ 319 { 320 "@id": "3" 321 } 322 ], 323 "tc": [ 324 { 325 "@id": "2" 326 } 327 ] 328 } 329 }, 330 { 331 "@e": "8", 332 "@id": "3", 333 "@s": "6", 334 "aligns": { 335 "sc": [ 336 { 337 "@id": "4" 338 } 339 ], 340 "tc": [ 341 { 342 "@id": "3" 343 } 344 ] 345 } 346 }, 347 { 348 "@e": "11", 349 "@id": "4", 350 "@s": "9", 351 "aligns": { 352 "sc": [ 353 { 354 "@id": "5" 355 } 356 ], 357 "tc": [ 358 { 359 "@id": "4" 360 } 361 ] 362 } 363 }, 364 { 365 "@e": "13", 366 "@id": "5", 367 "@s": "11", 368 "aligns": { 369 "sc": [ 370 { 371 "@id": "2" 372 } 373 ], 374 "tc": [ 375 { 376 "@id": "5" 377 } 378 ] 379 } 380 } 381 ] 382 } 383 }, 384 "sentence": "These figures disagree with our account.", 385 "sentence-eng": "These figures disagree with our <b>account</b>.", 386 "sentence-speech": "These+figures+disagree+with+our+account.&le=eng", 387 "sentence-translation": "這些數字與我們的賬單不符。", 388 "source": "《21世紀大英漢詞典》", 389 "speech-size": "11kb", 390 "url": "http://《21世紀大英漢詞典》/" 391 }, 392 { 393 "aligned-words": { 394 "src": { 395 "chars": [ 396 { 397 "@e": "4", 398 "@id": "0", 399 "@s": "1", 400 "aligns": { 401 "sc": [ 402 { 403 "@id": "0" 404 } 405 ], 406 "tc": [ 407 { 408 "@id": "0" 409 }, 410 { 411 "@id": "3" 412 } 413 ] 414 } 415 }, 416 { 417 "@e": "9", 418 "@id": "1", 419 "@s": "5", 420 "aligns": { 421 "sc": [ 422 { 423 "@id": "1" 424 } 425 ], 426 "tc": [ 427 { 428 "@id": "2" 429 } 430 ] 431 } 432 }, 433 { 434 "@e": "17", 435 "@id": "2", 436 "@s": "10", 437 "aligns": { 438 "sc": [ 439 { 440 "@id": "2" 441 } 442 ], 443 "tc": [ 444 { 445 "@id": "8" 446 } 447 ] 448 }, 449 "q": [ 450 { 451 "@e": "17", 452 "@s": "10" 453 } 454 ] 455 }, 456 { 457 "@e": "20", 458 "@id": "3", 459 "@s": "18", 460 "aligns": { 461 "sc": [ 462 { 463 "@id": "3" 464 } 465 ], 466 "tc": [ 467 { 468 "@id": "6" 469 } 470 ] 471 } 472 }, 473 { 474 "@e": "27", 475 "@id": "4", 476 "@s": "21", 477 "aligns": { 478 "sc": [ 479 { 480 "@id": "4" 481 } 482 ], 483 "tc": [ 484 { 485 "@id": "7" 486 } 487 ] 488 } 489 }, 490 { 491 "@e": "46", 492 "@id": "6", 493 "@s": "42", 494 "aligns": { 495 "sc": [ 496 { 497 "@id": "6" 498 } 499 ], 500 "tc": [ 501 { 502 "@id": "5" 503 } 504 ] 505 } 506 } 507 ] 508 }, 509 "tran": { 510 "chars": [ 511 { 512 "@e": "2", 513 "@id": "0", 514 "@s": "1", 515 "aligns": { 516 "sc": [ 517 { 518 "@id": "0" 519 } 520 ], 521 "tc": [ 522 { 523 "@id": "0" 524 }, 525 { 526 "@id": "3" 527 } 528 ] 529 } 530 }, 531 { 532 "@e": "4", 533 "@id": "2", 534 "@s": "2", 535 "aligns": { 536 "sc": [ 537 { 538 "@id": "1" 539 } 540 ], 541 "tc": [ 542 { 543 "@id": "2" 544 } 545 ] 546 } 547 }, 548 { 549 "@e": "6", 550 "@id": "3", 551 "@s": "5", 552 "aligns": { 553 "sc": [ 554 { 555 "@id": "0" 556 } 557 ], 558 "tc": [ 559 { 560 "@id": "0" 561 }, 562 { 563 "@id": "3" 564 } 565 ] 566 } 567 }, 568 { 569 "@e": "11", 570 "@id": "5", 571 "@s": "7", 572 "aligns": { 573 "sc": [ 574 { 575 "@id": "6" 576 } 577 ], 578 "tc": [ 579 { 580 "@id": "5" 581 } 582 ] 583 } 584 }, 585 { 586 "@e": "12", 587 "@id": "6", 588 "@s": "11", 589 "aligns": { 590 "sc": [ 591 { 592 "@id": "3" 593 } 594 ], 595 "tc": [ 596 { 597 "@id": "6" 598 } 599 ] 600 } 601 }, 602 { 603 "@e": "14", 604 "@id": "7", 605 "@s": "12", 606 "aligns": { 607 "sc": [ 608 { 609 "@id": "4" 610 } 611 ], 612 "tc": [ 613 { 614 "@id": "7" 615 } 616 ] 617 } 618 }, 619 { 620 "@e": "16", 621 "@id": "8", 622 "@s": "14", 623 "aligns": { 624 "sc": [ 625 { 626 "@id": "2" 627 } 628 ], 629 "tc": [ 630 { 631 "@id": "8" 632 } 633 ] 634 } 635 } 636 ] 637 } 638 }, 639 "sentence": "You must account to father what you have done.", 640 "sentence-eng": "You must <b>account</b> to father what you have done.", 641 "sentence-speech": "You+must+account+to+father+what+you+have+done.&le=eng", 642 "sentence-translation": "你必須把你的所作所為對父親解釋清楚。", 643 "source": "《21世紀大英漢詞典》", 644 "speech-size": "13kb", 645 "url": "http://《21世紀大英漢詞典》/" 646 } 647 ] 648 }, 649 "collins": { 650 "collins_entries": [ 651 { 652 "basic_entries": { 653 "basic_entry": [ 654 { 655 "cet": "CET4 TEM4", 656 "headword": "account", 657 "wordforms": { 658 "wordform": [ 659 { 660 "word": "accounting" 661 }, 662 { 663 "word": "accounted" 664 }, 665 { 666 "word": "accounts" 667 } 668 ] 669 } 670 } 671 ] 672 }, 673 "entries": { 674 "entry": [ 675 { 676 "tran_entry": [ 677 { 678 "exam_sents": { 679 "sent": [ 680 { 681 "chn_sent": "有些銀行使開一個賬戶困難重重。", 682 "eng_sent": "Some banks make it difficult to open an account." 683 } 684 ] 685 }, 686 "pos_entry": { 687 "pos": "N-COUNT", 688 "pos_tips": "可數名詞" 689 }, 690 "tran": "If you have an <b>account</b> with a bank or a similar organization, you have an arrangement to leave your money there and take some out when you need it. 賬戶" 691 } 692 ] 693 }, 694 { 695 "tran_entry": [ 696 { 697 "exam_sents": { 698 "sent": [ 699 { 700 "chn_sent": "所有的三家網路代理公司都誇口說他們已贏得了大客戶。", 701 "eng_sent": "All three Internet agencies boast they've won major accounts." 702 } 703 ] 704 }, 705 "pos_entry": { 706 "pos": "N-COUNT", 707 "pos_tips": "可數名詞" 708 }, 709 "prof": "商業", 710 "tran": "In business, a regular customer of a company can be referred to as an <b>account</b>, especially when the customer is another company. 客戶" 711 } 712 ] 713 }, 714 { 715 "tran_entry": [ 716 { 717 "exam_sents": { 718 "sent": [ 719 { 720 "chn_sent": "他儲存了詳細的賬目。", 721 "eng_sent": "He kept detailed accounts." 722 } 723 ] 724 }, 725 "pos_entry": { 726 "pos": "N-COUNT", 727 "pos_tips": "可數名詞" 728 }, 729 "prof": "商業", 730 "tran": "<b>Accounts</b> are detailed records of all the money that a person or business receives and spends. 賬目" 731 } 732 ] 733 }, 734 { 735 "tran_entry": [ 736 { 737 "exam_sents": { 738 "sent": [ 739 { 740 "chn_sent": "他對那個決定命運的夜晚所發生的事情做了一個詳細的報道。", 741 "eng_sent": "He gave a detailed account of what happened on the fateful night." 742 } 743 ] 744 }, 745 "pos_entry": { 746 "pos": "N-COUNT", 747 "pos_tips": "可數名詞" 748 }, 749 "tran": "An <b>account</b> is a written or spoken report of something that has happened. 報道" 750 } 751 ] 752 }, 753 { 754 "tran_entry": [ 755 { 756 "seeAlsos": { 757 "seeAlso": [ 758 { 759 "seeword": "accounting" 760 }, 761 { 762 "seeword": "bank account" 763 }, 764 { 765 "seeword": "checking account" 766 }, 767 { 768 "seeword": "deposit account" 769 } 770 ], 771 "seealso": "see also" 772 } 773 } 774 ] 775 }, 776 { 777 "tran_entry": [ 778 { 779 "exam_sents": { 780 "sent": [ 781 { 782 "chn_sent": "據說,他是一名優秀的教師。", 783 "eng_sent": "He is, by all accounts, a superb teacher." 784 } 785 ] 786 }, 787 "pos_entry": { 788 "pos": "PHRASE", 789 "pos_tips": "習語" 790 }, 791 "tran": "If you say that something is true <b>by all accounts</b> or <b>from all accounts</b>, you believe it is true because other people say so. 據說" 792 } 793 ] 794 }, 795 { 796 "tran_entry": [ 797 { 798 "exam_sents": { 799 "sent": [ 800 { 801 "chn_sent": "這些無名的組織在國內或國際政治中都是無足輕重的。", 802 "eng_sent": "These obscure groups were of little account in either national or international politics." 803