Content Optimization

The Content Optimization API allows you to test whether a web-page is optimized for search (with mostly an on-page focus), both before and after that page has been published. This API can be integrated directly into your CMS, E-Commerce platform or publishing workflow and used as a tool to give your team the confidence that all new content they create is well-optimized.

There are 2 methods for content optimization API supported:

  • Single Page Optimization
  • HTML Optimization

Single Page Optimization Report

This method is best suited for existing content, openly accessible on the web. Use it to test how well a given page is for a given keyword.

Request

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

Required Parameters

  • api_key — your API key
  • url — the URL of the page to test
  • geo — the country (used to select rule sets)

Optional Parameters

  • keyword — the keyword to test for content optimization

Sample Request

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

Response

The response will be a a JSON object of every content audit rule, specifically targeted at the page and keyword.

Sample Response

{
    "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://www.ginzametrics.com/blog/a-year-in-review-at-ginzametrics/",
        "original_url": "https://www.ginzametrics.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 Optimization Report

The HTML Optimization Report enables you to test whether a page is optimized, regardless of whether it has been published. This is accomplished by sending the entire HTML document to the API method and getting a self-contained report and list of recommendations.

Request

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

Required Parameters

  • api_key — your API key
  • html — the html string to test for content optimization
  • geo — the country (used to select rule sets)

Optional Parameters

  • keyword — the keyword to test for content optimization

Sample Request

curl https://app.ginzametrics.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>'

Response

The response will be a a JSON object of every content audit rule, specifically targeted at the page and keyword.

Sample Response

{
    "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
        }
    ]
}