{"id":43695,"date":"2026-09-24T09:44:29","date_gmt":"2026-09-24T02:44:29","guid":{"rendered":"https:\/\/interdata.vn\/blog\/?p=43695"},"modified":"2026-09-24T09:44:29","modified_gmt":"2026-09-24T02:44:29","slug":"api-mien-phi","status":"publish","type":"post","link":"https:\/\/interdata.vn\/blog\/api-mien-phi\/","title":{"rendered":"T\u1ed5ng H\u1ee3p 17+ API Mi\u1ec5n Ph\u00ed \u0110\u1ee7 M\u1ecdi L\u0129nh V\u1ef1c T\u1eeb AI, Th\u1eddi ti\u1ebft, Crypto \u0111\u1ebfn D\u1ecbch thu\u1eadt"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-size: 100%;\"><strong>API mi\u1ec5n ph\u00ed<\/strong> l\u00e0 c\u1ee9u c\u00e1nh gi\u00fap b\u1ea1n tho\u1ea3i m\u00e1i t\u00edch h\u1ee3p d\u1eef li\u1ec7u th\u1eddi ti\u1ebft, AI, th\u1ecb tr\u01b0\u1eddng crypto hay d\u1ecbch thu\u1eadt v\u00e0o d\u1ef1 \u00e1n m\u00e0 kh\u00f4ng lo th\u00e2m h\u1ee5t chi ph\u00ed. Tuy v\u1eady, kh\u00f4ng \u00edt d\u1ecbch v\u1ee5 g\u1eafn m\u00e1c &#8220;mi\u1ec5n ph\u00ed&#8221; nh\u01b0ng l\u1ea1i b\u00f3p rate limit qu\u00e1 ch\u1eb7t, th\u1eadm ch\u00ed b\u1eaft nh\u1eadp th\u1ebb t\u00edn d\u1ee5ng ngay khi \u0111\u0103ng k\u00fd. B\u00e0i vi\u1ebft n\u00e0y t\u1ed5ng h\u1ee3p nh\u1eefng API mi\u1ec5n ph\u00ed th\u1ef1c s\u1ef1 d\u00f9ng \u0111\u01b0\u1ee3c cho c\u1ea3 \u0111\u1ed3 \u00e1n, d\u1ef1 \u00e1n c\u00e1 nh\u00e2n l\u1eabn giai \u0111o\u1ea1n ch\u1ea1y th\u1eed s\u1ea3n ph\u1ea9m, \u0111i k\u00e8m code m\u1eabu c\u00f3 th\u1ec3 test ngay. N\u1ebfu c\u1ea7n m\u1ed9t m\u00f4i tr\u01b0\u1eddng Linux \u1ed5n \u0111\u1ecbnh \u0111\u1ec3 ch\u1ea1y script, <a href=\"\/\">InterData<\/a> cung c\u1ea5p c\u00e1c g\u00f3i VPS c\u00f3 to\u00e0n quy\u1ec1n root, ti\u1ec7n cho b\u1ea1n d\u1ef1ng m\u00f4i tr\u01b0\u1eddng test tr\u01b0\u1edbc khi deploy th\u1ef1c t\u1ebf.<\/span><\/p>\n<div style=\"background-color: #eff6ff; padding: 20px; border: 1.5px solid #BFDBFE; border-radius: 12px; margin-bottom: 40px; box-shadow: 0 8px 20px rgba(37,99,235,0.05);\">\n<p style=\"font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; font-size: 18px; margin: 0 0 15px; color: #1e3a8a;\">N\u1ed8I DUNG B\u00c0I VI\u1ebeT<\/p>\n<ul style=\"list-style-type: none; padding-left: 0; margin: 0;\">\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section1\">Hi\u1ec3u \u0111\u00fang v\u1ec1 API mi\u1ec5n ph\u00ed v\u00e0 c\u01a1 ch\u1ebf free tier<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section2\">B\u1ea3ng t\u1ed5ng h\u1ee3p API mi\u1ec5n ph\u00ed theo nh\u00f3m ch\u1ee9c n\u0103ng<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section3\">API th\u1eddi ti\u1ebft v\u00e0 d\u1eef li\u1ec7u \u0111\u1ecba l\u00fd<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section4\">API AI v\u00e0 m\u00f4 h\u00ecnh ng\u00f4n ng\u1eef l\u1edbn (LLM) mi\u1ec5n ph\u00ed<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section5\">API d\u1eef li\u1ec7u crypto v\u00e0 t\u00e0i ch\u00ednh<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section6\">API d\u1ecbch thu\u1eadt h\u1ed7 tr\u1ee3 ti\u1ebfng Vi\u1ec7t<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section7\">API bot Telegram v\u00e0 c\u00f4ng c\u1ee5 mock data<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section8\">Quy tr\u00ecnh t\u00edch h\u1ee3p API l\u00ean m\u00e1y ch\u1ee7 VPS<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section9\">Qu\u1ea3n l\u00fd API key an to\u00e0n v\u00e0 x\u1eed l\u00fd rate limit<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section10\">Kh\u1eafc ph\u1ee5c c\u00e1c l\u1ed7i kinh \u0111i\u1ec3n khi g\u1ecdi API<\/a><\/li>\n<\/ul>\n<\/div>\n\n\n<style>\n.interdata-plan-carousel,.interdata-plan-carousel *{box-sizing:border-box}\n.interdata-plan-carousel{--blue:#005bea;--blue-dark:#004dcc;--text:#071832;--muted:#516173;--border:#d8e6fb;--bg:#f3f8ff;--shadow:0 5px 14px rgba(0,62,145,.08);background:var(--bg);padding:14px 56px 18px;position:relative;overflow:hidden;border-radius:20px;}\n.interdata-carousel-heading{color:#f00;font-family:Roboto,sans-serif;font-size:18px;line-height:1.35;font-weight:800;text-align:center;margin:0 0 14px}\n.interdata-plan-viewport{overflow:hidden;width:100%}\n.interdata-plan-track{display:flex;align-items:stretch;gap:12px;overflow:visible;padding:0 0 4px;transform:translate3d(0,0,0);transition:transform .45s ease;will-change:transform;touch-action:pan-y}\n.interdata-plan-card{flex:0 0 calc((100% - 24px)\/3);min-width:0;min-height:0!important;height:auto;background:#fff;border:1px solid var(--border);border-radius:8px;padding:15px 12px 13px;display:flex;flex-direction:column;box-shadow:var(--shadow)}\n.interdata-plan-title{color:var(--blue-dark);font-size:16px;line-height:1.22;font-weight:800;text-align:center;margin:0 0 7px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.interdata-plan-price{color:var(--blue-dark);font-size:24px;line-height:1;font-weight:900;text-align:center;margin-bottom:12px;white-space:nowrap;letter-spacing:0}\n.interdata-plan-price span{font-size:10px;font-weight:800;margin-left:2px}\n.interdata-plan-badge{align-self:center;display:inline-flex;align-items:center;justify-content:center;background:#ff3934;color:#fff;border-radius:5px;padding:7px 8px;font-size:9px;line-height:1;font-weight:800;margin-bottom:15px;white-space:nowrap;max-width:100%}\n.interdata-plan-features{list-style:none!important;padding:0!important;margin:0!important}\n.interdata-plan-features li{display:flex;gap:7px;align-items:flex-start;color:var(--text);font-size:12px;line-height:1.35;font-weight:700;text-align:left;margin:0 0 10px!important;padding:0!important}\n.interdata-plan-icon{width:14px;min-width:14px;height:14px;color:#0069ff;margin-top:2px}\n.interdata-plan-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.interdata-plan-spacer{flex:1;min-height:16px}\n.interdata-plan-button{display:flex;align-items:center;justify-content:center;min-height:42px;width:100%;margin-top:auto!important;margin-bottom:0!important;background:var(--blue);color:#fff!important;border-radius:5px;font-size:13px;font-weight:800;text-decoration:none!important;box-shadow:0 7px 14px rgba(0,91,234,.24);transition:transform .2s ease,background .2s ease}\n.interdata-plan-button:hover{background:var(--blue-dark);color:#fff!important;transform:translateY(-1px)}\n.interdata-carousel-arrow{position:absolute;top:50%;z-index:5;width:44px;height:54px;border:2px solid #fff!important;border-radius:999px;background:var(--blue)!important;color:#fff!important;box-shadow:0 8px 22px rgba(0,62,145,.32);display:flex!important;align-items:center;justify-content:center;cursor:pointer;transform:translateY(-35%);transition:background .2s ease,color .2s ease,opacity .2s ease,transform .2s ease}\n.interdata-carousel-arrow:hover{background:var(--blue-dark)!important;color:#fff!important;transform:translateY(-35%) scale(1.04)}\n.interdata-carousel-arrow:disabled{opacity:.78;cursor:not-allowed;background:#8aa6cf!important;color:#fff!important}\n.interdata-carousel-arrow:disabled:hover{background:#8aa6cf!important;color:#fff!important;transform:translateY(-35%)}\n.interdata-carousel-arrow svg{display:none!important}\n.interdata-carousel-arrow:before{content:none!important;display:none!important}\n.interdata-carousel-mark{display:block!important;color:#fff!important;font-family:Arial,Helvetica,sans-serif!important;font-size:38px!important;font-weight:900!important;line-height:1!important;text-align:center!important;pointer-events:none!important;transform:translateY(-2px)}\n.interdata-carousel-prev{left:14px}\n.interdata-carousel-prev .interdata-carousel-mark{margin-left:-2px}\n.interdata-carousel-next{right:14px}\n.interdata-carousel-next .interdata-carousel-mark{margin-right:-2px}\n@media (max-width:800px){.interdata-plan-carousel{padding:12px 44px 16px}.interdata-plan-card{flex-basis:calc((100% - 12px)\/2)}.interdata-carousel-heading{font-size:16px}.interdata-carousel-prev{left:6px}.interdata-carousel-next{right:6px}}\n@media (max-width:480px){.interdata-plan-carousel{padding:12px 38px 16px}.interdata-plan-card{flex-basis:100%}.interdata-plan-price{font-size:23px}.interdata-carousel-arrow{width:34px;height:44px}.interdata-carousel-mark{font-size:32px!important}.interdata-carousel-prev{left:3px}.interdata-carousel-next{right:3px}}\n<\/style>\n\n<div class=\"interdata-plan-carousel\" data-interdata-carousel>\n  <div class=\"interdata-carousel-heading\">Si\u00eau \u01afu \u0110\u00e3i VPS \/ CLOUD SERVER - Ti\u1ebft Ki\u1ec7m \u0110\u1ebfn 70%<\/div>\n\n  <svg width=\"0\" height=\"0\" style=\"position:absolute;visibility:hidden\" aria-hidden=\"true\">\n    <symbol id=\"id-icon-cpu\" viewBox=\"0 0 24 24\"><rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\"><\/rect><path d=\"M4 9h3M4 15h3M17 9h3M17 15h3M9 4v3M15 4v3M9 17v3M15 17v3\"><\/path><path d=\"M10 10h4v4h-4z\"><\/path><\/symbol>\n    <symbol id=\"id-icon-ram\" viewBox=\"0 0 24 24\"><rect x=\"4\" y=\"8\" width=\"16\" height=\"8\" rx=\"2\"><\/rect><path d=\"M7 16v2M11 16v2M15 16v2M19 16v2M7 11h1M11 11h1M15 11h1\"><\/path><\/symbol>\n    <symbol id=\"id-icon-storage\" viewBox=\"0 0 24 24\"><rect x=\"6\" y=\"3\" width=\"12\" height=\"18\" rx=\"2\"><\/rect><path d=\"M9 7h6\"><\/path><circle cx=\"12\" cy=\"16\" r=\"1.5\"><\/circle><\/symbol>\n    <symbol id=\"id-icon-network\" viewBox=\"0 0 24 24\"><path d=\"M5 12.5a10 10 0 0 1 14 0\"><\/path><path d=\"M8.5 16a5 5 0 0 1 7 0\"><\/path><path d=\"M12 19h.01\"><\/path><\/symbol>\n    <symbol id=\"id-icon-gift\" viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"8\" width=\"18\" height=\"13\" rx=\"2\"><\/rect><path d=\"M12 8v13M3 12h18\"><\/path><path d=\"M7.5 8C6.1 8 5 6.9 5 5.5S6.1 3 7.5 3C10 3 12 8 12 8\"><\/path><path d=\"M16.5 8C17.9 8 19 6.9 19 5.5S17.9 3 16.5 3C14 3 12 8 12 8\"><\/path><\/symbol>\n  <\/svg>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-prev\" type=\"button\" aria-label=\"Xem 3 g\u00f3i tr\u01b0\u1edbc\" onclick=\"var r=this.closest('[data-interdata-carousel]');if(!r)return false;var t=r.querySelector('.interdata-plan-track'),c=t?t.querySelectorAll('.interdata-plan-card'):[];if(!t||!c.length)return false;var v=window.matchMedia('(max-width:480px)').matches?1:(window.matchMedia('(max-width:800px)').matches?2:3),m=Math.max(0,c.length-Math.min(v,c.length||1)),s=[],i=0;while(i&lt;m){s.push(i);i+=v}if(!s.length||s[s.length-1]!==m)s.push(m);var p=parseInt(r.getAttribute('data-inline-page')||'0',10);p=(p-1+s.length)%s.length;r.setAttribute('data-inline-page',p);var g=parseFloat(window.getComputedStyle(t).gap)||12,w=c[0].getBoundingClientRect().width;t.style.transition='transform .45s ease';t.style.transform='translate3d('+(-(w+g)*s[p])+'px,0,0)';return false;\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M15 18l-6-6 6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8249;<\/span>\n  <\/button>\n\n  <div class=\"interdata-plan-viewport\">\n    <div class=\"interdata-plan-track\">\n      <!-- 7 card d\u1ef1 ph\u00f2ng: JavaScript s\u1ebd \u0111\u1ed3ng b\u1ed9 l\u1ea1i t\u1eeb API portal khi trang t\u1ea3i. -->\n      <article class=\"interdata-plan-card\" data-plan-pid=\"490\">\n        <h3 class=\"interdata-plan-title\">Premium Base<\/h3>\n        <div class=\"interdata-plan-price\">299.000 \u0111<span>\/3 th\u00e1ng<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>2 vCore Intel Xeon Scalable<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>2 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-value-plans-2026\/best-value-plans-premium-base\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"529\">\n        <h3 class=\"interdata-plan-title\">INTER PLATINUM 1<\/h3>\n        <div class=\"interdata-plan-price\">998.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>2 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/inter-platinum-series-2026\/inter-platinum-1\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"530\">\n        <h3 class=\"interdata-plan-title\">INTER PLATINUM 2<\/h3>\n        <div class=\"interdata-plan-price\">2.666.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>5 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>70 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/inter-platinum-series-2026\/inter-platinum-2\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"531\">\n        <h3 class=\"interdata-plan-title\">INTER PLATINUM 3<\/h3>\n        <div class=\"interdata-plan-price\">5.888.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>9 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>16 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>140 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/inter-platinum-series-2026\/inter-platinum-3\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"521\">\n        <h3 class=\"interdata-plan-title\">BD-Cloud 1<\/h3>\n        <div class=\"interdata-plan-price\">988.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>3 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-plan-real-cloud\/bd-cloud-1\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"522\">\n        <h3 class=\"interdata-plan-title\">BD-Cloud 2<\/h3>\n        <div class=\"interdata-plan-price\">2.988.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>4 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>80 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300 Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-plan-real-cloud\/bd-cloud-2\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"523\">\n        <h3 class=\"interdata-plan-title\">BD-Cloud 3<\/h3>\n        <div class=\"interdata-plan-price\">5.999.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>8 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>16 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>140 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>400 Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-plan-real-cloud\/bd-cloud-3\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n    <\/div>\n  <\/div>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-next\" type=\"button\" aria-label=\"Xem 3 g\u00f3i ti\u1ebfp theo\" onclick=\"var r=this.closest('[data-interdata-carousel]');if(!r)return false;var t=r.querySelector('.interdata-plan-track'),c=t?t.querySelectorAll('.interdata-plan-card'):[];if(!t||!c.length)return false;var v=window.matchMedia('(max-width:480px)').matches?1:(window.matchMedia('(max-width:800px)').matches?2:3),m=Math.max(0,c.length-Math.min(v,c.length||1)),s=[],i=0;while(i&lt;m){s.push(i);i+=v}if(!s.length||s[s.length-1]!==m)s.push(m);var p=parseInt(r.getAttribute('data-inline-page')||'0',10);p=(p+1)%s.length;r.setAttribute('data-inline-page',p);var g=parseFloat(window.getComputedStyle(t).gap)||12,w=c[0].getBoundingClientRect().width;t.style.transition='transform .45s ease';t.style.transform='translate3d('+(-(w+g)*s[p])+'px,0,0)';return false;\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9 18l6-6-6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8250;<\/span>\n  <\/button>\n<\/div>\n\n<script>\n(function(){\n  var API_GROUPS=[\n    {url:'https:\/\/support.interdata.vn\/packages.php?gid=89&module',pids:[490]},\n    {url:'https:\/\/support.interdata.vn\/packages.php?gid=100&module',pids:[529,530,531]},\n    {url:'https:\/\/support.interdata.vn\/packages.php?gid=97&module',pids:[521,522,523]}\n  ];\n  var PLAN_CYCLES={\n    490:{key:'quarterly',label:'3 th\u00e1ng'},\n    529:{key:'annually',label:'n\u0103m'},\n    530:{key:'annually',label:'n\u0103m'},\n    531:{key:'annually',label:'n\u0103m'},\n    521:{key:'annually',label:'n\u0103m'},\n    522:{key:'annually',label:'n\u0103m'},\n    523:{key:'annually',label:'n\u0103m'}\n  };\n\n  function fetchPlanData(){\n    if(window.interdataPlanApiPromise)return window.interdataPlanApiPromise;\n\n    window.interdataPlanApiPromise=Promise.all(API_GROUPS.map(function(group){\n      return fetch(group.url,{method:'GET',mode:'cors',cache:'no-store'})\n        .then(function(response){\n          if(!response.ok)throw new Error('API '+response.status);\n          return response.json();\n        })\n        .then(function(data){\n          if(!data||data.success!==true||!Array.isArray(data.products))return [];\n          return data.products.filter(function(product){\n            return group.pids.indexOf(Number(product.pid))!==-1;\n          });\n        })\n        .catch(function(error){\n          console.warn('Kh\u00f4ng th\u1ec3 c\u1eadp nh\u1eadt nh\u00f3m g\u00f3i InterData:',group.url,error);\n          return [];\n        });\n    })).then(function(groups){\n      return groups.reduce(function(all,products){return all.concat(products);},[]);\n    });\n\n    return window.interdataPlanApiPromise;\n  }\n\n  function parseDescription(html){\n    var source=String(html||'')\n      .replace(\/<brs*\/?>\/gi,'n')\n      .replace(\/<\/(p|div|li)>\/gi,'n');\n    var holder=document.createElement('div');\n    holder.innerHTML=source;\n    var strong=holder.querySelector('strong');\n    var badge=strong?strong.textContent.trim():'';\n    var lines=(holder.textContent||'').split(\/r?n\/).map(function(line){\n      return line.trim();\n    }).filter(Boolean);\n    if(badge&&lines[0]===badge)lines.shift();\n    return {badge:badge,features:lines};\n  }\n\n  function iconForFeature(feature){\n    if(\/ram\/i.test(feature))return 'id-icon-ram';\n    if(\/ssd|nvme|storage|disk\/i.test(feature))return 'id-icon-storage';\n    if(\/vcore|vcpu|cpu|xeon|amd\/i.test(feature))return 'id-icon-cpu';\n    if(\/ipv4|network|mbps|gbps|bandwidth\/i.test(feature))return 'id-icon-network';\n    return 'id-icon-gift';\n  }\n\n  function createFeatureItem(feature){\n    var item=document.createElement('li');\n    var icon=document.createElement('span');\n    var svg=document.createElementNS('http:\/\/www.w3.org\/2000\/svg','svg');\n    var use=document.createElementNS('http:\/\/www.w3.org\/2000\/svg','use');\n    icon.className='interdata-plan-icon';\n    use.setAttribute('href','#'+iconForFeature(feature));\n    svg.appendChild(use);\n    icon.appendChild(svg);\n    item.appendChild(icon);\n    item.appendChild(document.createTextNode(feature));\n    return item;\n  }\n\n  function updateCardFromApi(root,product){\n    var pid=Number(product.pid);\n    var cycle=PLAN_CYCLES[pid];\n    var card=root.querySelector('[data-plan-pid=\"'+pid+'\"]');\n    if(!card||!cycle)return;\n\n    var title=card.querySelector('.interdata-plan-title');\n    var priceBox=card.querySelector('.interdata-plan-price');\n    var badgeBox=card.querySelector('.interdata-plan-badge');\n    var featureList=card.querySelector('.interdata-plan-features');\n    var button=card.querySelector('.interdata-plan-button');\n    var description=parseDescription(product.description);\n    var pricing=product.pricing&&product.pricing.VND;\n    var price=pricing?Number(pricing[cycle.key]):-1;\n\n    if(title&&product.name)title.textContent=product.name;\n    if(priceBox&&Number.isFinite(price)&&price>=0){\n      priceBox.textContent=Math.round(price).toLocaleString('vi-VN')+' \u0111';\n      var suffix=document.createElement('span');\n      suffix.textContent='\/'+cycle.label;\n      priceBox.appendChild(suffix);\n    }\n    if(badgeBox&&description.badge)badgeBox.textContent=description.badge;\n    if(featureList&&description.features.length){\n      featureList.textContent='';\n      description.features.forEach(function(feature){\n        featureList.appendChild(createFeatureItem(feature));\n      });\n    }\n    if(button&&product.product_url)button.href=product.product_url;\n  }\n\n  function setupInterDataCarousel(root){\n    var track=root.querySelector('.interdata-plan-track');\n    var prev=root.querySelector('.interdata-carousel-prev');\n    var next=root.querySelector('.interdata-carousel-next');\n    if(!track||!prev||!next||track.dataset.ready==='1')return;\n    track.dataset.ready='1';\n    prev.disabled=false;\n    next.disabled=false;\n    var activePage=0;\n    var touchStartX=null;\n\n    function visibleCards(){\n      if(window.matchMedia&&window.matchMedia('(max-width:480px)').matches)return 1;\n      if(window.matchMedia&&window.matchMedia('(max-width:800px)').matches)return 2;\n      return 3;\n    }\n\n    function pageStarts(){\n      var total=track.querySelectorAll('.interdata-plan-card').length;\n      var visible=Math.min(visibleCards(),total||1);\n      var maxStart=Math.max(0,total-visible);\n      var starts=[];\n      var start=0;\n      while(start<maxStart){\n        starts.push(start);\n        start+=visible;\n      }\n      if(!starts.length||starts[starts.length-1]!==maxStart)starts.push(maxStart);\n      return starts;\n    }\n\n    function renderSlide(animate){\n      var cards=track.querySelectorAll('.interdata-plan-card');\n      var starts=pageStarts();\n      if(!cards.length||!starts.length)return;\n      if(activePage>=starts.length)activePage=starts.length-1;\n      if(activePage<0)activePage=0;\n\n      var cardWidth=cards[0].getBoundingClientRect().width;\n      var trackStyle=window.getComputedStyle?window.getComputedStyle(track):null;\n      var gap=trackStyle?parseFloat(trackStyle.columnGap||trackStyle.gap):12;\n      if(!Number.isFinite(gap))gap=12;\n      if(cardWidth<=0)return;\n\n      track.style.transition=animate?'transform .45s ease':'none';\n      track.style.transform='translate3d('+(-(cardWidth+gap)*starts[activePage])+'px,0,0)';\n      prev.setAttribute('aria-disabled',starts.length>1?'false':'true');\n      next.setAttribute('aria-disabled',starts.length>1?'false':'true');\n    }\n\n    function move(direction){\n      var starts=pageStarts();\n      if(starts.length<=1)return;\n      activePage=parseInt(root.getAttribute('data-inline-page')||activePage,10)||0;\n      activePage=(activePage+direction+starts.length)%starts.length;\n      root.setAttribute('data-inline-page',activePage);\n      renderSlide(true);\n    }\n\n    track.addEventListener('touchstart',function(event){\n      touchStartX=event.touches&&event.touches[0]?event.touches[0].clientX:null;\n    },{passive:true});\n    track.addEventListener('touchend',function(event){\n      if(touchStartX===null)return;\n      var endX=event.changedTouches&&event.changedTouches[0]?event.changedTouches[0].clientX:touchStartX;\n      var distance=endX-touchStartX;\n      touchStartX=null;\n      if(Math.abs(distance)>=40)move(distance<0?1:-1);\n    },{passive:true});\n\n    function resetAfterResize(){\n      activePage=0;\n      root.setAttribute('data-inline-page','0');\n      renderSlide(false);\n    }\n\n    window.addEventListener('resize',resetAfterResize);\n    window.addEventListener('load',resetAfterResize);\n    if('ResizeObserver' in window){\n      var resizeObserver=new ResizeObserver(function(){renderSlide(false);});\n      resizeObserver.observe(root);\n    }\n    window.requestAnimationFrame(function(){renderSlide(false);});\n    window.setTimeout(function(){renderSlide(false);},250);\n    window.setTimeout(function(){renderSlide(false);},1000);\n\n    fetchPlanData().then(function(products){\n      products.forEach(function(product){updateCardFromApi(root,product);});\n      renderSlide(false);\n    });\n  }\n\n  function initInterDataCarousels(){\n    document.querySelectorAll('[data-interdata-carousel]').forEach(setupInterDataCarousel);\n  }\n\n  if(document.readyState==='loading'){\n    document.addEventListener('DOMContentLoaded',initInterDataCarousels);\n  }else{\n    initInterDataCarousels();\n  }\n\n  if('MutationObserver' in window){\n    var initQueued=false;\n    new MutationObserver(function(){\n      if(initQueued)return;\n      initQueued=true;\n      window.requestAnimationFrame(function(){\n        initQueued=false;\n        initInterDataCarousels();\n      });\n    }).observe(document.documentElement,{childList:true,subtree:true});\n  }\n})();\n<\/script>\n\n\t<div id=\"gap-1739570307\" class=\"gap-element clearfix\" style=\"display:block; height:auto;\">\n\t\t\n<style>\n#gap-1739570307 {\n  padding-top: 15px;\n}\n<\/style>\n\t<\/div>\n\t\n<h2 id=\"section1\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Hi\u1ec3u \u0111\u00fang v\u1ec1 API mi\u1ec5n ph\u00ed v\u00e0 c\u01a1 ch\u1ebf free tier<\/h2>\n<p style=\"text-align: justify;\">V\u1ec1 b\u1ea3n ch\u1ea5t, c\u00e1c g\u00f3i API mi\u1ec5n ph\u00ed cho ph\u00e9p \u1ee9ng d\u1ee5ng c\u1ee7a b\u1ea1n giao ti\u1ebfp v\u00e0 l\u1ea5y d\u1eef li\u1ec7u t\u1eeb h\u1ec7 th\u1ed1ng b\u00ean ngo\u00e0i \u1edf m\u1ed9t ng\u01b0\u1ee1ng t\u00e0i nguy\u00ean \u0111\u1ecbnh s\u1eb5n. Nh\u00e0 cung c\u1ea5p duy tr\u00ec c\u00e1c g\u00f3i n\u00e0y v\u1eeba \u0111\u1ec3 qu\u1ea3ng b\u00e1 d\u1ecbch v\u1ee5, v\u1eeba h\u1ed7 tr\u1ee3 c\u1ed9ng \u0111\u1ed3ng nh\u00e0 ph\u00e1t tri\u1ec3n ki\u1ec3m th\u1eed t\u00ednh n\u0103ng tr\u01b0\u1edbc khi chuy\u1ec3n sang g\u00f3i tr\u1ea3 ph\u00ed. Tuy nhi\u00ean, r\u00e0o c\u1ea3n th\u01b0\u1eddng g\u1eb7p l\u00e0 gi\u1edbi h\u1ea1n s\u1ed1 l\u01b0\u1ee3ng request theo ph\u00fat (RPM), theo ng\u00e0y (RPD) ho\u1eb7c t\u1ed5ng l\u01b0\u1ee3ng d\u1eef li\u1ec7u h\u00e0ng th\u00e1ng.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-43699\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/API-mien-phi-la-gi.jpg\" alt=\"API mi\u1ec5n ph\u00ed l\u00e0 g\u00ec\" width=\"700\" height=\"467\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/API-mien-phi-la-gi.jpg 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/API-mien-phi-la-gi-300x200.jpg 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/API-mien-phi-la-gi-768x512.jpg 768w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p style=\"text-align: justify;\">V\u1edbi c\u00e1c \u1ee9ng d\u1ee5ng ph\u1ee5c v\u1ee5 \u0111\u1ed3 \u00e1n, bot t\u1ef1 \u0111\u1ed9ng n\u1ed9i b\u1ed9 ho\u1eb7c c\u00f4ng c\u1ee5 c\u00e1 nh\u00e2n, h\u1ea1n m\u1ee9c mi\u1ec5n ph\u00ed l\u00e0 qu\u00e1 \u0111\u1ee7. Nh\u01b0ng n\u1ebfu \u0111\u01b0a v\u00e0o m\u00f4i tr\u01b0\u1eddng production \u0111\u00f4ng ng\u01b0\u1eddi d\u00f9ng, free tier s\u1ebd nhanh ch\u00f3ng c\u1ea1n ki\u1ec7t ho\u1eb7c g\u1eb7p \u0111\u1ed9 tr\u1ec5 cao. \u0110\u1ec3 n\u1eafm r\u00f5 c\u00e1ch th\u1ee9c trao \u0111\u1ed5i d\u1eef li\u1ec7u \u1edf t\u1ea7ng m\u1ea1ng, b\u1ea1n c\u00f3 th\u1ec3 xem l\u1ea1i b\u00e0i vi\u1ebft <a href=\"https:\/\/interdata.vn\/blog\/web-api-la-gi\/\">Web API l\u00e0 g\u00ec<\/a>.<\/p>\n<p style=\"text-align: justify;\">Khi l\u1ef1a ch\u1ecdn API cho h\u1ec7 th\u1ed1ng, b\u1ea1n c\u1ea7n c\u00e2n nh\u1eafc ba y\u1ebfu t\u1ed1 c\u1ed1t l\u00f5i: y\u00eau c\u1ea7u v\u1ec1 \u0111\u1ed9 t\u01b0\u01a1i c\u1ee7a d\u1eef li\u1ec7u, t\u1ea7n su\u1ea5t g\u1eedi request th\u1ef1c t\u1ebf, v\u00e0 vi\u1ec7c d\u1ecbch v\u1ee5 \u0111\u00f3 c\u00f3 b\u1eaft bu\u1ed9c t\u1ea1o t\u00e0i kho\u1ea3n l\u1ea5y key hay cho ph\u00e9p g\u1ecdi tr\u1ef1c ti\u1ebfp qua IP.<\/p>\n<div style=\"display: flex; flex-wrap: wrap; background-color: #fff; border: 1.5px solid #BFDBFE; box-shadow: 0 8px 20px rgba(37,99,235,0.08); border-radius: 12px; overflow: hidden; margin: 35px 0;\">\n<div style=\"flex: 1; min-width: 250px; background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center;\">\n<div>\n<p style=\"color: #fff; font-size: 34px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; margin: 0; line-height: 1.1;\">Thu\u00ea VPS InterData<\/p>\n<p style=\"color: #dbeafe; font-size: 15px; font-weight: 600; margin-top: 12px;\">CPU th\u1ebf h\u1ec7 m\u1edbi, SSD NVMe U.2, h\u1ed7 tr\u1ee3 k\u1ef9 thu\u1eadt 24\/7<\/p>\n<\/div>\n<\/div>\n<div style=\"flex: 2; padding: 25px; min-width: 300px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; margin-top: 0; font-size: 20px;\">C\u1ea7n VPS Linux \u0111\u1ec3 ch\u1ea1y th\u1eed script g\u1ecdi API ngay?<\/h3>\n<p style=\"text-align: justify; font-size: 15px; margin-bottom: 15px;\">VPS InterData ch\u1ea1y Ubuntu, Debian ho\u1eb7c CentOS v\u1edbi to\u00e0n quy\u1ec1n root. B\u1ea1n c\u00f3 th\u1ec3 t\u1ef1 do c\u00e0i \u0111\u1eb7t Python, Node.js, Docker v\u00e0 c\u00e1c g\u00f3i th\u01b0 vi\u1ec7n c\u1ea7n thi\u1ebft \u0111\u1ec3 test integration tr\u01b0\u1edbc khi \u0111\u01b0a v\u00e0o s\u1ea3n ph\u1ea9m ch\u00ednh. R\u1ea5t th\u00edch h\u1ee3p cho cronjob ch\u1ea1y API \u0111\u1ecbnh k\u1ef3, host bot Telegram hay ch\u1ea1y c\u00e1c t\u00e1c v\u1ee5 automation li\u00ean t\u1ee5c.<\/p>\n<p><a style=\"background: linear-gradient(90deg, #2563EB 0%, #1E3A8A 100%); color: #fff; padding: 12px 25px; text-decoration: none; font-weight: 600; border-radius: 8px; font-size: 15px; display: inline-block; box-shadow: 0 5px 15px rgba(37,99,235,0.3);\" href=\"https:\/\/interdata.vn\/thue-vps\/\" target=\"_blank\" rel=\"noopener\">Xem B\u1ea3ng Gi\u00e1 Thu\u00ea VPS \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<h2 id=\"section2\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">B\u1ea3ng t\u1ed5ng h\u1ee3p API mi\u1ec5n ph\u00ed theo nh\u00f3m ch\u1ee9c n\u0103ng<\/h2>\n<p style=\"text-align: justify;\">D\u01b0\u1edbi \u0111\u00e2y l\u00e0 danh s\u00e1ch c\u00e1c API \u0111\u00e1ng tin c\u1eady nh\u1ea5t hi\u1ec7n nay theo t\u1eebng nh\u00f3m t\u00e1c v\u1ee5 ph\u1ed5 bi\u1ebfn, \u0111i k\u00e8m th\u00f4ng tin c\u1ee5 th\u1ec3 v\u1ec1 h\u1ea1n m\u1ee9c s\u1eed d\u1ee5ng v\u00e0 \u0111i\u1ec1u ki\u1ec7n x\u00e1c th\u1ef1c:<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px;\">\n<thead>\n<tr style=\"background-color: #1e3a8a; color: #fff;\">\n<th style=\"padding: 12px; text-align: left; border: 1px solid #BFDBFE;\">T\u00ean API<\/th>\n<th style=\"padding: 12px; text-align: left; border: 1px solid #BFDBFE;\">Ch\u1ee9c n\u0103ng<\/th>\n<th style=\"padding: 12px; text-align: left; border: 1px solid #BFDBFE;\">H\u1ea1n m\u1ee9c mi\u1ec5n ph\u00ed<\/th>\n<th style=\"padding: 12px; text-align: left; border: 1px solid #BFDBFE;\">C\u1ea7n API Key?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Open-Meteo<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Th\u1eddi ti\u1ebft<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">10.000 calls\/ng\u00e0y (phi th\u01b0\u01a1ng m\u1ea1i)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">OpenWeatherMap<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Th\u1eddi ti\u1ebft<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">60 calls\/ph\u00fat, 1.000.000 calls\/th\u00e1ng<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">IP-API<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">\u0110\u1ecbnh v\u1ecb IP<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">45 calls\/ph\u00fat<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">REST Countries<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">D\u1eef li\u1ec7u qu\u1ed1c gia<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng gi\u1edbi h\u1ea1n c\u1ee9ng<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Google AI Studio (Gemini)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">AI \/ LLM<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">15 RPM, 1.500 RPD (Flash)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Groq<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">AI \/ LLM<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">30 RPM, 14.400 RPD<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">CoinGecko<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Crypto<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">10 \u0111\u1ebfn 30 calls\/ph\u00fat (keyless)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng (keyless)<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">ExchangeRate-API<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">T\u1ef7 gi\u00e1 ti\u1ec1n t\u1ec7<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">100 \u0111\u1ebfn 1.500 calls\/th\u00e1ng<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">MyMemory<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">D\u1ecbch thu\u1eadt<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">5.000 k\u00fd t\u1ef1\/ng\u00e0y (k\u00e8m email: 50.000)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Telegram Bot API<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Bot th\u00f4ng b\u00e1o<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">~30 msg\/s to\u00e0n c\u1ee5c, 1 msg\/s m\u1ed7i chat<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3 (Token)<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Hacker News API<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Tin c\u00f4ng ngh\u1ec7<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng gi\u1edbi h\u1ea1n c\u1ee9ng<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">JSONPlaceholder<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">D\u1eef li\u1ec7u m\u1eabu (Mock)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng gi\u1edbi h\u1ea1n<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kh\u00f4ng<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Unsplash API<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Kho h\u00ecnh \u1ea3nh<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">50 requests\/gi\u1edd (b\u1ea3n demo)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3<\/td>\n<\/tr>\n<tr style=\"background-color: #f8fafc;\">\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">NewsAPI<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">Tin t\u1ee9c b\u00e1o ch\u00ed<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">100 requests\/ng\u00e0y (g\u00f3i dev)<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">GitHub Models<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">AI \/ LLM<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">~60 requests\/ph\u00fat<\/td>\n<td style=\"padding: 10px; border: 1px solid #E5E7EB;\">C\u00f3 (GitHub token)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: justify;\">C\u00e1c d\u1ecbch v\u1ee5 kh\u00f4ng y\u00eau c\u1ea7u key nh\u01b0 Open-Meteo, REST Countries hay IP-API r\u1ea5t ti\u1ec7n \u0111\u1ec3 vi\u1ebft prototype nhanh. Ng\u01b0\u1ee3c l\u1ea1i, v\u1edbi nh\u1eefng API c\u1ea7n \u0111\u0103ng k\u00fd key, b\u1ea1n tuy\u1ec7t \u0111\u1ed1i kh\u00f4ng n\u00ean \u0111\u1ec3 l\u1ed9 chu\u1ed7i x\u00e1c th\u1ef1c trong m\u00e3 ngu\u1ed3n.<\/p>\n<h2 id=\"section3\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">API th\u1eddi ti\u1ebft v\u00e0 d\u1eef li\u1ec7u \u0111\u1ecba l\u00fd<\/h2>\n<p style=\"text-align: justify;\">N\u1ebfu b\u1ea1n \u0111ang l\u00e0m widget d\u1ef1 b\u00e1o th\u1eddi ti\u1ebft, hi\u1ec3n th\u1ecb th\u00f4ng tin v\u00f9ng mi\u1ec1n ho\u1eb7c bot g\u1eedi tin m\u1ed7i s\u00e1ng, c\u00e1c d\u1ecbch v\u1ee5 d\u01b0\u1edbi \u0111\u00e2y l\u00e0 l\u1ef1a ch\u1ecdn h\u00e0ng \u0111\u1ea7u nh\u1edd \u0111\u1ed9 \u1ed5n \u0111\u1ecbnh cao v\u00e0 t\u00e0i li\u1ec7u r\u00f5 r\u00e0ng.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Open-Meteo: D\u1eef li\u1ec7u th\u1eddi ti\u1ebft kh\u00f4ng c\u1ea7n \u0111\u0103ng k\u00fd<\/h3>\n<p style=\"text-align: justify;\">Open-Meteo l\u00e0 d\u1ef1 \u00e1n ngu\u1ed3n m\u1edf r\u1ea5t \u0111\u01b0\u1ee3c l\u00f2ng c\u1ed9ng \u0111\u1ed3ng developer. B\u1ea1n kh\u00f4ng c\u1ea7n \u0111\u0103ng k\u00fd t\u00e0i kho\u1ea3n hay khai b\u00e1o API key n\u1ebfu ch\u1ec9 d\u00f9ng cho nhu c\u1ea7u phi th\u01b0\u01a1ng m\u1ea1i. H\u1ea1n m\u1ee9c l\u00ean \u0111\u1ebfn 10.000 l\u01b0\u1ee3t g\u1ecdi m\u1ed7i ng\u00e0y, h\u1ed7 tr\u1ee3 d\u1ef1 b\u00e1o t\u1edbi 16 ng\u00e0y, kho d\u1eef li\u1ec7u l\u1ecbch s\u1eed phong ph\u00fa v\u00e0 c\u1ea3 ch\u1ec9 s\u1ed1 ch\u1ea5t l\u01b0\u1ee3ng kh\u00f4ng kh\u00ed.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nurl = \"https:\/\/api.open-meteo.com\/v1\/forecast\"\r\nparams = {\r\n    \"latitude\": 21.0285,\r\n    \"longitude\": 105.8542,\r\n    \"current_weather\": True,\r\n    \"timezone\": \"Asia\/Ho_Chi_Minh\"\r\n}\r\nresp = requests.get(url, params=params)\r\nprint(resp.json()[\"current_weather\"])<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43711\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Open-Meteo.png\" alt=\"Open-Meteo API\" width=\"1000\" height=\"408\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Open-Meteo.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Open-Meteo-300x122.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Open-Meteo-768x313.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">OpenWeatherMap: L\u1ef1a ch\u1ecdn ph\u1ed5 bi\u1ebfn cho d\u1ef1 \u00e1n v\u1eeba v\u00e0 nh\u1ecf<\/h3>\n<p style=\"text-align: justify;\">D\u1ecbch v\u1ee5 n\u00e0y \u0111\u00e3 qu\u00e1 quen thu\u1ed9c v\u1edbi gi\u1edbi l\u1eadp tr\u00ecnh. G\u00f3i mi\u1ec5n ph\u00ed cung c\u1ea5p d\u1eef li\u1ec7u th\u1eddi ti\u1ebft t\u1ee9c th\u1eddi k\u00e8m d\u1ef1 b\u00e1o 5 ng\u00e0y. B\u1ea1n c\u00f3 60 request m\u1ed7i ph\u00fat v\u00e0 t\u1edbi 1 tri\u1ec7u request m\u1ed7i th\u00e1ng, \u0111\u1ee7 s\u1ee9c g\u00e1nh c\u00e1c \u1ee9ng d\u1ee5ng nh\u1ecf \u0111\u1ebfn trung b\u00ecnh sau khi \u0111\u0103ng k\u00fd l\u1ea5y key.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nAPI_KEY = \"your_api_key\"\r\nurl = f\"https:\/\/api.openweathermap.org\/data\/2.5\/weather?q=Hanoi&amp;appid={API_KEY}&amp;units=metric&amp;lang=vi\"\r\nresp = requests.get(url)\r\ndata = resp.json()\r\nprint(f\"{data['name']}: {data['main']['temp']}\u00b0C, {data['weather'][0]['description']}\")<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43712\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/OpenWeatherMap.png\" alt=\"OpenWeatherMap API\" width=\"1000\" height=\"421\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/OpenWeatherMap.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/OpenWeatherMap-300x126.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/OpenWeatherMap-768x323.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">IP-API: Tra c\u1ee9u v\u1ecb tr\u00ed \u0111\u1ecba l\u00fd theo IP<\/h3>\n<p style=\"text-align: justify;\">Khi c\u1ea7n x\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 g\u1ee3i \u00fd ng\u00f4n ng\u1eef ho\u1eb7c ph\u00e2n t\u00edch v\u00f9ng truy c\u1eadp, IP-API l\u00e0 gi\u1ea3i ph\u00e1p nhanh g\u1ecdn nh\u1ea5t. B\u1ea1n kh\u00f4ng c\u1ea7n g\u1eedi k\u00e8m token khi d\u00f9ng endpoint c\u01a1 b\u1ea3n, gi\u1edbi h\u1ea1n \u1edf m\u1ee9c 45 request m\u1ed7i ph\u00fat cho m\u1ed7i IP g\u1ecdi \u0111\u1ebfn.<\/p>\n<pre><code class=\"language-bash\">curl \"http:\/\/ip-api.com\/json\/8.8.8.8\"<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43707\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/IP-API.png\" alt=\"IP-API\" width=\"1000\" height=\"438\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/IP-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/IP-API-300x131.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/IP-API-768x336.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">REST Countries: Tra c\u1ee9u th\u00f4ng tin m\u1ecdi qu\u1ed1c gia<\/h3>\n<p style=\"text-align: justify;\">D\u1ef1 \u00e1n n\u00e0y m\u1edf ho\u00e0n to\u00e0n, cung c\u1ea5p \u0111\u1ea7y \u0111\u1ee7 th\u00f4ng tin t\u1eeb th\u1ee7 \u0111\u00f4, d\u00e2n s\u1ed1, ti\u1ec1n t\u1ec7, m\u00fai gi\u1edd cho \u0111\u1ebfn ng\u00f4n ng\u1eef c\u1ee7a h\u01a1n 250 qu\u1ed1c gia v\u00e0 v\u00f9ng l\u00e3nh th\u1ed5. B\u1ea1n ch\u1ec9 c\u1ea7n g\u1eedi HTTP request l\u00e0 nh\u1eadn ngay k\u1ebft qu\u1ea3 JSON m\u00e0 kh\u00f4ng ph\u1ea3i b\u1eadn t\u00e2m v\u1ec1 kh\u00e2u \u0111\u0103ng k\u00fd.<\/p>\n<pre><code class=\"language-javascript\">fetch(\"https:\/\/restcountries.com\/v3.1\/name\/vietnam\")\r\n  .then(res =&gt; res.json())\r\n  .then(data =&gt; {\r\n    const c = data[0];\r\n    console.log(c.name.common, c.capital[0], c.currencies);\r\n  });<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43713\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/REST-Countries.png\" alt=\"REST Countries API\" width=\"1000\" height=\"609\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/REST-Countries.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/REST-Countries-300x183.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/REST-Countries-768x468.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2 id=\"section4\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">API AI v\u00e0 m\u00f4 h\u00ecnh ng\u00f4n ng\u1eef l\u1edbn (LLM) mi\u1ec5n ph\u00ed<\/h2>\n<p style=\"text-align: justify;\">C\u00e1c t\u00e1c v\u1ee5 nh\u01b0 t\u00f3m t\u1eaft v\u0103n b\u1ea3n, x\u00e2y d\u1ef1ng chatbot hay ph\u00e2n lo\u1ea1i d\u1eef li\u1ec7u hi\u1ec7n nay \u0111\u00e3 d\u1ec5 ti\u1ebfp c\u1eadn h\u01a1n r\u1ea5t nhi\u1ec1u. Nhi\u1ec1u \u0111\u01a1n v\u1ecb c\u00f4ng ngh\u1ec7 l\u1edbn v\u1eabn duy tr\u00ec c\u00e1c g\u00f3i tr\u1ea3i nghi\u1ec7m t\u01b0\u01a1ng \u0111\u1ed1i tho\u00e1ng cho developer.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Google AI Studio (Gemini): H\u1ea1n m\u1ee9c tr\u1ea3i nghi\u1ec7m r\u1ed9ng r\u00e3i<\/h3>\n<p style=\"text-align: justify;\">Th\u00f4ng qua Google AI Studio, b\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o API key \u0111\u1ec3 d\u00f9ng d\u00f2ng model Gemini Flash ho\u00e0n to\u00e0n mi\u1ec5n ph\u00ed. H\u1ea1n m\u1ee9c cho ph\u00e9p 15 request m\u1ed7i ph\u00fat v\u00e0 t\u1edbi 1.500 request m\u1ed7i ng\u00e0y, r\u1ea5t ph\u00f9 h\u1ee3p \u0111\u1ec3 d\u1ef1ng chatbot th\u1eed nghi\u1ec7m ho\u1eb7c x\u1eed l\u00fd prompt t\u1ef1 \u0111\u1ed9ng h\u00f3a.<\/p>\n<pre><code class=\"language-python\">import google.generativeai as genai\r\n\r\ngenai.configure(api_key=\"YOUR_API_KEY\")\r\nmodel = genai.GenerativeModel(\"gemini-1.5-flash\")\r\nresponse = model.generate_content(\"Gi\u1ea3i th\u00edch API l\u00e0 g\u00ec trong 2 c\u00e2u\")\r\nprint(response.text)<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43703\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Google-AI-Studio-Gemini-API.png\" alt=\"Google AI Studio (Gemini) API\" width=\"1000\" height=\"453\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Google-AI-Studio-Gemini-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Google-AI-Studio-Gemini-API-300x136.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Google-AI-Studio-Gemini-API-768x348.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Groq: T\u1ed1c \u0111\u1ed9 ph\u1ea3n h\u1ed3i c\u1ef1c nhanh<\/h3>\n<p style=\"text-align: justify;\">Nh\u1edd ki\u1ebfn tr\u00fac ph\u1ea7n c\u1ee9ng LPU chuy\u00ean bi\u1ec7t, Groq ch\u1ea1y c\u00e1c model m\u00e3 ngu\u1ed3n m\u1edf nh\u01b0 Llama hay Qwen v\u1edbi \u0111\u1ed9 tr\u1ec5 c\u1ef1c th\u1ea5p. H\u1ea1n m\u1ee9c free tier l\u00ean \u0111\u1ebfn 30 request m\u1ed7i ph\u00fat v\u00e0 14.400 request m\u1ed7i ng\u00e0y. \u0110i\u1ec3m c\u1ed9ng l\u1edbn l\u00e0 API chu\u1ea9n h\u00f3a theo \u0111\u1ecbnh d\u1ea1ng c\u1ee7a OpenAI, gi\u00fap b\u1ea1n d\u1ec5 d\u00e0ng chuy\u1ec3n \u0111\u1ed5i base URL m\u00e0 kh\u00f4ng c\u1ea7n vi\u1ebft l\u1ea1i to\u00e0n b\u1ed9 logic g\u1ecdi API.<\/p>\n<pre><code class=\"language-python\">from groq import Groq\r\n\r\nclient = Groq(api_key=\"YOUR_GROQ_KEY\")\r\nchat = client.chat.completions.create(\r\n    model=\"llama-3.1-8b-instant\",\r\n    messages=[{\"role\": \"user\", \"content\": \"Vi\u1ebft h\u00e0m Python t\u00ednh giai th\u1eeba\"}]\r\n)\r\nprint(chat.choices[0].message.content)<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43704\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Groq-API.png\" alt=\"Groq API\" width=\"1000\" height=\"469\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Groq-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Groq-API-300x141.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Groq-API-768x360.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Hugging Face Inference API: Th\u1eed nghi\u1ec7m h\u00e0ng ng\u00e0n model<\/h3>\n<p style=\"text-align: justify;\">Hugging Face cho ph\u00e9p l\u1eadp tr\u00ecnh vi\u00ean ch\u1ea1y th\u1eed nhi\u1ec1u m\u00f4 h\u00ecnh chuy\u00ean bi\u1ec7t nh\u01b0 embedding, sentiment analysis hay text generation qua HTTP endpoint. G\u00f3i serverless mi\u1ec5n ph\u00ed cung c\u1ea5p m\u1ed9t kho\u1ea3n credit nh\u1ecf h\u00e0ng th\u00e1ng, v\u1eeba \u0111\u1ee7 \u0111\u1ec3 b\u1ea1n \u0111\u00e1nh gi\u00e1 hi\u1ec7u n\u0103ng m\u00f4 h\u00ecnh tr\u01b0\u1edbc khi quy\u1ebft \u0111\u1ecbnh t\u1ef1 host tr\u00ean m\u00e1y ch\u1ee7 ri\u00eang.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nAPI_URL = \"https:\/\/api-inference.huggingface.co\/models\/sentence-transformers\/all-MiniLM-L6-v2\"\r\nheaders = {\"Authorization\": \"Bearer YOUR_HF_TOKEN\"}\r\nresp = requests.post(API_URL, headers=headers, json={\"inputs\": \"Xin ch\u00e0o\"})\r\nprint(resp.json())<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43706\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hugging-Face-Inference-API.png\" alt=\"Hugging Face Inference API\" width=\"1000\" height=\"465\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hugging-Face-Inference-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hugging-Face-Inference-API-300x140.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hugging-Face-Inference-API-768x357.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">GitHub Models: S\u00e2n ch\u01a1i AI ngay trong t\u00e0i kho\u1ea3n GitHub<\/h3>\n<p style=\"text-align: justify;\">N\u1ebfu \u0111\u00e3 c\u00f3 t\u00e0i kho\u1ea3n GitHub, b\u1ea1n c\u00f3 th\u1ec3 g\u1ecdi th\u1eed c\u00e1c m\u00f4 h\u00ecnh h\u00e0ng \u0111\u1ea7u nh\u01b0 GPT-4o mini, Mistral hay Phi ho\u00e0n to\u00e0n mi\u1ec5n ph\u00ed. H\u1ea1n m\u1ee9c kho\u1ea3ng 60 request\/ph\u00fat, \u0111\u1ecbnh d\u1ea1ng endpoint t\u01b0\u01a1ng th\u00edch chu\u1ea9n OpenAI, r\u1ea5t ti\u1ec7n cho c\u00e1c b\u1ea1n sinh vi\u00ean v\u00e0 l\u1eadp tr\u00ecnh vi\u00ean c\u00e1 nh\u00e2n l\u00e0m \u0111\u1ed3 \u00e1n.<\/p>\n<pre><code class=\"language-bash\">curl -X POST \"https:\/\/models.inference.ai.azure.com\/chat\/completions\" \\\r\n  -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\r\n  -H \"Content-Type: application\/json\" \\\r\n  -d '{\"model\":\"gpt-4o-mini\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43702\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/GitHub-Models.png\" alt=\"GitHub Models\" width=\"1000\" height=\"462\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/GitHub-Models.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/GitHub-Models-300x139.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/GitHub-Models-768x355.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2 id=\"section5\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">API d\u1eef li\u1ec7u crypto v\u00e0 t\u00e0i ch\u00ednh<\/h2>\n<p style=\"text-align: justify;\">X\u00e2y d\u1ef1ng dashboard theo d\u00f5i t\u00e0i ch\u00ednh, c\u1eadp nh\u1eadt t\u1ef7 gi\u00e1 hay bi\u1ebfn \u0111\u1ed9ng ti\u1ec1n m\u00e3 h\u00f3a \u0111\u00f2i h\u1ecfi ngu\u1ed3n d\u1eef li\u1ec7u \u1ed5n \u0111\u1ecbnh. Tuy nhi\u00ean, nh\u00f3m API n\u00e0y \u00e1p d\u1ee5ng rate limit kh\u00e1 nghi\u00eam ng\u1eb7t, \u0111\u00f2i h\u1ecfi b\u1ea1n ph\u1ea3i thi\u1ebft k\u1ebf c\u01a1 ch\u1ebf l\u01b0u cache h\u1ee3p l\u00fd.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">CoinGecko: D\u1eef li\u1ec7u th\u1ecb tr\u01b0\u1eddng Crypto kh\u00f4ng c\u1ea7n key<\/h3>\n<p style=\"text-align: justify;\">CoinGecko h\u1ed7 tr\u1ee3 theo d\u00f5i gi\u00e1, kh\u1ed1i l\u01b0\u1ee3ng giao d\u1ecbch v\u00e0 v\u1ed1n h\u00f3a c\u1ee7a h\u00e0ng ng\u00e0n lo\u1ea1i ti\u1ec1n m\u00e3 h\u00f3a. Endpoint c\u00f4ng khai c\u1ee7a h\u1ecd cho ph\u00e9p g\u1ecdi ngay m\u00e0 kh\u00f4ng c\u1ea7n t\u1ea1o t\u00e0i kho\u1ea3n (kho\u1ea3ng 10 \u0111\u1ebfn 30 request m\u1ed7i ph\u00fat t\u00f9y t\u1ea3i h\u1ec7 th\u1ed1ng). N\u1ebfu \u0111\u0103ng k\u00fd th\u00eam g\u00f3i Demo mi\u1ec5n ph\u00ed, b\u1ea1n s\u1ebd nh\u1eadn \u0111\u01b0\u1ee3c h\u1ea1n m\u1ee9c \u1ed5n \u0111\u1ecbnh h\u01a1n \u1edf m\u1ee9c 100 request\/ph\u00fat.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nurl = \"https:\/\/api.coingecko.com\/api\/v3\/simple\/price\"\r\nparams = {\"ids\": \"bitcoin,ethereum\", \"vs_currencies\": \"usd,vnd\"}\r\nresp = requests.get(url, params=params)\r\nprint(resp.json())<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43700\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/CoinGecko-API.png\" alt=\"CoinGecko API\" width=\"1000\" height=\"529\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/CoinGecko-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/CoinGecko-API-300x159.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/CoinGecko-API-768x406.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">ExchangeRate-API: Chuy\u1ec3n \u0111\u1ed5i t\u1ef7 gi\u00e1 ngo\u1ea1i t\u1ec7<\/h3>\n<p style=\"text-align: justify;\">D\u1ecbch v\u1ee5 h\u1ed7 tr\u1ee3 c\u1eadp nh\u1eadt t\u1ef7 gi\u00e1 cho h\u01a1n 160 \u0111\u1ed3ng ti\u1ec1n kh\u00e1c nhau. Endpoint m\u1edf c\u00f3 th\u1ec3 d\u00f9ng ngay \u0111\u1ec3 quy \u0111\u1ed5i c\u00e1c c\u1eb7p ti\u1ec1n c\u01a1 b\u1ea3n, r\u1ea5t th\u00edch h\u1ee3p khi b\u1ea1n c\u1ea7n l\u00e0m t\u00ednh n\u0103ng thanh to\u00e1n \u0111a ti\u1ec1n t\u1ec7 ho\u1eb7c quy \u0111\u1ed5i gi\u00e1 tr\u1ecb \u0111\u01a1n h\u00e0ng.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nurl = \"https:\/\/open.er-api.com\/v6\/latest\/USD\"\r\nresp = requests.get(url)\r\ndata = resp.json()\r\nprint(f\"1 USD = {data['rates']['VND']} VND\")<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43701\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/ExchangeRate-API.png\" alt=\"ExchangeRate-API\" width=\"1000\" height=\"596\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/ExchangeRate-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/ExchangeRate-API-300x179.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/ExchangeRate-API-768x458.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Alpha Vantage: Theo d\u00f5i ch\u1ee9ng kho\u00e1n v\u00e0 ngo\u1ea1i h\u1ed1i<\/h3>\n<p style=\"text-align: justify;\">Alpha Vantage l\u00e0 c\u00e1i t\u00ean quen thu\u1ed9c trong m\u1ea3ng t\u00e0i ch\u00ednh truy\u1ec1n th\u1ed1ng, h\u1ed7 tr\u1ee3 c\u1ea3 m\u00e3 c\u1ed5 phi\u1ebfu qu\u1ed1c t\u1ebf, forex v\u00e0 crypto. \u0110i\u1ec3m tr\u1eeb l\u00e0 g\u00f3i mi\u1ec5n ph\u00ed kh\u1ed1ng ch\u1ebf ch\u1ec9 25 request m\u1ed7i ng\u00e0y v\u00e0 5 request m\u1ed7i ph\u00fat, ph\u00f9 h\u1ee3p \u0111\u1ec3 ch\u1ea1y script ph\u00e2n t\u00edch cu\u1ed1i ng\u00e0y h\u01a1n l\u00e0 d\u1ef1ng dashboard real-time.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nurl = f\"https:\/\/www.alphavantage.co\/query?function=GLOBAL_QUOTE&amp;symbol=AAPL&amp;apikey=YOUR_KEY\"\r\nresp = requests.get(url)\r\nprint(resp.json()[\"Global Quote\"][\"05. price\"])<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43698\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Alpha-Vantage-API.png\" alt=\"Alpha Vantage API\" width=\"1000\" height=\"547\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Alpha-Vantage-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Alpha-Vantage-API-300x164.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Alpha-Vantage-API-768x420.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2 id=\"section6\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">API d\u1ecbch thu\u1eadt h\u1ed7 tr\u1ee3 ti\u1ebfng Vi\u1ec7t<\/h2>\n<p style=\"text-align: justify;\">T\u00edch h\u1ee3p t\u00ednh n\u0103ng \u0111a ng\u00f4n ng\u1eef ho\u1eb7c d\u1ecbch t\u1ef1 \u0111\u1ed9ng n\u1ed9i dung c\u00f3 th\u1ec3 l\u00e0m h\u00f3a \u0111\u01a1n \u0111\u00e1m m\u00e2y t\u0103ng v\u1ecdt n\u1ebfu b\u1ea1n d\u00f9ng c\u00e1c API tr\u1ea3 ph\u00ed l\u1edbn. Thay v\u00e0o \u0111\u00f3, b\u1ea1n c\u00f3 th\u1ec3 c\u00e2n nh\u1eafc hai h\u01b0\u1edbng ti\u1ebfp c\u1eadn ho\u00e0n to\u00e0n mi\u1ec5n ph\u00ed d\u01b0\u1edbi \u0111\u00e2y.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">LibreTranslate: T\u1ef1 v\u1eadn h\u00e0nh m\u00e1y ch\u1ee7 d\u1ecbch thu\u1eadt ri\u00eang<\/h3>\n<p style=\"text-align: justify;\">LibreTranslate l\u00e0 n\u1ec1n t\u1ea3ng d\u1ecbch m\u00e3 ngu\u1ed3n m\u1edf ho\u00e0n ch\u1ec9nh, h\u1ed7 tr\u1ee3 ti\u1ebfng Vi\u1ec7t t\u01b0\u01a1ng \u0111\u1ed1i m\u01b0\u1ee3t m\u00e0. Thay v\u00ec ph\u1ee5 thu\u1ed9c v\u00e0o h\u1ea1 t\u1ea7ng b\u00ean th\u1ee9 ba, b\u1ea1n c\u00f3 th\u1ec3 t\u1ef1 c\u00e0i \u0111\u1eb7t l\u00ean m\u00e1y ch\u1ee7 c\u00e1 nh\u00e2n b\u1eb1ng Docker \u0111\u1ec3 s\u1eed d\u1ee5ng kh\u00f4ng gi\u1edbi h\u1ea1n s\u1ed1 l\u01b0\u1ee3ng request.<\/p>\n<pre><code class=\"language-bash\">docker run -d -p 5000:5000 libretranslate\/libretranslate\r\n\r\ncurl -X POST \"http:\/\/localhost:5000\/translate\" \\\r\n  -H \"Content-Type: application\/json\" \\\r\n  -d '{\"q\":\"Hello world\",\"source\":\"en\",\"target\":\"vi\"}'<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43709\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/LibreTranslate-API.png\" alt=\"LibreTranslate API\" width=\"1000\" height=\"586\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/LibreTranslate-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/LibreTranslate-API-300x176.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/LibreTranslate-API-768x450.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">MyMemory: D\u1ecbch tr\u1ef1c ti\u1ebfp kh\u00f4ng c\u1ea7n \u0111\u0103ng k\u00fd<\/h3>\n<p style=\"text-align: justify;\">MyMemory ho\u1ea1t \u0111\u1ed9ng d\u1ef1a tr\u00ean b\u1ed9 nh\u1edb d\u1ecbch c\u1ed9ng \u0111\u1ed3ng qu\u1ed1c t\u1ebf. Ng\u01b0\u1eddi d\u00f9ng \u1ea9n danh \u0111\u01b0\u1ee3c c\u1ea5p 5.000 k\u00fd t\u1ef1 m\u1ed7i ng\u00e0y. N\u1ebfu g\u1eedi k\u00e8m email trong tham s\u1ed1 request, h\u1ec7 th\u1ed1ng s\u1ebd t\u1ef1 \u0111\u1ed9ng n\u00e2ng h\u1ea1n m\u1ee9c l\u00ean 50.000 k\u00fd t\u1ef1, r\u1ea5t ti\u1ec7n cho c\u00e1c t\u00e1c v\u1ee5 d\u1ecbch thu\u1eadt ng\u1eafn.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nurl = \"https:\/\/api.mymemory.translated.net\/get\"\r\nparams = {\"q\": \"Xin ch\u00e0o th\u1ebf gi\u1edbi\", \"langpair\": \"vi|en\"}\r\nresp = requests.get(url, params=params)\r\nprint(resp.json()[\"responseData\"][\"translatedText\"])<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43710\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/MyMemory-API.png\" alt=\"MyMemory API\" width=\"1000\" height=\"473\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/MyMemory-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/MyMemory-API-300x142.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/MyMemory-API-768x363.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h2 id=\"section7\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">API bot Telegram v\u00e0 c\u00f4ng c\u1ee5 mock data<\/h2>\n<p style=\"text-align: justify;\">T\u1ef1 \u0111\u1ed9ng h\u00f3a th\u00f4ng b\u00e1o s\u1ef1 c\u1ed1 h\u1ec7 th\u1ed1ng, thu th\u1eadp tin t\u1ee9c c\u00f4ng ngh\u1ec7 ho\u1eb7c l\u1ea5y d\u1eef li\u1ec7u gi\u1ea3 l\u1eadp \u0111\u1ec3 d\u1ef1ng giao di\u1ec7n l\u00e0 nh\u1eefng nhu c\u1ea7u ph\u1ed5 bi\u1ebfn nh\u1ea5t khi ph\u00e1t tri\u1ec3n ph\u1ea7n m\u1ec1m.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Telegram Bot API: H\u1ea1 t\u1ea7ng g\u1eedi th\u00f4ng b\u00e1o mi\u1ec5n ph\u00ed v\u0129nh vi\u1ec5n<\/h3>\n<p style=\"text-align: justify;\">Telegram Bot API kh\u00f4ng t\u00ednh ph\u00ed g\u1eedi tin nh\u1eafn v\u00e0 kh\u00f4ng gi\u1edbi h\u1ea1n th\u1eddi gian ho\u1ea1t \u0111\u1ed9ng. B\u1ea1n ch\u1ec9 c\u1ea7n chat v\u1edbi @BotFather \u0111\u1ec3 t\u1ea1o bot v\u00e0 l\u1ea5y token trong v\u00e0i ph\u00fat. H\u1ea1n m\u1ee9c th\u1ef1c t\u1ebf dao \u0111\u1ed9ng kho\u1ea3ng 30 tin nh\u1eafn m\u1ed7i gi\u00e2y tr\u00ean to\u00e0n h\u1ec7 th\u1ed1ng v\u00e0 1 tin\/gi\u00e2y cho m\u1ed9t \u0111o\u1ea1n chat. \u0110\u1ec3 c\u1ea5u h\u00ecnh bot theo d\u00f5i t\u00ecnh tr\u1ea1ng server, b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o b\u00e0i vi\u1ebft <a href=\"https:\/\/interdata.vn\/blog\/tao-bot-telegram-giam-sat-vps\/\">t\u1ea1o bot Telegram gi\u00e1m s\u00e1t VPS<\/a>.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nBOT_TOKEN = \"YOUR_BOT_TOKEN\"\r\nCHAT_ID = \"YOUR_CHAT_ID\"\r\nurl = f\"https:\/\/api.telegram.org\/bot{BOT_TOKEN}\/sendMessage\"\r\npayload = {\"chat_id\": CHAT_ID, \"text\": \"H\u1ec7 th\u1ed1ng ho\u1ea1t \u0111\u1ed9ng b\u00ecnh th\u01b0\u1eddng!\"}\r\nrequests.post(url, json=payload)<\/code><\/pre>\n<p style=\"text-align: justify;\">N\u1ebfu mu\u1ed1n m\u1edf r\u1ed9ng t\u00ednh n\u0103ng bot \u0111\u1ec3 x\u1eed l\u00fd l\u1ec7nh t\u01b0\u01a1ng t\u00e1c v\u00e0 b\u00e0n ph\u00edm b\u1ea5m, h\u00e3y xem th\u00eam h\u01b0\u1edbng d\u1eabn <a href=\"https:\/\/interdata.vn\/blog\/lap-trinh-bot-telegram-python\/\">l\u1eadp tr\u00ecnh bot Telegram v\u1edbi Python<\/a>.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">Hacker News API: Ngu\u1ed3n tin c\u00f4ng ngh\u1ec7 m\u1edf<\/h3>\n<p style=\"text-align: justify;\">Y Combinator m\u1edf to\u00e0n b\u1ed9 c\u01a1 s\u1edf d\u1eef li\u1ec7u b\u00e0i vi\u1ebft, b\u00ecnh lu\u1eadn v\u00e0 t\u00e0i kho\u1ea3n tr\u00ean Hacker News. API n\u00e0y kh\u00f4ng c\u1ea7n key, kh\u00f4ng \u00e9p h\u1ea1n m\u1ee9c c\u1ee9ng, h\u1ed7 tr\u1ee3 c\u1ea3 Firebase API cho d\u1eef li\u1ec7u c\u1eadp nh\u1eadt theo th\u1eddi gian th\u1ef1c l\u1eabn Algolia API cho nhu c\u1ea7u t\u00ecm ki\u1ebfm nhanh.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\ntop_ids = requests.get(\"https:\/\/hacker-news.firebaseio.com\/v0\/topstories.json\").json()\r\nfirst = requests.get(f\"https:\/\/hacker-news.firebaseio.com\/v0\/item\/{top_ids[0]}.json\").json()\r\nprint(first[\"title\"], first[\"url\"])<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43705\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hacker-News-API.png\" alt=\"Hacker News API\" width=\"1000\" height=\"467\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hacker-News-API.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hacker-News-API-300x140.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/Hacker-News-API-768x359.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">GNews v\u00e0 NewsAPI: Ngu\u1ed3n c\u1ea5p tin t\u1ee9c t\u1ed5ng h\u1ee3p<\/h3>\n<p style=\"text-align: justify;\">NewsAPI v\u00e0 GNews cho ph\u00e9p b\u1ea1n l\u1ea5y c\u00e1c b\u00e0i b\u00e1o theo t\u1eeb kh\u00f3a v\u1edbi h\u1ea1n m\u1ee9c kho\u1ea3ng 100 request m\u1ed7i ng\u00e0y \u1edf g\u00f3i l\u1eadp tr\u00ecnh vi\u00ean. C\u00e1c g\u00f3i mi\u1ec5n ph\u00ed n\u00e0y th\u01b0\u1eddng c\u00f3 \u0111\u1ed9 tr\u1ec5 tin b\u00e0i nh\u1ea5t \u0111\u1ecbnh, ph\u00f9 h\u1ee3p \u0111\u1ec3 th\u1eed nghi\u1ec7m logic l\u1ecdc b\u00e0i tr\u01b0\u1edbc khi chuy\u1ec3n sang g\u00f3i c\u00f3 ph\u00ed.<\/p>\n<pre><code class=\"language-python\">import requests\r\n\r\nurl = \"https:\/\/gnews.io\/api\/v4\/search\"\r\nparams = {\"q\": \"Vietnam technology\", \"lang\": \"en\", \"max\": 5, \"apikey\": \"YOUR_KEY\"}\r\nresp = requests.get(url, params=params)\r\nfor article in resp.json()[\"articles\"]:\r\n    print(article[\"title\"])<\/code><\/pre>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">JSONPlaceholder: Mock API chu\u1ea9n RESTful cho Frontend<\/h3>\n<p style=\"text-align: justify;\">Khi backend ch\u01b0a ho\u00e0n thi\u1ec7n nh\u01b0ng frontend c\u1ea7n d\u1eef li\u1ec7u m\u1eabu \u0111\u1ec3 d\u1ef1ng giao di\u1ec7n, JSONPlaceholder l\u00e0 gi\u1ea3i ph\u00e1p c\u1ee9u c\u00e1nh. API cung c\u1ea5p s\u1eb5n c\u00e1c t\u1eadp d\u1eef li\u1ec7u nh\u01b0 b\u00e0i vi\u1ebft, b\u00ecnh lu\u1eadn, ng\u01b0\u1eddi d\u00f9ng v\u00e0 h\u1ed7 tr\u1ee3 \u0111\u1ea7y \u0111\u1ee7 c\u00e1c ph\u01b0\u01a1ng th\u1ee9c GET, POST, PUT, DELETE m\u00e0 kh\u00f4ng c\u1ea7n b\u1ea5t k\u1ef3 kh\u00e2u \u0111\u0103ng k\u00fd n\u00e0o.<\/p>\n<pre><code class=\"language-javascript\">fetch(\"https:\/\/jsonplaceholder.typicode.com\/posts\/1\")\r\n  .then(res =&gt; res.json())\r\n  .then(data =&gt; console.log(data.title));<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43708\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/JSONPlaceholder.png\" alt=\"JSONPlaceholder\" width=\"1000\" height=\"709\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/JSONPlaceholder.png 1000w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/JSONPlaceholder-300x213.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/JSONPlaceholder-768x545.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<div style=\"background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); border: 1.5px solid #2563EB; border-radius: 12px; padding: 28px; margin: 35px 0; text-align: center;\">\n<p style=\"font-family: 'Be Vietnam Pro', sans-serif; font-size: 22px; font-weight: bold; color: #1e3a8a; margin: 0 0 8px;\">S\u0103n deal VPS &amp; Cloud Server tr\u01b0\u1edbc khi ch\u1ed1t g\u00f3i<\/p>\n<p style=\"font-size: 15px; color: #4b5563; margin-bottom: 20px;\">Trang Canh Me t\u1ed5ng h\u1ee3p khuy\u1ebfn m\u00e3i, m\u00e3 gi\u1ea3m gi\u00e1 v\u00e0 Hot Deals VPS, Cloud Server m\u1edbi nh\u1ea5t t\u1eeb InterData, gi\u00fap b\u1ea1n t\u1ed1i \u01b0u chi ph\u00ed h\u1ea1 t\u1ea7ng ngay t\u1eeb \u0111\u1ea7u.<\/p>\n<p><a style=\"background: #2563EB; color: #fff; padding: 12px 30px; text-decoration: none; font-weight: 600; border-radius: 8px; display: inline-block;\" href=\"https:\/\/interdata.vn\/canhme\/\" target=\"_blank\" rel=\"noopener\">T\u00ecm Deal VPS Si\u00eau R\u1ebb \u27f6<\/a><\/p>\n<\/div>\n<h2 id=\"section8\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Quy tr\u00ecnh t\u00edch h\u1ee3p API l\u00ean m\u00e1y ch\u1ee7 VPS<\/h2>\n<p style=\"text-align: justify;\">Thay v\u00ec \u0111\u1ec3 m\u00e1y t\u00ednh c\u00e1 nh\u00e2n ch\u1ea1y su\u1ed1t ng\u00e0y \u0111\u00eam, vi\u1ec7c tri\u1ec3n khai script g\u1ecdi API l\u00ean m\u1ed9t m\u00e1y ch\u1ee7 \u1ea3o (VPS) Linux l\u00e0 ph\u01b0\u01a1ng \u00e1n chu\u1ea9n ch\u1ec9 nh\u1ea5t \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o t\u00ednh li\u00ean t\u1ee5c cho c\u00e1c cronjob hay bot th\u00f4ng b\u00e1o.<\/p>\n<ol>\n<li><strong>C\u00e0i \u0111\u1eb7t Python v\u00e0 tr\u00ecnh qu\u1ea3n l\u00fd pip:<\/strong> ch\u1ea1y l\u1ec7nh <code>sudo apt update &amp;&amp; sudo apt install python3 python3-pip -y<\/code> tr\u00ean terminal m\u00e1y ch\u1ee7.<\/li>\n<li><strong>T\u1ea1o m\u00f4i tr\u01b0\u1eddng \u1ea3o \u0111\u1ec3 c\u00f4 l\u1eadp th\u01b0 vi\u1ec7n:<\/strong> <code>python3 -m venv venv &amp;&amp; source venv\/bin\/activate &amp;&amp; pip install requests python-dotenv<\/code>.<\/li>\n<li><strong>\u0110\u01b0a source code l\u00ean VPS:<\/strong> t\u1ea1o file <code>api_client.py<\/code> v\u00e0 c\u1ea5u h\u00ecnh c\u00e1c endpoint c\u1ea7n thi\u1ebft.<\/li>\n<li><strong>Duy tr\u00ec ti\u1ebfn tr\u00ecnh ch\u1ea1y n\u1ec1n:<\/strong> s\u1eed d\u1ee5ng <code>screen -S api_job<\/code> \u0111\u1ec3 script ti\u1ebfp t\u1ee5c ch\u1ea1y ngay c\u1ea3 khi b\u1ea1n ng\u1eaft k\u1ebft n\u1ed1i SSH.<\/li>\n<li><strong>C\u1ea5u h\u00ecnh t\u1ef1 kh\u1edfi \u0111\u1ed9ng b\u1eb1ng systemd:<\/strong> t\u1ea1o file d\u1ecbch v\u1ee5 t\u1ea1i <code>\/etc\/systemd\/system\/api-client.service<\/code> \u0111\u1ec3 h\u1ec7 th\u1ed1ng t\u1ef1 b\u1eadt l\u1ea1i ti\u1ebfn tr\u00ecnh m\u1ed7i khi server reboot.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">N\u1ebfu b\u1ea1n mu\u1ed1n t\u1ef1 l\u01b0u tr\u1eef c\u00e1c d\u1ecbch v\u1ee5 d\u1ecbch thu\u1eadt ho\u1eb7c c\u00f4ng c\u1ee5 c\u00e0o d\u1eef li\u1ec7u, xem th\u00eam b\u00e0i h\u01b0\u1edbng d\u1eabn <a href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps\/\">c\u00e0i \u0111\u1eb7t OpenClaw tr\u00ean VPS<\/a>. Ngo\u00e0i ra, n\u1ebfu \u1ee9ng d\u1ee5ng c\u1ee7a b\u1ea1n c\u1ea7n cung c\u1ea5p d\u1eef li\u1ec7u ng\u01b0\u1ee3c l\u1ea1i cho client, b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o c\u00e1ch <a href=\"https:\/\/interdata.vn\/blog\/express-js-la-gi\/\">x\u00e2y d\u1ef1ng API RESTful v\u1edbi Express.js<\/a> \u0111\u1ec3 l\u00e0m t\u1ea7ng backend \u0111i\u1ec1u ph\u1ed1i.<\/p>\n<h2 id=\"section9\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Qu\u1ea3n l\u00fd API key an to\u00e0n v\u00e0 x\u1eed l\u00fd rate limit<\/h2>\n<p style=\"text-align: justify;\">Vi\u1ec7c v\u00f4 t\u00ecnh \u0111\u01b0a file c\u00f3 ch\u1ee9a API key l\u00ean GitHub c\u00f4ng khai l\u00e0 sai l\u1ea7m r\u1ea5t nhi\u1ec1u ng\u01b0\u1eddi m\u1eafc ph\u1ea3i. Chu\u1ed7i x\u00e1c th\u1ef1c c\u1ea7n \u0111\u01b0\u1ee3c l\u01b0u ri\u00eang trong file <code>.env<\/code> v\u00e0 lu\u00f4n khai b\u00e1o trong <code>.gitignore<\/code>. Tr\u00ean m\u00e1y ch\u1ee7 Linux, b\u1ea1n n\u00ean si\u1ebft quy\u1ec1n truy c\u1eadp file nh\u1ea1y c\u1ea3m n\u00e0y b\u1eb1ng l\u1ec7nh <code>chmod 600 .env<\/code>.<\/p>\n<pre><code class=\"language-python\"># File .env\r\nOPENWEATHER_KEY=abc123xyz\r\nGEMINI_KEY=gemini_secret_key\r\n\r\n# Trong m\u00e3 ngu\u1ed3n Python\r\nfrom dotenv import load_dotenv\r\nimport os\r\n\r\nload_dotenv()\r\nkey = os.getenv(\"OPENWEATHER_KEY\")<\/code><\/pre>\n<p style=\"text-align: justify;\">Khi g\u1ecdi API v\u1edbi t\u1ea7n su\u1ea5t l\u1edbn, b\u1ea1n ch\u1eafc ch\u1eafn s\u1ebd g\u1eb7p m\u00e3 l\u1ed7i 429 (Too Many Requests). Thu\u1eadt to\u00e1n ph\u00f9 h\u1ee3p nh\u1ea5t trong tr\u01b0\u1eddng h\u1ee3p n\u00e0y l\u00e0 exponential backoff (th\u1eed l\u1ea1i v\u1edbi \u0111\u1ed9 tr\u1ec5 t\u0103ng d\u1ea7n sau m\u1ed7i l\u1ea7n th\u1ea5t b\u1ea1i). Nhi\u1ec1u server c\u0169ng tr\u1ea3 v\u1ec1 k\u00e8m header <code>Retry-After<\/code> cho bi\u1ebft ch\u00ednh x\u00e1c s\u1ed1 gi\u00e2y c\u1ea7n ch\u1edd, b\u1ea1n n\u00ean t\u1eadn d\u1ee5ng gi\u00e1 tr\u1ecb n\u00e0y thay v\u00ec \u0111\u1eb7t th\u1eddi gian ng\u1ee7 c\u1ed1 \u0111\u1ecbnh.<\/p>\n<pre><code class=\"language-python\">import time\r\nimport requests\r\n\r\ndef call_api_with_retry(url, max_retries=3):\r\n    for attempt in range(max_retries):\r\n        resp = requests.get(url)\r\n        if resp.status_code == 429:\r\n            # \u01afu ti\u00ean \u0111\u1ecdc th\u1eddi gian ch\u1edd t\u1eeb header c\u1ee7a server\r\n            wait_time = int(resp.headers.get(\"Retry-After\", 2 ** attempt))\r\n            time.sleep(wait_time)\r\n            continue\r\n        return resp\r\n    raise Exception(\"V\u01b0\u1ee3t qu\u00e1 s\u1ed1 l\u1ea7n th\u1eed l\u1ea1i cho ph\u00e9p do rate limit!\")<\/code><\/pre>\n<p style=\"text-align: justify;\">Hi\u1ec3u r\u00f5 c\u01a1 ch\u1ebf \u0111\u00f3ng g\u00f3i th\u00f4ng \u0111i\u1ec7p m\u1ea1ng s\u1ebd gi\u00fap b\u1ea1n debug nhanh h\u01a1n \u0111\u00e1ng k\u1ec3. B\u1ea1n c\u00f3 th\u1ec3 xem th\u00eam b\u00e0i ph\u00e2n t\u00edch <a href=\"https:\/\/interdata.vn\/blog\/http-request-la-gi\/\">HTTP Request l\u00e0 g\u00ec<\/a> \u0111\u1ec3 l\u00e0m ch\u1ee7 status code v\u00e0 header. N\u1ebfu h\u1ec7 th\u1ed1ng s\u1eed d\u1ee5ng GraphQL, k\u1ef9 thu\u1eadt <a href=\"https:\/\/interdata.vn\/blog\/toi-uu-api-graphql\/\">t\u1ed1i \u01b0u API GraphQL<\/a> c\u0169ng gi\u00fap gom c\u1ee5m query v\u00e0 ti\u1ebft ki\u1ec7m s\u1ed1 l\u01b0\u1ee3ng request \u0111\u00e1ng k\u1ec3.<\/p>\n<div style=\"display: flex; flex-wrap: wrap; background-color: #fff; border: 1.5px solid #BFDBFE; box-shadow: 0 8px 20px rgba(37,99,235,0.08); border-radius: 12px; overflow: hidden; margin: 35px 0;\">\n<div style=\"flex: 1; min-width: 250px; background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center;\">\n<div>\n<p style=\"color: #fff; font-size: 34px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; margin: 0; line-height: 1.1;\">Cloud Server InterData<\/p>\n<p style=\"color: #dbeafe; font-size: 15px; font-weight: 600; margin-top: 12px;\">N\u00e2ng h\u1ea1 t\u00e0i nguy\u00ean linh ho\u1ea1t theo nhu c\u1ea7u th\u1ef1c t\u1ebf<\/p>\n<\/div>\n<\/div>\n<div style=\"flex: 2; padding: 25px; min-width: 300px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; margin-top: 0; font-size: 20px;\">C\u1ea7n m\u1edf r\u1ed9ng h\u1ea1 t\u1ea7ng khi d\u1ef1 \u00e1n t\u0103ng tr\u01b0\u1edfng?<\/h3>\n<p style=\"text-align: justify; font-size: 15px; margin-bottom: 15px;\">Khi l\u01b0\u1ee3ng ng\u01b0\u1eddi d\u00f9ng v\u00e0 t\u1ea7n su\u1ea5t x\u1eed l\u00fd t\u00e1c v\u1ee5 t\u0103ng nhanh, m\u00e1y ch\u1ee7 \u0111\u00e1m m\u00e2y (Cloud Server) cho ph\u00e9p b\u1ea1n n\u00e2ng c\u1ea5p RAM, CPU v\u00e0 b\u0103ng th\u00f4ng nhanh ch\u00f3ng m\u00e0 kh\u00f4ng l\u00e0m gi\u00e1n \u0111o\u1ea1n d\u1ecbch v\u1ee5 hay ph\u1ea3i setup l\u1ea1i m\u00e1y ch\u1ee7 t\u1eeb \u0111\u1ea7u.<\/p>\n<p><a style=\"background: linear-gradient(90deg, #2563EB 0%, #1E3A8A 100%); color: #fff; padding: 12px 25px; text-decoration: none; font-weight: 600; border-radius: 8px; font-size: 15px; display: inline-block; box-shadow: 0 5px 15px rgba(37,99,235,0.3);\" href=\"https:\/\/interdata.vn\/cloud-server\/\" target=\"_blank\" rel=\"noopener\">Xem B\u1ea3ng Gi\u00e1 Cloud Server \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<h2 id=\"section10\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Kh\u1eafc ph\u1ee5c c\u00e1c l\u1ed7i kinh \u0111i\u1ec3n khi g\u1ecdi API<\/h2>\n<p style=\"text-align: justify;\">Trong qu\u00e1 tr\u00ecnh t\u00edch h\u1ee3p, \u0111a s\u1ed1 l\u1ed7i l\u1eadp tr\u00ecnh vi\u00ean g\u1eb7p ph\u1ea3i th\u01b0\u1eddng r\u01a1i v\u00e0o ba k\u1ecbch b\u1ea3n quen thu\u1ed9c: thi\u1ebfu ch\u1ee9ng th\u1ef1c, ch\u1ea1m gi\u1edbi h\u1ea1n quota ho\u1eb7c b\u1ecb ch\u1eb7n b\u1edfi tr\u00ecnh duy\u1ec7t.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">L\u1ed7i 401 Unauthorized: Thi\u1ebfu ho\u1eb7c sai \u0111\u1ecbnh d\u1ea1ng kh\u00f3a x\u00e1c th\u1ef1c<\/h3>\n<p style=\"text-align: justify;\">Khi nh\u1eadn m\u00e3 l\u1ed7i 401, v\u1ea5n \u0111\u1ec1 90% n\u1eb1m \u1edf c\u00e1ch truy\u1ec1n key: c\u00f3 th\u1ec3 b\u1ea1n qu\u00ean c\u1ea5u h\u00ecnh bi\u1ebfn m\u00f4i tr\u01b0\u1eddng, key \u0111\u00e3 b\u1ecb thu h\u1ed3i, ho\u1eb7c g\u1eedi sai v\u1ecb tr\u00ed (v\u00ed d\u1ee5 API y\u00eau c\u1ea7u header <code>Authorization: Bearer &lt;token&gt;<\/code> nh\u01b0ng b\u1ea1n l\u1ea1i truy\u1ec1n d\u01b0\u1edbi d\u1ea1ng query param tr\u00ean URL). H\u00e3y d\u00f9ng l\u1ec7nh curl tr\u1ef1c ti\u1ebfp trong terminal \u0111\u1ec3 ki\u1ec3m tra t\u00ednh h\u1ee3p l\u1ec7 c\u1ee7a key \u0111\u1ed9c l\u1eadp v\u1edbi m\u00e3 ngu\u1ed3n \u1ee9ng d\u1ee5ng.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">L\u1ed7i 429 Too Many Requests: G\u1eedi y\u00eau c\u1ea7u qu\u00e1 d\u00e0y \u0111\u1eb7c<\/h3>\n<p style=\"text-align: justify;\">M\u00e3 l\u1ed7i n\u00e0y th\u00f4ng b\u00e1o b\u1ea1n \u0111\u00e3 ch\u1ea1m tr\u1ea7n gi\u1edbi h\u1ea1n c\u1ee7a g\u00f3i mi\u1ec5n ph\u00ed. \u0110\u1ec3 x\u1eed l\u00fd tri\u1ec7t \u0111\u1ec3, ngo\u00e0i vi\u1ec7c \u00e1p d\u1ee5ng thu\u1eadt to\u00e1n retry k\u00e8m th\u1eddi gian ch\u1edd, b\u1ea1n n\u00ean thi\u1ebft l\u1eadp cronjob \u0111\u1ecbnh k\u1ef3 thay v\u00ec d\u00f9ng v\u00f2ng l\u1eb7p v\u00f4 t\u1eadn (<code>while True<\/code>). \u0110\u1ed3ng th\u1eddi, h\u00e3y l\u01b0u d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1 v\u00e0o b\u1ed9 nh\u1edb \u0111\u1ec7m (Redis ho\u1eb7c file t\u1ea1m) n\u1ebfu th\u00f4ng tin \u0111\u00f3 kh\u00f4ng thay \u0111\u1ed5i li\u00ean t\u1ee5c.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 20px; font-weight: 600;\">L\u1ed7i CORS: Khi tr\u00ecnh duy\u1ec7t ch\u1eb7n request t\u1eeb Frontend<\/h3>\n<p style=\"text-align: justify;\">N\u1ebfu b\u1ea1n g\u1ecdi API tr\u1ef1c ti\u1ebfp t\u1eeb m\u00e3 JavaScript ch\u1ea1y tr\u00ean tr\u00ecnh duy\u1ec7t v\u00e0 g\u1eb7p th\u00f4ng b\u00e1o ch\u1eb7n b\u1edfi CORS, nguy\u00ean nh\u00e2n l\u00e0 ph\u00eda nh\u00e0 cung c\u1ea5p API kh\u00f4ng cho ph\u00e9p domain c\u1ee7a b\u1ea1n truy c\u1eadp d\u1eef li\u1ec7u tr\u1ef1c ti\u1ebfp t\u1eeb client. H\u01b0\u1edbng x\u1eed l\u00fd chu\u1ea9n nh\u1ea5t l\u00e0 d\u1ef1ng m\u1ed9t backend proxy \u0111\u01a1n gi\u1ea3n (b\u1eb1ng Express.js ho\u1eb7c FastAPI) \u0111\u1ec3 server c\u1ee7a b\u1ea1n g\u1ecdi API r\u1ed3i tr\u1ea3 k\u1ebft qu\u1ea3 v\u1ec1 cho frontend.<\/p>\n<pre><code class=\"language-javascript\">\/\/ T\u1ea1o route trung gian v\u1edbi Express.js \u0111\u1ec3 tr\u00e1nh CORS\r\napp.get(\"\/api\/weather\", async (req, res) =&gt; {\r\n  const resp = await fetch(\"https:\/\/api.open-meteo.com\/v1\/forecast?latitude=21&amp;longitude=105&amp;current_weather=true\");\r\n  res.json(await resp.json());\r\n});<\/code><\/pre>\n<p style=\"text-align: justify;\">N\u1ebfu x\u00e2y d\u1ef1ng backend b\u1eb1ng Python v\u00e0 c\u1ea7n hi\u1ec7u n\u0103ng cao k\u00e8m kh\u1ea3 n\u0103ng x\u1eed l\u00fd b\u1ea5t \u0111\u1ed3ng b\u1ed9, h\u00e3y c\u00e2n nh\u1eafc s\u1eed d\u1ee5ng <a href=\"https:\/\/interdata.vn\/blog\/top-cong-cu-ma-nguon-mo-cho-lap-trinh-vien\/\">FastAPI<\/a>. Framework n\u00e0y r\u1ea5t nh\u1eb9 v\u00e0 t\u1ef1 \u0111\u1ed9ng sinh t\u00e0i li\u1ec7u ki\u1ec3m th\u1eed r\u1ea5t ti\u1ec7n l\u1ee3i.<\/p>\n<div style=\"background-color: #f8fafc; border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 30px; margin: 40px 0;\">\n<h2 style=\"color: #1e3a8a; font-size: 22px; font-weight: bold; margin-top: 0;\">C\u00e2u H\u1ecfi Th\u01b0\u1eddng G\u1eb7p v\u1ec1 API Mi\u1ec5n Ph\u00ed<\/h2>\n<h3 style=\"color: #1e3a8a; font-size: 18px; font-weight: 600;\">API mi\u1ec5n ph\u00ed l\u00e0 g\u00ec?<\/h3>\n<p style=\"text-align: justify;\">\u0110\u00e2y l\u00e0 c\u00e1c c\u1ed5ng k\u1ebft n\u1ed1i d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c nh\u00e0 ph\u00e1t tri\u1ec3n cung c\u1ea5p cho c\u1ed9ng \u0111\u1ed3ng s\u1eed d\u1ee5ng m\u00e0 kh\u00f4ng thu ph\u00ed trong m\u1ed9t ph\u1ea1m vi nh\u1ea5t \u0111\u1ecbnh. \u0110i k\u00e8m v\u1edbi \u0111\u00f3 th\u01b0\u1eddng l\u00e0 c\u00e1c gi\u1edbi h\u1ea1n v\u1ec1 s\u1ed1 l\u01b0\u1ee3ng request trong m\u1ed9t kho\u1ea3ng th\u1eddi gian nh\u1eb1m tr\u00e1nh t\u00ecnh tr\u1ea1ng spam h\u1ec7 th\u1ed1ng.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 18px; font-weight: 600;\">C\u00f3 API n\u00e0o d\u00f9ng \u0111\u01b0\u1ee3c ngay m\u00e0 kh\u00f4ng c\u1ea7n t\u1ea1o t\u00e0i kho\u1ea3n?<\/h3>\n<p style=\"text-align: justify;\">Kh\u00e1 nhi\u1ec1u. C\u00e1c d\u1ecbch v\u1ee5 nh\u01b0 Open-Meteo (th\u1eddi ti\u1ebft), REST Countries (qu\u1ed1c gia), IP-API (\u0111\u1ecbnh v\u1ecb IP), JSONPlaceholder (mock test) hay Hacker News \u0111\u1ec1u c\u00f3 th\u1ec3 g\u1ecdi tr\u1ef1c ti\u1ebfp qua endpoint m\u00e0 kh\u00f4ng c\u1ea7n \u0111\u0103ng k\u00fd t\u00e0i kho\u1ea3n hay khai b\u00e1o token.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 18px; font-weight: 600;\">Ng\u01b0\u1eddi m\u1edbi b\u1eaft \u0111\u1ea7u n\u00ean th\u1eed nghi\u1ec7m v\u1edbi API n\u00e0o?<\/h3>\n<p style=\"text-align: justify;\">Open-Meteo v\u00e0 JSONPlaceholder l\u00e0 hai l\u1ef1a ch\u1ecdn ho\u00e0n h\u1ea3o nh\u1ea5t cho ng\u01b0\u1eddi m\u1edbi b\u1eaft \u0111\u1ea7u. C\u1ea3 hai \u0111\u1ec1u kh\u00f4ng b\u1eaft bu\u1ed9c t\u1ea1o key, d\u1eef li\u1ec7u tr\u1ea3 v\u1ec1 tr\u1ef1c quan v\u00e0 t\u00e0i li\u1ec7u h\u01b0\u1edbng d\u1eabn r\u1ea5t th\u00e2n thi\u1ec7n.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 18px; font-weight: 600;\">C\u00f3 n\u00ean d\u00f9ng API mi\u1ec5n ph\u00ed cho d\u1ef1 \u00e1n th\u01b0\u01a1ng m\u1ea1i th\u1ef1c t\u1ebf?<\/h3>\n<p style=\"text-align: justify;\">C\u00e1c g\u00f3i mi\u1ec5n ph\u00ed ch\u1ec9 ph\u00f9 h\u1ee3p cho giai \u0111o\u1ea1n ch\u1ea1y th\u1eed nghi\u1ec7m, l\u00e0m b\u1ea3n m\u1eabu (MVP) ho\u1eb7c c\u00e1c h\u1ec7 th\u1ed1ng c\u00f3 l\u01b0\u1ee3ng truy c\u1eadp th\u1ea5p. Khi b\u01b0\u1edbc v\u00e0o giai \u0111o\u1ea1n th\u01b0\u01a1ng m\u1ea1i ch\u00ednh th\u1ee9c, b\u1ea1n n\u00ean \u0111\u0103ng k\u00fd g\u00f3i d\u1ecbch v\u1ee5 tr\u1ea3 ph\u00ed ho\u1eb7c t\u1ef1 l\u01b0u tr\u1eef (self-host) tr\u00ean m\u00e1y ch\u1ee7 ri\u00eang \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o t\u00ednh \u1ed5n \u0111\u1ecbnh v\u00e0 cam k\u1ebft d\u1ecbch v\u1ee5 (SLA).<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 18px; font-weight: 600;\">Rate limit \u1edf c\u00e1c g\u00f3i mi\u1ec5n ph\u00ed th\u01b0\u1eddng \u0111\u01b0\u1ee3c t\u00ednh nh\u01b0 th\u1ebf n\u00e0o?<\/h3>\n<p style=\"text-align: justify;\">M\u1ed7i d\u1ecbch v\u1ee5 s\u1ebd c\u00f3 c\u00e1ch t\u00ednh ri\u00eang. C\u00f3 n\u01a1i gi\u1edbi h\u1ea1n theo ph\u00fat (nh\u01b0 Groq: 30 RPM), theo ng\u00e0y (nh\u01b0 Open-Meteo: 10.000 RPD), ho\u1eb7c theo gi\u00e2y (nh\u01b0 Telegram: ~30 msg\/s). B\u1ea1n n\u00ean \u0111\u1ecdc k\u1ef9 t\u00e0i li\u1ec7u c\u1ee7a t\u1eebng b\u00ean tr\u01b0\u1edbc khi vi\u1ebft m\u00e3 ngu\u1ed3n.<\/p>\n<\/div>\n<div style=\"border-top: 2px dashed #BFDBFE; margin-top: 50px; padding-top: 30px;\">\n<h2 style=\"color: #1e3a8a; font-size: 22px; font-weight: bold;\">L\u1eddi k\u1ebft<\/h2>\n<p style=\"text-align: justify;\">C\u00e1c g\u00f3i API mi\u1ec5n ph\u00ed mang l\u1ea1i c\u01a1 h\u1ed9i tuy\u1ec7t v\u1eddi \u0111\u1ec3 hi\u1ec7n th\u1ef1c h\u00f3a \u00fd t\u01b0\u1edfng v\u00e0 x\u00e2y d\u1ef1ng s\u1ea3n ph\u1ea9m m\u1eabu m\u00e0 kh\u00f4ng ph\u1ea3i lo v\u1ec1 chi ph\u00ed b\u1ea3n quy\u1ec1n. H\u00e3y b\u1eaft \u0111\u1ea7u t\u1eeb vi\u1ec7c ch\u1ecdn \u0111\u00fang d\u1ecbch v\u1ee5 ph\u00f9 h\u1ee3p, ki\u1ec3m th\u1eed m\u00e3 ngu\u1ed3n tr\u00ean m\u1ed9t VPS Linux tin c\u1eady, v\u00e0 chu\u1ea9n b\u1ecb s\u1eb5n l\u1ed9 tr\u00ecnh n\u00e2ng c\u1ea5p h\u1ea1 t\u1ea7ng khi \u1ee9ng d\u1ee5ng b\u1eaft \u0111\u1ea7u \u0111\u00f3n nh\u1eadn l\u01b0\u1ee3ng truy c\u1eadp l\u1edbn.<\/p>\n<\/div>\n<p style=\"text-align: justify; font-size: 13px; font-style: italic; color: #6b7280; margin-top: 30px; border-top: 1px solid #E5E7EB; padding-top: 15px;\"><em>L\u01b0u \u00fd: C\u00fa ph\u00e1p l\u1ec7nh v\u00e0 c\u00e1c th\u00f4ng s\u1ed1 k\u1ef9 thu\u1eadt c\u00f3 th\u1ec3 thay \u0111\u1ed5i t\u00f9y thu\u1ed9c v\u00e0o phi\u00ean b\u1ea3n ph\u1ea7n m\u1ec1m c\u0169ng nh\u01b0 h\u1ec7 \u0111i\u1ec1u h\u00e0nh s\u1eed d\u1ee5ng. Ch\u00ednh s\u00e1ch g\u00f3i c\u01b0\u1edbc v\u00e0 h\u1ea1n m\u1ee9c s\u1eed d\u1ee5ng (free tier) c\u1ee7a c\u00e1c d\u1ecbch v\u1ee5 b\u00ean th\u1ee9 ba c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c nh\u00e0 cung c\u1ea5p \u0111i\u1ec1u ch\u1ec9nh m\u00e0 kh\u00f4ng b\u00e1o tr\u01b0\u1edbc, do \u0111\u00f3 h\u00e3y lu\u00f4n \u0111\u1ed1i chi\u1ebfu v\u1edbi t\u00e0i li\u1ec7u ch\u00ednh th\u1ee9c tr\u01b0\u1edbc khi tri\u1ec3n khai th\u1ef1c t\u1ebf.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>API mi\u1ec5n ph\u00ed l\u00e0 c\u1ee9u c\u00e1nh gi\u00fap b\u1ea1n tho\u1ea3i m\u00e1i t\u00edch h\u1ee3p d\u1eef li\u1ec7u th\u1eddi ti\u1ebft, AI, th\u1ecb tr\u01b0\u1eddng crypto hay d\u1ecbch thu\u1eadt v\u00e0o d\u1ef1 \u00e1n m\u00e0 kh\u00f4ng lo th\u00e2m h\u1ee5t chi ph\u00ed. Tuy v\u1eady, kh\u00f4ng \u00edt d\u1ecbch v\u1ee5 g\u1eafn m\u00e1c &#8220;mi\u1ec5n ph\u00ed&#8221; nh\u01b0ng l\u1ea1i b\u00f3p rate limit qu\u00e1 ch\u1eb7t, th\u1eadm ch\u00ed b\u1eaft nh\u1eadp th\u1ebb<\/p>\n","protected":false},"author":2,"featured_media":43714,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140],"tags":[],"class_list":["post-43695","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-lap-trinh"],"_links":{"self":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/43695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/comments?post=43695"}],"version-history":[{"count":3,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/43695\/revisions"}],"predecessor-version":[{"id":43715,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/43695\/revisions\/43715"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media\/43714"}],"wp:attachment":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media?parent=43695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/categories?post=43695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/tags?post=43695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}