SymbolFYI

เอกสาร API

API สัญลักษณ์ Unicode ฟรี ไม่ต้องการการยืนยันตัวตน การตอบสนองแบบ JSON

ฟรี ไม่ต้องการการยืนยันตัวตน JSON OpenAPI ↗

URL พื้นฐาน

https://symbolfyi.com/api/
GET

รายละเอียดสัญลักษณ์

รับข้อมูลครบถ้วนเกี่ยวกับสัญลักษณ์ รวมถึงคุณสมบัติ Unicode และการแสดงผลการเข้ารหัสทั้งหมด

/api/symbol/{slug}/

พารามิเตอร์

slug สลักสัญลักษณ์ (เช่น: black-heart-suit)

ตัวอย่าง

curl https://symbolfyi.com/api/symbol/black-heart-suit/
{
  "character": "♥",
  "name": "Black Heart Suit",
  "codepoint": "U+2665",
  "slug": "black-heart-suit",
  "category": "Card Suits",
  "block": "Miscellaneous Symbols",
  "script": "Common",
  "general_category": "So",
  "keywords": "heart, love, card, suit",
  "encodings": {
    "unicode": "U+2665",
    "html_decimal": "♥",
    "html_hex": "♥",
    "html_entity": "♥",
    "css": "\\2665",
    "javascript": "\\u2665",
    "python": "\\u2665",
    "java": "\\u2665",
    "utf8_bytes": "E2 99 A5",
    "utf16_bytes": "26 65",
    "url_encoded": "%E2%99%A5"
  },
  "url": "/symbol/black-heart-suit/"
}
GET

ค้นหาสัญลักษณ์

ค้นหาสัญลักษณ์ตามชื่อ คีย์เวิร์ด ชื่อแทน หรือ HTML entity ยังรับอักขระเดี่ยวสำหรับการค้นหาที่แม่นยำ

/api/search/?q={query}

พารามิเตอร์

q คำค้นหา (ชื่อ คีย์เวิร์ด หรืออักขระ)

ตัวอย่าง

curl "https://symbolfyi.com/api/search/?q=arrow"
{
  "results": [
    {"character": "→", "name": "Rightwards Arrow", "slug": "rightwards-arrow", "codepoint": "U+2192", "category": "Arrows", "url": "/symbol/rightwards-arrow/"},
    {"character": "←", "name": "Leftwards Arrow", "slug": "leftwards-arrow", "codepoint": "U+2190", "category": "Arrows", "url": "/symbol/leftwards-arrow/"},
    {"character": "↑", "name": "Upwards Arrow", "slug": "upwards-arrow", "codepoint": "U+2191", "category": "Arrows", "url": "/symbol/upwards-arrow/"}
  ]
}
GET

สัญลักษณ์หมวดหมู่

รับสัญลักษณ์ทั้งหมดในหมวดหมู่ (สูงสุด 200 รายการ)

/api/category/{slug}/

พารามิเตอร์

slug สลักหมวดหมู่ (เช่น: arrows, currency, mathematical)

ตัวอย่าง

curl https://symbolfyi.com/api/category/currency/
{
  "category": {"name": "Currency", "slug": "currency", "icon": "$"},
  "symbols": [
    {"character": "$", "name": "Dollar Sign", "slug": "dollar-sign", "codepoint": "U+0024", "url": "/symbol/dollar-sign/"},
    {"character": "€", "name": "Euro Sign", "slug": "euro-sign", "codepoint": "U+20AC", "url": "/symbol/euro-sign/"},
    {"character": "£", "name": "Pound Sign", "slug": "pound-sign", "codepoint": "U+00A3", "url": "/symbol/pound-sign/"}
  ]
}
GET

เข้ารหัสอักขระ

รับข้อมูล Unicode และการแสดงผลการเข้ารหัสทั้งหมดสำหรับอักขระใดก็ได้ ใช้งานได้กับอักขระ Unicode ใดก็ได้ ไม่จำกัดเฉพาะสัญลักษณ์ที่คัดสรร

/api/encode/?char={character}

พารามิเตอร์

char อักขระ Unicode ใดก็ได้ (ใช้อักขระตัวแรกหากมีหลายตัว)

ตัวอย่าง

curl "https://symbolfyi.com/api/encode/?char=★"
{
  "character": "★",
  "name": "BLACK STAR",
  "codepoint": "U+2605",
  "category": "So",
  "category_name": "Symbol, other",
  "block": "Miscellaneous Symbols",
  "script": "Common",
  "encodings": {
    "unicode": "U+2605",
    "html_decimal": "★",
    "html_hex": "★",
    "html_entity": "",
    "css": "\\2605",
    "javascript": "\\u2605",
    "python": "\\u2605",
    "java": "\\u2605",
    "utf8_bytes": "E2 98 85",
    "utf16_bytes": "26 05",
    "url_encoded": "%E2%98%85"
  }
}

หมายเหตุการใช้งาน

  • ใช้งานฟรีเพื่อวัตถุประสงค์ใดก็ได้
  • ไม่ต้องใช้ API key หรือการยืนยันตัวตน
  • เปิดใช้งาน CORS สำหรับคำขอจากเบราว์เซอร์
  • ข้อมูลจำเพาะ OpenAPI 3.1 มีให้ที่ /api/openapi.json
  • กรุณาใช้อัตราคำขออย่างสมเหตุสมผล