Site icon DataForSEO

How to use custom mode in Backlinks API?

The Backlinks endpoint provides you with a list of unique backlinks from the referring pages for the specified domain, subdomain, or webpage.

To get the most relevant data you can group the result by adding the "mode" field. There are three possible grouping types:

Example: "mode": "as_is"

In the API response, you will get all backlinks for the specified domain.

However, one_per_domain or one_per_anchor parameters return only one backlink per domain or per anchor accordingly. If you want to get more, you will need to make numerous requests, which can be a pricy solution. For this purpose, we added a custom_mode that allows specifying the number of returned backlinks with a particular parameter.

The custom_mode object contains two parameters:

1field – target field of referring pages. Possible values for the field:

2value – the number of backlinks you want to get for the specified field. Can be set from 1 to 1000.

Example: "custom_mode": { "field": "domain_from", "value": 100 }

In addition, you can get X backlinks per domain with a particular item_type or anchor by adding filters to your request. Consider the following example:

[
  {
    "target": "forbes.com",
    "custom_mode": {
      "field": "domain_from",
      "value": 100
    },
    "filters": [
      "anchor",
      "like",
      "%forbes%"
    ],
    "order_by": [
      "domain_from,desc"
    ],
    "limit": 5
  }
]

 

{
  "version": "0.1.20221214",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.0549 sec.",
  "cost": 0.02015,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "03281835-1535-0269-0000-d857d95c335e",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0188 sec.",
      "cost": 0.02015,
      "result_count": 1,
      "path": [
        "v3",
        "backlinks",
        "backlinks",
        "live"
      ],
      "data": {
        "api": "backlinks",
        "function": "backlinks",
        "target": "forbes.com",
        "custom_mode": {
          "field": "domain_from",
          "value": 100
        },
        "filters": [
          "anchor",
          "like",
          "%forbes%"
        ],
        "order_by": [
          "domain_from,desc"
        ],
        "limit": 5
      },
      "result": [
        {
          "target": "forbes.com",
          "mode": null,
          "custom_mode": {
            "field": "domain_from",
            "value": 100
          },
          "total_count": 993857,
          "items_count": 5,
          "items": [
            {
              "type": "backlink",
              "domain_from": "tagalife.org.zw",
              "url_from": "https://tagalife.org.zw/resources/relevant-material/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/faraigundan/2014/10/11/global-women-leaders-celebrate-and-reflect-on-the-united-nations-international-day-of-the-girl-child/",
              "url_to_https": true,
              "tld_from": "org.zw",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 23,
              "page_from_rank": 0,
              "domain_from_rank": 27,
              "domain_from_platform_type": [
                "cms",
                "blogs"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "196.29.35.79",
              "domain_from_country": "ZW",
              "page_from_external_links": 6,
              "page_from_internal_links": 60,
              "page_from_size": 38802,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Relevant Material | Tag a Life International",
              "page_from_status_code": 200,
              "first_seen": "2022-01-27 20:18:57 +00:00",
              "prev_seen": "2022-07-12 04:18:30 +00:00",
              "last_seen": "2023-01-21 03:25:46 +00:00",
              "item_type": "anchor",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": null,
              "anchor": "https://www.forbes.com/sites/faraigundan/2014/10/11/global-women-leaders-celebrate-and-reflect-on-the-united-nations-international-day-of-the-girl-child/#477b614e19b6",
              "text_pre": null,
              "text_post": "http://kwayedza.co.zw/fembera-fembera-tione-43/ https://www.dailynews.co.zw/articles/2015/11/15/songstress-fights-for-women-girls-rights https://www.thestandard.co.zw/2015/08/09/nyari-mashayamombe-singer-girl-child-act",
              "semantic_location": "article",
              "links_count": 1,
              "group_count": 3,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null
            },
            {
              "type": "backlink",
              "domain_from": "tagalife.org.zw",
              "url_from": "http://tagalife.org.zw/resources/relevant-material/",
              "url_from_https": false,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/faraigundan/2014/10/11/global-women-leaders-celebrate-and-reflect-on-the-united-nations-international-day-of-the-girl-child/",
              "url_to_https": true,
              "tld_from": "org.zw",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 20,
              "rank": 23,
              "page_from_rank": 0,
              "domain_from_rank": 27,
              "domain_from_platform_type": [
                "cms",
                "blogs"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "196.29.35.79",
              "domain_from_country": "ZW",
              "page_from_external_links": 6,
              "page_from_internal_links": 60,
              "page_from_size": 38709,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Relevant Material | Tag a Life International",
              "page_from_status_code": 200,
              "first_seen": "2022-01-27 20:07:32 +00:00",
              "prev_seen": "2022-07-23 16:17:17 +00:00",
              "last_seen": "2023-01-21 03:13:36 +00:00",
              "item_type": "anchor",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": null,
              "anchor": "https://www.forbes.com/sites/faraigundan/2014/10/11/global-women-leaders-celebrate-and-reflect-on-the-united-nations-international-day-of-the-girl-child/#477b614e19b6",
              "text_pre": null,
              "text_post": "http://kwayedza.co.zw/fembera-fembera-tione-43/ https://www.dailynews.co.zw/articles/2015/11/15/songstress-fights-for-women-girls-rights https://www.thestandard.co.zw/2015/08/09/nyari-mashayamombe-singer-girl-child-act",
              "semantic_location": "article",
              "links_count": 1,
              "group_count": 3,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null
            },
            {
              "type": "backlink",
              "domain_from": "tagalife.org.zw",
              "url_from": "http://tagalife.org.zw/resources/relevant-material/",
              "url_from_https": false,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/faraigundan/2014/10/11/global-women-leaders-celebrate-and-reflect-on-the-united-nations-international-day-of-the-girl-child/",
              "url_to_https": true,
              "tld_from": "org.zw",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 2,
              "page_from_rank": 0,
              "domain_from_rank": 42,
              "domain_from_platform_type": [
                "unknown"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "196.29.35.79",
              "domain_from_country": null,
              "page_from_external_links": 10,
              "page_from_internal_links": 55,
              "page_from_size": 70704,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "Relevant Material – Tag a Life International",
              "page_from_status_code": 200,
              "first_seen": "2022-01-27 20:07:32 +00:00",
              "prev_seen": "2022-07-12 04:13:10 +00:00",
              "last_seen": "2022-07-23 16:17:17 +00:00",
              "item_type": "anchor",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": null,
              "anchor": "https://www.forbes.com/sites/faraigundan/2014/10/11/global-women-leaders-celebrate-and-reflect-on-the-united-nations-international-day-of-the-girl-child/#477b614e19b6",
              "text_pre": null,
              "text_post": null,
              "semantic_location": "main",
              "links_count": 1,
              "group_count": 3,
              "is_broken": false,
              "url_to_status_code": 200,
              "url_to_spam_score": 0,
              "url_to_redirect_target": null
            },
            {
              "type": "backlink",
              "domain_from": "zimbuzz.co.zw",
              "url_from": "https://zimbuzz.co.zw/2016/02/02/15th-nama-nominees-out/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "https://www.forbes.com/sites/willburns/2012/02/16/the-act-of-creativity-in-marketing-has-moved-upstream-leaving-the-media-plan-all-wet/",
              "url_to_https": true,
              "tld_from": "co.zw",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 0,
              "rank": 0,
              "page_from_rank": 0,
              "domain_from_rank": 235,
              "domain_from_platform_type": [
                "unknown"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "35.209.191.122",
              "domain_from_country": null,
              "page_from_external_links": 3320,
              "page_from_internal_links": 24,
              "page_from_size": 3163009,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "15th NAMA nominees out - ZIMBUZZ",
              "page_from_status_code": 200,
              "first_seen": "2021-10-02 18:14:08 +00:00",
              "prev_seen": "2022-04-15 14:29:39 +00:00",
              "last_seen": "2022-04-27 07:26:52 +00:00",
              "item_type": "anchor",
              "attributes": [
                "external",
                "nofollow",
                "ugc"
              ],
              "dofollow": false,
              "original": false,
              "alt": null,
              "anchor": "forbes.com",
              "text_pre": null,
              "text_post": null,
              "semantic_location": "footer",
              "links_count": 1,
              "group_count": 1,
              "is_broken": false,
              "url_to_status_code": null,
              "url_to_spam_score": null,
              "url_to_redirect_target": null
            },
            {
              "type": "backlink",
              "domain_from": "www.velocitybroadband.co.zw",
              "url_from": "https://www.velocitybroadband.co.zw/the-future-of-the-internet/",
              "url_from_https": true,
              "domain_to": "www.forbes.com",
              "url_to": "http://www.forbes.com/",
              "url_to_https": false,
              "tld_from": "co.zw",
              "is_new": false,
              "is_lost": false,
              "backlink_spam_score": 20,
              "rank": 15,
              "page_from_rank": 0,
              "domain_from_rank": 287,
              "domain_from_platform_type": [
                "cms",
                "blogs",
                "organization"
              ],
              "domain_from_is_ip": false,
              "domain_from_ip": "41.191.232.22",
              "domain_from_country": "ZW",
              "page_from_external_links": 7,
              "page_from_internal_links": 26,
              "page_from_size": 55051,
              "page_from_encoding": "utf-8",
              "page_from_language": "en",
              "page_from_title": "The Future of the Internet | Velocity Broadband",
              "page_from_status_code": 200,
              "first_seen": "2019-02-22 10:25:48 +00:00",
              "prev_seen": "2022-11-20 05:32:14 +00:00",
              "last_seen": "2022-12-11 08:40:21 +00:00",
              "item_type": "anchor",
              "attributes": null,
              "dofollow": true,
              "original": false,
              "alt": null,
              "anchor": "forbes.com",
              "text_pre": "Extracts from",
              "text_post": ". To be continued…………..",
              "semantic_location": "article",
              "links_count": 1,
              "group_count": 4,
              "is_broken": false,
              "url_to_status_code": 301,
              "url_to_spam_score": 0,
              "url_to_redirect_target": "https://www.forbes.com/"
            }
          ],
          "search_after_token": "eyJDdXJyZW50T2Zmc2V0IjowLCJSYXdSZXF1ZXN0Ijp7InRhcmdldCI6ImZvcmJlcy5jb20iLCJxdWVyeSI6eyJmaWVsZCI6ImFuY2hvciIsInR5cGUiOiJsaWtlIiwidmFsdWUiOiIlZm9yYmVzJSJ9LCJvcmRlcl9ieSI6eyJvcmRlcl9maWVsZCI6ImRvbWFpbl9mcm9tIiwib3JkZXJfdHlwZSI6ImRlc2MifSwibGltaXQiOjUsImJhY2tsaW5rc19zdGF0dXNfdHlwZSI6ImxpdmUiLCJpbmNsdWRlX3N1YmRvbWFpbnMiOnRydWUsImV4dGVuZGVkX21vZGUiOnsiZmllbGQiOiJkb21haW5fZnJvbSIsImxpbWl0X3Blcl9maWVsZCI6MTAwfSwiYWlkIjoxNTM1fSwiU2VhcmNoQWZ0ZXJEYXRhIjp7IlZlcnNpb24iOjEsIlNlYXJjaEFmdGVyVmFsdWVzIjp7ImRvbWFpbl9mcm9tIjoiencuY28udmVsb2NpdHlicm9hZGJhbmQud3d3LiIsImxhc3Rfc2VlbiI6IjIwMjItMTItMTFUMDg6NDA6MjErMDA6MDAifSwiVG9rZW5SZWFsT2Zmc2V0Ijo1fX0="
        }
      ]
    }
  ]
}

 

Exit mobile version