APIリファレンス

ロゴ画像API APIリファレンス

あらゆるドメインの企業ロゴを、埋め込み、キャッシュ、保存ができるPNG画像として取得できます。 このリファレンスで、最適なエンドポイントを選び、返される内容を正確に確認できます。

操作

GET /v1/logo/:domain APIリファレンスを見る

GET /v1/logo/:domain

操作: getLogoImage クレジットと認証: 1 認証が必要
GET /v1/logo/:domain クレジット: 1

クエリパラメータ

パラメータ タイプ 必須
domain string 必須
size integer
デフォルト 128
オプション
retina boolean
デフォルト false
オプション
greyscale boolean
デフォルト false
オプション
theme string
許可された値 lightdark
オプション
fallback string
許可された値 404monogram
デフォルト 404
オプション
format string
許可された値 png
デフォルト png
オプション
variant string
許可された値 squarewide
デフォルト square
オプション
v string オプション
token string オプション

レスポンスフィールド

フィールド タイプ
body image/png
X-Credits-Charged string
X-Credits-Remaining string
X-RateLimit-Limit string
X-RateLimit-Remaining string
X-RateLimit-Reset string
Cache-Control string
ETag string
Last-Modified string
X-Logo-Status string
X-Logo-Source string
X-Logo-Verification string
X-Logo-Source-Format string
X-Logo-Native-Size string
X-Logo-Theme-Adjusted string
X-Logo-Variant string
X-Logo-Lookup string
X-Cache string
Cloudflare-CDN-Cache-Control string
X-Cache-Age string

リクエスト例

curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/logo/example.com?size=128&retina=false&greyscale=false&theme=light&fallback=404&format=png&variant=square&v=example&token=example"
const response = await fetch("https://domscan.net/v1/logo/example.com?size=128&retina=false&greyscale=false&theme=light&fallback=404&format=png&variant=square&v=example&token=example", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
import os
import requests

response = requests.get(
    "https://domscan.net/v1/logo/example.com?size=128&retina=false&greyscale=false&theme=light&fallback=404&format=png&variant=square&v=example&token=example",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/logo/example.com?size=128&retina=false&greyscale=false&theme=light&fallback=404&format=png&variant=square&v=example&token=example", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/logo/example.com?size=128&retina=false&greyscale=false&theme=light&fallback=404&format=png&variant=square&v=example&token=example")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))

レスポンス例

HTTP/2 200
content-type: image/png
x-credits-charged: ...
x-credits-remaining: ...
x-ratelimit-limit: ...
x-ratelimit-remaining: ...
x-ratelimit-reset: ...
cache-control: ...
etag: ...
last-modified: ...
x-logo-status: found
x-logo-source: bimi
x-logo-verification: decoded
x-logo-source-format: ...
x-logo-native-size: ...
x-logo-theme-adjusted: tile
x-logo-variant: wide
x-logo-lookup: ...
x-cache: HIT
cloudflare-cdn-cache-control: ...
x-cache-age: ...

HTTP ステータスコード

  • 200 成功
  • 304 HTTP 304
  • 400 不正なリクエスト
  • 401 未認証
  • 402 支払いが必要
  • 403 禁止
  • 404 見つかりません
  • 429 リクエスト過多

リファレンスリソース