MIXEDER For Developers
MixederCloud MIXEDERGrapesFilesLogin to console
MixederCloud Docs
MixederCloud Docs
  • 👋MIXEDER For Developersへようこそ!
  • まずはここから!
    • StartFromBeginner
  • 🍇GrapeAPI
    • GrapesAPIについて
    • GrapesAPIs 利用規約
    • APIリファレンス
      • GrapeQRAPI リファレンス
      • GrapeFaviconAPI リファレンス
      • GrapeAvaterAPI リファレンス
        • GrapesAPI サンプルコード
      • GrapesAPI(個人向け) リファレンス
    • Swagger
  • Conversion API
    • Conversion APIとは?
    • APIドキュメント
      • SVG Via PNG API
      • PNG Via HEIC API
      • HTML to PDF API
  • 🌍MixederPublicAPIs
    • MixederPublicAPIについて
    • サンプルコードを利用する前に
    • APIリファレンス
      • WhoisAPI
        • WhoisAPI TLDリスト
      • ConvertAPI
      • TimeZoneAPI
      • WEBFetchAPI
      • NETRecordAPI
      • WebInfoAPI
      • ImageConvertAPI
      • Profanity Detection and Cleaning API
      • Similarity Determination API
      • API利用料金
      • JSON Scalable Database (JSDB) API
        • ログイン・サインインシステムのサンプル
        • シンプルなメモ帳のサンプル
        • JSDB V1とV2の相違点
      • JSON Database API V2
        • JSONDB Login System (Node.js)
        • JSONDB管理アプリの紹介
      • EventFront MAIL API ドキュメント
  • 🐣TinytoolsAPI
    • TINYTOOLSAPIについて
    • TINYTOOLSAPI for Enterpriceについて(英語)
  • Product Guides
    • 📪How to configure MTM(Mixeder Traffic Manager) with MixederWaterStorage
      • VMC Machine specs per plan
    • MIXEDER ISSHとは?
    • 🖥️開発者向けAPIの公開について
    • 📎MixederIAM(Permissions)
  • MixederCloudのサービス料金・お支払サイクルについて
  • MixederCloudでウェブサイトを作成しよう
    • 🏋️MixederCloudでウェブサイトを作成しよう
GitBook提供
このページ内
  • API概要
  • エンドポイント
  • リクエストパラメータ
  • レスポンス例
  • 使用例

役に立ちましたか?

  1. GrapeAPI
  2. APIリファレンス

GrapeFaviconAPI リファレンス

GrapeFaviconAPI リファレンス

任意のドメインから簡単にファビコンを取得


API概要

GrapeFaviconAPI を使用すると、指定されたドメインのファビコンをURL形式、または画像ファイルとして取得できます。


エンドポイント

メソッド

エンドポイント

説明

GET

/api-fav/output.png

指定されたドメインからファビコンを取得します。


リクエストパラメータ

パラメータ

型

必須

説明

domain

string

Yes

ファビコンを取得する対象のドメイン (例: example.com)

type

string

No

'image' を指定すると、ファビコン画像が直接返されます。


レスポンス例

{
  "icons": [
    "http://example.com/favicon.ico",
    "http://example.com/apple-touch-icon.png"
  ]
}

使用例

Python

import requests

response = requests.get('https://grape.mixeder.net/api-fav/output.png', params={'domain': 'example.com'})
print(response.json())

PHP

<?php
$response = file_get_contents('https://grape.mixeder.net/api-fav/output.png?domain=example.com');
print_r(json_decode($response, true));
?>

cURL

curl -X GET "https://grape.mixeder.net/api-fav/output.png?domain=example.com"

Node.js

const https = require('https');

https.get('https://grape.mixeder.net/api-fav/output.png?domain=example.com', (res) => {
  let data = '';
  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('end', () => {
    console.log(JSON.parse(data));
  });
}).on('error', (err) => {
  console.error('エラー:', err);
});

Go

package main

import (
    "encoding/json"
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
)

func main() {
    resp, err := http.Get("https://grape.mixeder.net/api-fav/output.png?domain=example.com")
    if err != nil {
        log.Fatalln(err)
    }
    defer resp.Body.Close()

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        log.Fatalln(err)
    }

    var result map[string]interface{}
    if err := json.Unmarshal(body, &result); err != nil {
        log.Fatalln(err)
    }

    fmt.Println(result)
}

Ruby

require 'net/http'
require 'json'

uri = URI('https://grape.mixeder.net/api-fav/output.png?domain=example.com')
response = Net::HTTP.get(uri)

data = JSON.parse(response)
puts data

これらのコードを使用することで、指定されたドメインのファビコンを簡単に取得できます。 ファビコンを画像として取得する場合は、type=image をリクエストに追加してください。

前へGrapeQRAPI リファレンス次へGrapeAvaterAPI リファレンス

最終更新 7 か月前

役に立ちましたか?

🍇