API概要

コンテンツAPI

コンテンツデータを取得するAPIについてご紹介します。

2つのメソッドTwo methods

pc

コンテンツ最適化APIは、各ウェブページが検索に最適化されているかを、ウェブページ公開前でも後でもテストすることができるAPIです。このAPIは、CMSやECプラットフォームなどに統合することが可能で、公開するコンテンツが最適化できているかをあらかじめ確認するときに役立ちます。

本APIには2種類のメソッドがあります:

  • シングルページ最適化
  • HTML最適化レポート
シングルページ最適化メソッド

このメソッドは現在ご利用いただけません

このメソッドはすでに公開されているコンテンツに適用します。特定のキーワードに対して、対象のページがどれくらい最適化されているかをチェックします。

リクエスト

  • URL: https://app.demandsphere.com/api/optimization/onpage
  • HTTP Method: GET

必須パラメータ

  • api_key — APIキー
  • url — テストしたいページのURL
  • geo — 国名(最適化のルールを選択するために使います)

任意パラメータ

  • keyword — 最適化されているか調べたいキーワードを指定します

リクエスト例

curl https://app.demandsphere.com/api/v3/optimization/onpage \
-d api_key=API_KEY \
-d url=https://ginzajp.wpengine.com/blog/a-year-in-review-at-ginzametrics \
-d geo=us \
-d keyword='ginza+metrics+review'

レスポンス例

{
    "keywords": [],
    "audit": [
        {
            "rule_name": "meta_description_tag_used",
            "rule_risk": "low",
            "rule_difficulty": "easy",
            "rule_impact": 5,
            "optimized": true
        },
        {
            "rule_name": "not_too_many_on_page_links",
            "rule_risk": "moderate",
            "rule_difficulty": "average",
            "rule_impact": 4,
            "optimized": true
        },
        {
            "rule_name": "h1_tag_is_text_only",
            "rule_risk": "low",
            "rule_difficulty": "easy",
            "rule_impact": 4,
            "optimized": true
        },
        {
            "rule_name": "only_one_h1_tag",
            "rule_risk": "low",
            "rule_difficulty": "easy",
            "rule_impact": 4,
            "optimized": true
        }
    ],
    "page_meta": {
        "url": "https://ginzajp.wpengine.com/blog/a-year-in-review-at-ginzametrics/",
        "original_url": "https://ginzajp.wpengine.com/blog/a-year-in-review-at-ginzametrics",
        "title": "A Year in Review at Ginzametrics",
        "meta_description": "CEO Ray Grieselhuber reflects on the growth and changes GinzaMetrics went through over the last twelve months and decided to share his notes with everyone.",
        "rel_author": ""
    },
    "status": {
        "http_status": "200",
        "char_set": "UTF-8"
    }
}
HTML最適化レポートメソッド

このメソッドは、各ウェブページが検索に最適化されているかを、ウェブページ公開前でも後でもテストすることができます。

リクエスト

  • URL: https://app.demandsphere.com/api/optimization/html
  • HTTP Method: GET

必須パラメータ

  • api_key — APIキー
  • html — コンテンツが最適化されているかをみるためのHTML string値
  • geo — 国名(最適化のルールを選択するために使います)

任意パラメータ

  • keyword — 最適化されているか調べたいキーワードを指定します

リクエスト例

curl https://app.demandsphere.com/api/v3/optimization/html \
-d api_key=API_KEY \
-d geo=us \
-d keyword='enterprise seo' \
-d html='<html><head><title>Enterprise SEO</title></head><body><p>seo</p></body></html>'

レスポンス例

{
    "keywords": [
        "seo"
    ],
    "audit": [
        {
            "rule_name": "meta_description_tag_used",
            "rule_risk": "low",
            "rule_difficulty": "easy",
            "rule_impact": 5,
            "optimized": false
        },
        {
            "rule_name": "title_tag_is_not_too_long",
            "rule_risk": "moderate",
            "rule_difficulty": "average",
            "rule_impact": 4,
            "optimized": true
        },
        {
            "rule_name": "one_keyword_title_tag",
            "rule_risk": "low",
            "rule_difficulty": "easy",
            "rule_impact": 5,
            "optimized": true
        },
        {
            "rule_name": "only_one_h1_tag",
            "rule_risk": "low",
            "rule_difficulty": "easy",
            "rule_impact": 4,
            "optimized": true
        }
    ]
}

DEMANDMETRICSのプランPlan

詳細な料金プランについて、以下のデモリクエストから営業チームへお問い合わせください

お問い合わせ