--- title: 梗圖資料 API description: https://memes.tw/developers image: https://images-ext-1.discordapp.net/external/yRNlKBcDl4eG0X4ixUmxaldHDB67kvovA1vZ5Kgwofo/https/memes.tw/ms-icon-310x310.png tags: Public langs: zh-tw --- # 梗圖資料 API [TOC] --- ## API 說明 有多位用戶許願,希望有基本的 API 可以方便開發 Discord 機器人。 站長這邊先設計一些簡單的 API 給大家用用看,都是 JSON 格式。 以下網址可以取得今日熱門梗圖資料: [`https://memes.tw/wtf/api`](https://memes.tw/wtf/api) 格式說明如下: ```json= [ { "id": Integer, // 圖片識別 ID - 數字 "url": String, // 官方連結網址 - 字串 "src": String, // 圖片網址 - 字串 "author": { // 作者 "id": Integer, // 辨識 ID - 數字 "name": String // 名稱 - 字串 }, "title": String, // 梗圖標題 - 字串 "pageview": Integer, // 瀏覽次數 - 數字 "total_like_count": Integer, // 按讚次數 - 數字 "created_at": { // 建立時間 "timestamp": Integer, // 時間戳格式 - 數字 "date_time_string": String // 文字格式 - 字串 }, "hashtag": String, // 相關標籤 - 字串 "contest": { // 分類 "id": Integer, // 識別 ID - 數字 "name": String // 名稱 - 字串 } }, { ... } ] ``` <br> 還可以取得特定分類的梗圖資料。 以下網址舉「校園生活」分類為例: [`https://memes.tw/wtf/api?contest=11`](https://memes.tw/wtf/api?contest=11) 您可以在梗圖倉庫建立一個分類,然後在 Discord 群組,鼓勵大家前往投稿。 如此一來,您就可以開發 Discord 機器人,使用 API 取得群組用戶創作的梗圖。 --- <small>Copyright © 2022 Mango Side Project. All rights reserved.</small> {%hackmd @Luminous-Coder/dark-theme %} <!-- the theme made by Luminous-Coder --> --- ## 來源 https://memes.tw/developers