Featured image for OnPage API: Duplicate Content changes

We are going to change the structure of the Duplicate Content endpoint.

In particular, the changes will affect the page array.

Currently, it has the following structure:

{
  "crawl_progress": "in_progress",
  "items_count": 1,
  "items": [
    {
      "url": "https://dataforseo.com/solutions/seo-software",
      "total_count": 1,
      "pages": [
        {
          "similarity": 7,
          "page": {
            "resource_type": "html",
            "status_code": 200,
            "location": null,
            "url": "https://dataforseo.com/solutions/marketing-tech-apis"

As you can see above, the page is returned as an object.

From March 3, we will start returning this value as an array that can include multiple objects, like this:

{
  "crawl_progress": "in_progress",
  "items_count": 1,
  "items": [
    {
      "url": "https://dataforseo.com/solutions/seo-software",
      "total_count": 1,
      "pages": [
        {
          "similarity": 7,
          "page": [
            {
              "resource_type": "html",
              "status_code": 200,
              "location": null,
              "url": "https://dataforseo.com/solutions/marketing-tech-apis"

So, depending on the response of OnPage API Duplicate Content, the page array might include multiple objects.

Make sure your script will handle it properly.

The update will be rolled out on March 3, 2021.