{"id":713,"date":"2023-11-01T09:01:01","date_gmt":"2023-11-01T01:01:01","guid":{"rendered":""},"modified":"2023-11-01T09:01:01","modified_gmt":"2023-11-01T01:01:01","slug":"api\u6570\u636e\u63a5\u53e3\u6587\u6863_\u63a5\u53e3\u6587\u6863\u793a\u4f8b\uff08\u6dd8\u5b9d\/\u62fc\u591a\u591aAPI\u63a5\u53e3\u6587\u6863\uff09","status":"publish","type":"post","link":"https:\/\/mushiming.com\/713.html","title":{"rendered":"api\u6570\u636e\u63a5\u53e3\u6587\u6863_\u63a5\u53e3\u6587\u6863\u793a\u4f8b\uff08\u6dd8\u5b9d\/\u62fc\u591a\u591aAPI\u63a5\u53e3\u6587\u6863\uff09"},"content":{"rendered":"

api\u6570\u636e\u63a5\u53e3\u6587\u6863_\u63a5\u53e3\u6587\u6863\u793a\u4f8b<\/h1>\n

\u672c\u6587\u4e3b\u8981\u662f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u63a5\u53e3\u6587\u6863\u7684\u8303\u6587\uff0c\u5185\u5bb9\u4fee\u8ba2\u5386\u53f2\u3001\u76ee\u5f55\u3001\u65f6\u5e8f\u56fe\u3001\u63a5\u53e3\u8981\u7d20\u63cf\u8ff0\u3001\u63a5\u53e3\u8bf4\u660e\u3001\u4f7f\u7528\u793a\u4f8b\u3001\u5b57\u5178\u3001FAQ\u3002 \u4f7f\u7528MD\u683c\u5f0f\u6587\u6863\uff08makedown\uff09\uff0c\u9009\u62e9\u539f\u56e0\uff0c\u5bb9\u6613\u683c\u5f0f\u8f6c\u6362\uff0c\u5f00\u53d1\u4fbf\u4e8e\u4fee\u6539\uff0c\u7248\u672c\u7ef4\u62a4\u754c\u9762\uff0c\u4fee\u6539\u8bb0\u5f55\u660e\u663e\uff0c\u666e\u901a\u6587\u672c\u5de5\u5177\u5373\u53ef\u7f16\u8f91\u3002<\/p>\n

\u4e0b\u65b9\u662f\u63a5\u53e3\u6587\u6863\u7684\u793a\u4f8b\uff1a<\/p>\n

taobao API \u63a5\u5165\u8bf4\u660e<\/h1>\n
    \n
  1. \n

    API\u5730\u5740:
    \u7533\u8bf7\u8c03\u7528KEY\u5730\u5740<\/p>\n<\/li>\n

  2. \n

    \u8c03\u7528\u793a\u4f8b\uff1a<\/p>\n<\/li>\n<\/ol>\n

    <?php<\/span>\n\n\/\/ \u8bf7\u6c42\u793a\u4f8b url \u9ed8\u8ba4\u8bf7\u6c42\u53c2\u6570\u5df2\u7ecfURL\u7f16\u7801\u5904\u7406<\/span>\n\/\/ \u672c\u793a\u4f8b\u4ee3\u7801\u672a\u52a0\u5bc6secret\u53c2\u6570\u660e\u6587\u4f20\u8f93\uff0c\u82e5\u8981\u52a0\u5bc6\u8bf7\u53c2\u8003<\/span>\n$method<\/span> = \"GET\"<\/span>;\n$url<\/span> = \"https:\/\/api-gw\u2026\u2026.cn\/taobao\/item_get\/?key=<\u60a8\u81ea\u5df1\u7684apiKey>&secret=<\u60a8\u81ea\u5df1\u7684apiSecret>&num_iid=652874751412&is_promotion=1\"<\/span>;\n$curl<\/span> = curl_init<\/span>();\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_CUSTOMREQUEST, $method<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_URL, $url<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_SSL_VERIFYHOST,FALSE<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_SSL_VERIFYPEER,FALSE<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_FAILONERROR, false<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_RETURNTRANSFER, true<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_HEADER, true<\/span>);\ncurl_setopt<\/span>($curl<\/span>, CURLOPT_ENCODING, \"gzip\"<\/span>);\nvar_dump<\/span>(curl_exec<\/span>($curl<\/span>));\n?><\/span>\n<\/code><\/pre>\n
      \n
    1. \n

      \u53c2\u6570\u8bf4\u660e<\/p>\n

        \n
      • \n

        \u901a\u7528\u53c2\u6570\u8bf4\u660e<\/p>\n

          \n
        • \u53c2\u6570\u4e0d\u8981\u4e71\u4f20\uff0c\u5426\u5219\u4e0d\u7ba1\u6210\u529f\u5931\u8d25\u90fd\u4f1a\u6263\u8d39<\/li>\n
        • url\u8bf4\u660e api-gw.onebound.cn\/\u5e73\u53f0\/API\u7c7b\u578b\/ \u5e73\u53f0\uff1a\u6dd8\u5b9d\uff0c\u4eac\u4e1c\u7b49\uff0c API\u7c7b\u578b:[item_search,item_get,item_search_shop\u7b49]<\/li>\n
        • version:API\u7248\u672c<\/li>\n
        • key:\u8c03\u7528key,\u6d4b\u8bd5key:test_api_key<\/li>\n
        • secret:\u8c03\u7528secret,\u6d4b\u8bd5secret:(\u4e0d\u7528\u586b\u5199)<\/li>\n
        • cache:[yes,no]\u9ed8\u8ba4yes\uff0c\u5c06\u8c03\u7528\u7f13\u5b58\u7684\u6570\u636e\uff0c\u901f\u5ea6\u6bd4\u8f83\u5feb<\/li>\n
        • result_type:[json,xml,serialize,var_export]\u8fd4\u56de\u6570\u636e\u683c\u5f0f\uff0c\u9ed8\u8ba4\u4e3ajson<\/li>\n
        • lang:[cn,en,ru] \u7ffb\u8bd1\u8bed\u8a00\uff0c\u9ed8\u8ba4cn\u7b80\u4f53\u4e2d\u6587<\/li>\n
        • secret:\u5bc6\u94a5<\/li>\n<\/ul>\n<\/li>\n
        • \n

          API:item_search \u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n

            \n
          • q:\u641c\u7d22\u5173\u952e\u5b57<\/li>\n
          • cat:\u5206\u7c7bID<\/li>\n
          • start_price:\u5f00\u59cb\u4ef7\u683c<\/li>\n
          • end_price:\u7ed3\u675f\u4ef7\u683c<\/li>\n
          • sort:\u6392\u5e8f[bid,bid,bid2,_bid2,_sale,_credit]
            (bid:\u603b\u4ef7,bid2:\u5546\u54c1\u4ef7\u683c,sale:\u9500\u91cf,credit\u4fe1\u7528,\u52a0<\/em>\u524d\u7f00\u4e3a\u4ece\u5927\u5230\u5c0f\u6392\u5e8f)<\/li>\n
          • page:\u9875\u6570<\/li>\n
          • page_size:\u6bcf\u9875\u5b9d\u8d1d\u6570\u91cf\uff0c\u9ed8\u8ba440<\/li>\n
          • seller_info:\u662f\u5426\u83b7\u53d6\u5546\u5bb6\u4fe1\u606f[yes,no],\u9ed8\u8ba4yes<\/li>\n<\/ul>\n<\/li>\n
          • \n

            API:item_get \u53c2\u6570\u8bf4\u660e: num_iid:\u5b9d\u8d1dID<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n

            API\u8bf4\u660e<\/strong><\/p>\n

            \u4fee\u8ba2\u5386\u53f2<\/h2>\n

            | \u65e5\u671f | \u5185\u5bb9 | \u7248\u672c | \u4f5c\u8005 | | \u2014\u2014\u2014- | \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 | \u2014\u2014\u2013 | \u2014\u2014 | | 2021\/09\/10 | \u521d\u7a3f | Ver. 1.0 | NHK|<\/p>\n

            \u76ee\u5f55<\/h2>\n

            [TOC]<\/p>\n

            \u6587\u6863\u4ecb\u7ecd \u672c\u6587\u6863\u7528\u4e8eXXX\u4e1a\u52a1\u7684\u63a5\u53e3\u8bf4\u660e\u548c\u4f7f\u7528\u8bf4\u660e\u3002<\/h2>\n

            \u529f\u80fd\u65f6\u5e8f\u56fe<\/h3>\n

            \u201csequence API-> APISERVER: \u7cfb\u7edf\u8fde\u63a5 APISERVER -> API: \u8fde\u63a5\u6210\u529f API -> APISERVER: \u7cfb\u7edf\u767b\u5f55 APISERVER \u2013> API: \u767b\u5f55\u6210\u529f API -> APISERVER: \u4e1a\u52a1\u8bf7\u6c42 APISERVER \u2013> API: \u4e1a\u52a1\u54cd\u5e94 API -> APISERVER: \u2026\u2026 APISERVER \u2013> API: \u2026\u2026 API \u2013> APISERVER: \u7cfb\u7edf\u8fde\u63a5\u65ad\u5f00 APISERVER -> API: \u7cfb\u7edf\u8fde\u63a5\u65ad\u5f00\u54cd\u5e94 \u201c<\/code><\/p>\n

            \u63a5\u53e3\u8981\u7d20\u63cf\u8ff0<\/h2>\n

            \u672f\u8bed\u5b9a\u4e49<\/h3>\n

            \u2013 **JAVAGW\uff1a**\u7cfb\u7edf\u7684\u7f51\u5173\uff0c\u6709\u8def\u7531\u3001\u5e7f\u64ad\u7b49\u529f\u80fd\u3002 \u2013 **JAVAAPI\uff1a**JAVA\u8bed\u8a00\u6240\u8c03\u7528\u7684\u7a0b\u5e8f\uff0c\u63d0\u4f9bJAVA\u8bed\u8a00\u7684API\u63a5\u53e3\u3002\u76f4\u63a5\u8fde\u63a5JAVAGW\u3002 \u2013 **APISERVER\uff1a**\u5bf9\u5916\u63d0\u4f9bJSON\u683c\u5f0f\u63a5\u53e3\uff0c\u8fde\u63a5JAVAGW\u3002 \u2013 **C++API \uff1a**\u4e3aC++\u8bed\u8a00\u63d0\u4f9b\u7684\u7a0b\u5e8f\uff0c\u8fde\u63a5APISERVER\u3002 \u2013 **PythonAPI\uff1a**\u4e3aPythonAPI\u8bed\u8a00\u63d0\u4f9b\u7684\u7a0b\u5e8f\uff0c\u8fde\u63a5APISERVER\u3002 \u2013 **C#API \uff1a**\u4e3aC#\u8bed\u8a00\u63d0\u4f9b\u7684\u7a0b\u5e8f\uff0c\u8fde\u63a5APISERVER\u3002<\/p>\n

            \u8bed\u6cd5\u63cf\u8ff0<\/h3>\n

            \u57fa\u7840\u8bed\u6cd5<\/h4>\n

            \u200b \u63a5\u53e3\u4f7f\u7528JSON\u683c\u5f0f\u4f20\u8f93\uff0c\u8bed\u6cd5\u89c4\u5219\u9075\u5faaJSON\u8bed\u6cd5\u89c4\u5219\u3002<\/p>\n

            \u63cf\u8ff0\u8bed\u6cd5<\/strong> \u2013 **\u30100..0\u3011\uff1a**\u8868\u793a\u65e0\u9700\u8d4b\u503c\u3002 \u2013 **\u30100..1\u3011\uff1a**\u8868\u793a\u53ef\u4ee5\u67090\u4e2a\u62161\u4e2a\u5b9e\u4f8b\u3002 \u2013 **\u30101..1\u3011\uff1a**\u8868\u793a\u53ea\u80fd\u6709\u4e00\u4e2a\u5b9e\u4f8b\u3002 \u2013 **\u30101..\u3011\uff1a**\u8868\u793a\u81f3\u5c11\u6709\u4e00\u4e2a\u5b9e\u4f8b\u3002 \u2013 **\u30100..<\/em>\u3011\uff1a**\u8868\u793a\u5bf9\u5b9e\u4f8b\u7684\u6570\u76ee\u6ca1\u6709\u9650\u5236\u3002 \u2013 **\u3010X.Y\u3011\uff1a**\u8868\u793aX\u96c6\u5408\u5185\u7684Y\u5c5e\u6027\u3002\u793a\u4f8b\uff1a\u53c2\u6570\u3010orderList.exchId\u3011\uff0corderlist\u4e2dexhcId\u7684\u53c2\u6570\uff0c\u8ba2\u5355\u96c6\u5408\u4e2d\u5e02\u573a\u5c5e\u6027\u3002 \u2013 **\u3010X^\u3011\uff1a**\u8868\u793aX\u7684\u96c6\u5408\u4e2d\uff0c\u6709\u4e00\u4e2a\u53c2\u6570\u5fc5\u9001\u3002\u793a\u4f8b\uff1a\u53c2\u6570A \uff0c\u53c2\u6570\u6807\u8bc6\u3010X^\u3011 \u53c2\u6570B \uff0c\u53c2\u6570\u6807\u8bc6\u3010X^\u3011 \uff0c\u53c2\u6570A\u3001B\u5fc5\u9001\u4e00\u4e2a\u3002<\/h4>\n

            \u6570\u636e\u7c7b\u578b<\/h3>\n

            int\uff1a\u6574\u6570\u7c7b\u578b<\/p>\n

            long\uff1a\u957f\u6574\u578b<\/p>\n

            double:\u6d6e\u70b9\u7c7b\u578b<\/p>\n

            String\uff1a\u5b57\u7b26\u4e32<\/p>\n

            list:\u4ee3\u8868\u6570\u7ec4\u6216\u96c6\u5408<\/p>\n

            \u63a5\u53e3\u6e05\u5355<\/h2>\n

            \u529f\u80fd\u5217\u8868<\/h3>\n

            | \u63a5\u53e3 | \u540d\u79f0 | \u63a5\u53e3\u652f\u6301 | | \u2014\u2013 | \u2014\u2014\u2014\u2014\u2014\u2014 | \u2014\u2014\u2013 | | 100000 | \u529f\u80fd1 |[\u2714]JAVA[\u2714]python|<\/p>\n

            100000 -\u529f\u80fd1<\/h4>\n

            \u63a5\u53e3\u5b9a\u4e49<\/h5>\n
            \u6ce8\u610f\u4e8b\u9879<\/h5>\n
            \u53c2\u6570\u8bf4\u660e<\/h5>\n

            \u8bf7\u6c42\u53c2\u6570<\/p>\n

            | \u53c2\u6570<\/strong> | \u4e2d\u6587\u540d\u79f0 | \u7c7b\u578b<\/strong> | \u957f\u5ea6 | \u53c2\u6570\u6807\u8bc6 | \u793a\u4f8b\u503c | | \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014- | \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014- | \u2014\u2014\u2013 | \u2014\u2013 | \u2014\u2014\u2013 | \u2014\u2014 | | value<\/strong> | \u503c1 | String | 1 | \u30101..1\u3011 | | | ValueList<\/strong> | \u503c\u5bf9\u8c61\u5217\u8868 | list | 999 | \u30100..\u3011 | | | \u3010ValueList.value1\u3011<\/strong> | \u503c\u5bf9\u8c611 | String | 35 | \u30100..<\/em>\u3011 | | | ValueList1<\/strong> | \u503c\u5217\u88681 | list | 999 | \u30100..*\u3011 | |<\/p>\n

            \u54cd\u5e94\u53c2\u6570<\/p>\n

            | \u53c2\u6570<\/strong> | \u4e2d\u6587\u540d\u79f0 | \u7c7b\u578b<\/strong> | \u957f\u5ea6 | \u53c2\u6570\u6807\u8bc6 | \u793a\u4f8b\u503c | | \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 | \u2014\u2014\u2014\u2014 | \u2014\u2014\u2013 | \u2014- | \u2014\u2014\u2013 | \u2014\u2014 | | successFlg | \u6210\u529f\u5931\u8d25\u6807\u5fd7 | int | 1 | \u30101..1\u3011 | 0 | | errorCode<\/strong> | \u9519\u8bef\u4ee3\u7801 | String | 8 | \u30100..1\u3011 | | | failInfo<\/strong> | \u9519\u8bef\u4fe1\u606f | String | 200 | \u30100..1\u3011 | | | value<\/strong> | \u5b58\u53d6\u503c1\u53f7 | string | 24 | \u30101..*\u3011 | |<\/p>\n

            DEMO\u8303\u4f8b<\/h5>\n
            JAVAAPI<\/h6>\n

            com.xxx..api.Interface.func(Funcvalue value)<\/p>\n

            \u201cjava \u2026.. \u201c<\/code><\/p>\n

            \u4f7f\u7528\u793a\u4f8b\uff08\u4e1a\u52a1\u573a\u666f\uff09<\/h2>\n

            XXX\u4e1a\u52a1\u4f7f\u7528\u7528\u4f8b\u8bf4\u660e<\/h3>\n

            \u53d8\u66f4\u8bf4\u660e<\/h4>\n

            XXX\u793a\u4f8b<\/h4>\n

            \u6570\u636e\u5b57\u5178<\/h2>\n

            successFlg-\u6210\u529f\u5931\u8d25\u6807\u8bc6<\/h3>\n

            |\u5b57\u5178\u4ee3\u7801|\u540d\u79f0|\u63cf\u8ff0| |\u2014\u2014|\u2014\u2014\u2014\u2014\u2013|\u2014\u2014\u2013| |0|\u6210\u529f|| |1|\u5931\u8d25||<\/p>\n

            FAQ<\/h2>\n","protected":false},"excerpt":{"rendered":"api\u6570\u636e\u63a5\u53e3\u6587\u6863_\u63a5\u53e3\u6587\u6863\u793a\u4f8b\uff08\u6dd8\u5b9d\/\u62fc\u591a\u591aAPI\u63a5\u53e3\u6587\u6863\uff09api\u6570\u636e\u63a5\u53e3\u6587\u6863_\u63a5\u53e3\u6587\u6863\u793a\u4f8b \u672c\u6587\u4e3b\u8981\u662f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u63a5\u53e3\u6587\u6863\u7684\u8303\u6587...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/713"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=713"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/713\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}