HELP CENTER

How to check internal linking with On-Page API? How to find pages receiving too many/too few internal links?

Well-thought internal linking of a website is crucial for helping search engine bots understand the structure of a site and index its pages faster. Using internal links wisely, you can ensure an efficient flow of trust signals across important website pages, and increase their ranking potential accordingly. Last but not least, leveraging internal linking, you can provide a better user experience, help website visitors discover additional relevant content, and even guide them closer to conversion or purchase.

However, if a site has pages receiving too many internal links, such pages may confuse search engine bots about the site structure or even seem spammy. As for pages with too low inbound links count, they may be seen as unimportant and be devalued when it comes to determining ranking positions.

As you understand, internal links are indeed important, and it’s no less important to check on them regularly. This should help to timely spot any unexpected issues with website structure, and prevent loss of ranking positions and conversions as a result.

DataForSEO On-Page API provides a number of check-ups related to internal linking that will help you to perform quick website health audits. In particular, using the Pages endpoint, you can easily review the following checks:

  • internal_links_count – number of internal links placed on the page
  • inbound_links_count – number of internal links pointing at the page
  • is_orphan_page – if true, the page has no internal links pointing at it
  • is_link_relation_conflict – if true, the page receives at least one link with the rel=”nofollow” attribute and at least one dofollow link
  • has_links_to_redirects – page is pointing to a page that redirect elsewhere
  • recursive_canonical – if true, the page contains rel=”canonical” tag to another page, which in turn, refers back to the initial page
  • canonical_chain – pages with canonical pointing to a page that also has a canonical and it’s pointing elsewhere
  • canonical_to_redirect – canonical page pointing to a page that redirects elsewhere
  • canonical_to_broken – canonical page pointing to a broken page

How to retrieve a list of pages with too few internal links pointing at them?

Remember to register and get your API key that should be used for authentication.
Learn more about Authentication in our docs >>

1 At square one, set a task to the On-Page API.

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

2 Next, you can call the Summary endpoint if you want to review the overall data for the specified website. To simply obtain the list of necessary pages, you may skip this step and proceed to step 3.

3 Configure your request to the Pages endpoint with a filter as in the example below.

[
  {
    "id": "07281559-0695-0216-0000-c269be8b7592",
    "filters": [
      ["resource_type", "=", "html"],
      "and",
      ["checks.inbound_links_count", "<", 5]
    ]
  }
]

If you wish to extract pages with too many internal links, simply change the filter as in the following example: ["checks.inbound_links_count", ">", 99].

Similarly, you can change the configuration of your request to extract pages matching specific rules related to internal linking or any other on-page checks.

The response of the Pages endpoint will provide you with a list of requested pages and detailed technical performance metrics for each page.

If you want to dig deeper and get a list of referring internal URLs for a specific page or by a specific path, you can do so using the Links endpoint. To receive dofollow referring links for one page, specify its relative URL in the page_to field when setting a task.

[
  {
    "id": "07281559-0695-0216-0000-c269be8b7592",
    "page_to": "/apis/google-trends-api",
    "filters": [
      ["dofollow", "=", true],
      "and",
      ["direction", "=", "internal"]
    ],
    "limit": 10
  }
]

To get pages pointing to URLs located by a certain path, e.g. /blog/, indicate the path using a filter. For example: "filters":[["direction","=","internal"],"and",["page_to","like","%blog%"]].

Check out our documentation to learn more about the data you can get with On-Page API.

Embed DataForSeo widget on your website


Embed code:
Preview: