Site icon DataForSEO

How to check missing title and description tags?

The title tag is making it easier for search engines and users to understand your content’s topic. Accordingly, a missing title tag may have a negative impact on your search rankings and organic CTR for the related page.

A meta description tag similarly serves as a short summary of what your page is about. It may be used as a search result snippet by search engines. Besides that, if your page doesn’t have “og:description” or “twitter:description” tags, the content of the meta description may be used instead when people share your page on social media.

With DataForSEO On-Page API, you can find pages with the missing title and/or description tags quickly and easily. First off, register and use your API credentials for authentication.

Learn more about Authentication in our docs >>

Next, follow these steps.

1 Set a task to On-Page API. POST: https://api.dataforseo.com/v3/on_page/task_post

[
  {
    "target": "dataforseo.com",
    "max_crawl_pages": 10,
    "tag": "some_string_123",
    "pingback_url": "https://your-server.com/pingscript?id=$id&tag=$tag"
  }
]

2 Use the task’s ID from the response to request the Summary endpoint with a GET:

https://api.dataforseo.com/v3/on_page/summary/$id

Find the "checks" array and look at the "no_title" and "no_description" counters. If they show a value greater than 0, our crawler found the indicated number of pages with missing title and/or description tags respectively.

3 Use the Pages endpoint to extract the list of pages with no title and/or description tags. Note that you should apply a filter as in the example below.

POST: https://api.dataforseo.com/v3/on_page/pages

[
  {
    "id": "07281559-0695-0216-0000-c269be8b7592",
    "filters": [
      [
        "resource_type",
        "=",
        "html"
      ],
      "and",
      [
        [
          "checks.no_description",
          "=",
          "true"
        ],
        "or",
        [
          "checks.no_title",
          "=",
          "true"
        ]
      ]
    ]
  }
]

In the results, you will find a list of pages with missing title and/or description tags. Each returned page will be provided with multiple on-page check-ups and other metrics related to page performance. You’ll see the page URLs in the "url" fields, and you can also review the present social media tags if any in the "social_media_tags" array.

Exit mobile version