เอนด์พอยต์
ส่งคืนรูปภาพโดยตรง พารามิเตอร์ทั้งหมดถูกส่งเป็นอาร์กิวเมนต์สตริงคำถาม CORS เปิดอยู่ — สามารถเรียกเอนด์พอยต์ได้จากต้นทางใดก็ได้
เริ่มต้นอย่างรวดเร็ว
พารามิเตอร์
| พารามิเตอร์ | ประเภท | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|
| type required | string | — | QR code type. See supported types below. |
| format optional | svg | png | webp | png | Output image format. |
| size optional | integer | 300 | Output size in pixels (50–2000). |
| margin optional | integer | 4 | Quiet zone in modules (0–20). |
| ec optional | L | M | Q | H | M | Error correction level. Higher = more redundancy. |
| fg optional | hex | 000000 | Foreground (dot) color as 6-digit hex (no #). |
| bg optional | hex | ffffff | Background color as 6-digit hex (no #). |
| transparent optional | boolean | false | Transparent background (SVG/WebP/PNG). |
| style optional | square | dots | rounded | square | Dot style. |
ประเภท QR Code
ส่ง type= ด้วยค่าหนึ่งค่าด้านล่าง แต่ละประเภทต้องการพารามิเตอร์เนื้อหาของตัวเอง
emailอีเมลemailEmail addresssubjectEmail subject (optional)bodyEmail body (optional)phoneโทรศัพท์phonePhone number with country codesmsSMSphonePhone numbermessagePre-filled message (optional)wifiWiFissidNetwork name (SSID)passwordWiFi passwordencryptionWPA | WEP | nopasshiddentrue if network is hiddenvcardvCardnameFull name (required)orgOrganizationphonePhone numberemailEmail addressurlWebsite URLaddressStreet addresslocationตำแหน่งlatLatitudelngLongitudequerySearch query instead of coordinateswhatsappWhatsAppphonePhone number with country code (no +)messagePre-filled message (optional)telegramTelegramusernameTelegram username (without @)messagePre-filled message (optional)calendarกิจกรรมtitleEvent title (required)startStart datetime ISO 8601endEnd datetime ISO 8601locationEvent locationdescriptionEvent descriptionallDaytrue for all-day eventsyoutubeYouTubeurlYouTube video, channel, or playlist URLtwitterTwitter / XusernameTwitter/X username (without @)facebookFacebookurlFacebook page or profile URLlinkedinLinkedInurlLinkedIn profile or page URLinstagramInstagramusernameInstagram username (without @)bitcoinBitcoinaddressBitcoin address (required)amountAmount in BTC (optional)labelPayment label (optional)messagePayment message (optional)zoomZoomurlFull Zoom meeting URL (preferred)meetingIdMeeting ID (if no URL)passwordMeeting password (optional)appstoreApp StoreiosUrlApple App Store URLandroidUrlGoogle Play Store URLpaypalPayPalusernamePayPal.me usernameamountRequest amount (optional)currencyCurrency code (optional)ตัวอย่างจริง
คลิกที่ URL เพื่อเปิดในเบราว์เซอร์ของคุณและดู QR code ที่สร้าง
Simple URL QR — PNG
https://qrwing.com/api/qr?type=url&url=https://qrwing.comURL — SVG, blue, large
https://qrwing.com/api/qr?type=url&url=https://qrwing.com&format=svg&fg=1d4ed8&size=500URL — dots style, colored
https://qrwing.com/api/qr?type=url&url=https://qrwing.com&style=dots&fg=7c3aed&bg=faf5ffการตอบสนอง
เมื่อสำเร็จ API จะส่งคืนข้อมูลไบนารีของรูปภาพพร้อมหัวข้อ Content-Type ที่เหมาะสม:
| รูปแบบ | ชนิดเนื้อหา |
|---|---|
| png | image/png |
| svg | image/svg+xml |
| webp | image/webp |
เมื่อเกิดข้อผิดพลาด API จะส่งคืน JSON พร้อมสถานะ 400 หรือ 500:
การแคชและขีดจำกัดอัตรา
การตอบสนองรวม Cache-Control: public, max-age=86400 ดังนั้นรูปภาพจะถูกแคชเป็นเวลา 24 ชั่วโมงโดยเบราว์เซอร์และ CDN
API ฟรีและไม่ต้องมีการรับรองตัวตน เราขอให้คุณหลีกเลี่ยงการขอข้อมูลอัตโนมัติมากเกินไป สำหรับการสร้างจำนวนมาก (>1,000 QR codes/วัน) โปรด ติดต่อเรา
