We stand with our families and colleagues in Ukraine. Help Ukraine win

PlagiarismCheck.org API

Introducción

Este documento proporciona toda la información necesaria que necesita para verificar textos en busca de plagio en su aplicación.

Puede visitar nuestro perfil de GitHub para encontrar más ejemplos.

Hay 2 tipos de APIs en PlagiarismCheck. El primer API es para clientes que usarán el API como usuarios individuales. El segundo API es para organizaciones que incluyen muchos usuarios.

Ambos tipos de APIs utilizan un token de API para autorización, por lo que deberá comunicarse con su administrador o el equipo de soporte para recibir el token de API primero.

Aquí hay un repositorio en GitHub con ejemplos, tanto para APIs individuales como para organizaciones.

También puede consultar una página Swagger con la especificación del API.

Usuario individualUsuarios múltiples

Secuencia

Para verificar un texto en busca de plagio en su aplicación, DEBE:

  1. Recibir un token de API de autorización.
  2. Enviar el texto utilizando el método de API y recibir un número de identificación del texto.
  3. Esperar hasta que verifiquemos el texto.
  4. Verificar el estado del texto utilizando el ID del paso 2 y el método de API. Si el texto no se ha verificado, vaya al paso 3 con un tiempo de espera.
  5. Recibir un informe utilizando el ID del texto del paso 2 y el método de API.
  6. Renderizar el informe JSON en su aplicación.

Autorización

Para la autorización, DEBE tener una cuenta registrada en PlagiarismCheck.org y un token de API especial de nuestro equipo de soporte.

Para recibir un token de API, debe ponerse en contacto con nuestro soporte. También puede iniciar sesión y copiar el token de API actual a continuación.

El API devuelve 401 no autorizado si proporciona un token no válido. DEBE enviar su token en el encabezado con el nombre X-API-TOKEN.

Ejemplo de un encabezado HTTP:

X-API-TOKEN: vsMKX3179tjK3CqvhE228IDeMV-eBBER

Donde vsMKX3179tjK3CqvhE228IDeMV-eBBER es un ejemplo del token de API.

Enviar la solicitud

La solicitud tiene parámetros:

  • language - idioma del texto. En este momento, solo admitimos un valor: en.
  • text - contenido del texto que desea verificar. NO DEBE ser más corto de 80 caracteres.

La Solicitud:

curl "https://plagiarismcheck.org/api/v1/text"  \
 --request POST \
 --header  "X-API-TOKEN: cUwhcQU88K2cYn47aPCg-snWoSNNJwyW" \
 --data    "language=en" \
 --data    "text=an application programming interface (API) is a set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer. An API may be for a web-based system, operating system, database system, computer hardware or software library. An API specification can take many forms, but often includes specifications for routines, data structures, object classes, variables or remote calls. POSIX, Microsoft Windows API, the C++ Standard Template Library and Java APIs are examples of different forms of APIs. Documentation for the API is usually provided to facilitate usage"

La Respuesta:

{
  "success": true,
  "data": {
    "text": {
      "id": 2,
      "filename": "an_application",
      "created_at": "1516279363000",
      "updated_at": "1516279364000",
      "submitted_at": "1516279364000",
      "is_deleted": false,
      "deleted_at": null,
      "state": 3,
      "language": "en",
      "pages": 1,
      "group_id": null,
      "user_id": 9,
      "report_id": null
    },
    "charged": 0,
    "bonus_charged": 1
  }
}
            

Verificar el estado

Este método recibe un ID del texto y devuelve información detallada sobre el texto. Aquí hay una tabla con estados:

IDNombreDescripción
2STATE_STOREDEl texto ha sido almacenado y está esperando ser verificado.
3STATE_SUBMITTEDEl texto ha sido almacenado y está esperando ser verificado.
4STATE_FAILEDEl texto no ha sido verificado. Ocurrió un error.
5STATE_CHECKEDEl texto ha sido verificado con éxito y puede recibir el informe.

En el ejemplo: "2" es el ID del texto

Solicitud:

curl "https://plagiarismcheck.org/api/v1/text/2"  \
-X GET \
-H "X-API-TOKEN: cUwhcQU88K2cYn47aPCg-snWoSNNJwyW"

Respuesta:

{
  "data": {
    "id": 2,
    "filename": "an_application",
    "created_at": "1516279363000",
    "updated_at": "1516279369000",
    "submitted_at": "1516279364000",
    "is_deleted": false,
    "deleted_at": null,
    "state": 5,
    "language": "en",
    "pages": 1,
    "group_id": null,
    "creator": {
      "id": 9,
      "name": "Test",
      "email": "test@example.com",
      "created_at": "1516279118000",
      "updated_at": "1516279118000",
      "is_blocked": false,
      "allowed_languages": [
        "en"
      ],
      "balance": {
        "balance": 0,
        "bonus": 596,
        "hold": 0,
        "hold_bonus": 0
      },
      "avatar": null
    },
    "report": {
      "id": 1,
      "created_at": "1516279369000",
      "source_count": 0,
      "percent": "0.00"
    }
  }
}

Obtenga el informe

Este método recibe una identificación del texto y devuelve un informe detallado. El texto DEBE tener el estado 5 (STATE_CHECKED). El informe contiene nodos, fuentes y otra información. Cada nodo tiene texto, una posición inicial, una posición final y las fuentes donde se encontró el texto. Cada fuente tiene: tipo de contenido, porcentaje de plagio y una URL. En el ejemplo "2" es el ID del texto.

Solicitud:

curl "https://plagiarismcheck.org/api/v1/text/report/2"  \
-X GET \
-H "X-API-TOKEN: cUwhcQU88K2cYn47aPCg-snWoSNNJwyW" 

Respuesta:

{
  "data": {
    "report": {
      "id": 14,
      "created_at": "1513617036000",
      "source_count": 3,
      "percent": "100.00",  //percent of plagiarism
      "text_id": 14 // ID of check
    },
    "report_data": {
      "version": "1.1",
      "length": 2435,
      "created_at": "2017-12-18 11:10:35",
      "nodes": [
        {
          "enabled": true,
          "start": 0,
          "end": 205,
          "text": "Because of its location on the crossroads between Europe and Asia, and its proximity to lucrative east-west trade routes, throughout history Tbilisi was a point of contention between various global powers. ",
          "sources": [
            0,
            1,
            2
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 1
            },
            {
              "source": 2,
              "cos": 0.66
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1,
            2
          ]
        },
        {
          "enabled": true,
          "start": 206,
          "end": 327,
          "text": "The city\u0027s location to this day ensures its position as an important transit route for various energy and trade projects. ",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 1
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 328,
          "end": 486,
          "text": "Tbilisi\u0027s diverse history is reflected in its architecture, which is a mix of medieval, neoclassical, Beaux Arts, Art Nouveau, Stalinist and Modern structures.",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 0.7
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 487,
          "end": 692,
          "text": "Because of its location on the crossroads between Europe and Asia, and its proximity to lucrative east-west trade routes, throughout history Tbilisi was a point of contention between various global powers. ",
          "sources": [
            2
          ],
          "sources_improved": [
            {
              "source": 2,
              "cos": 0.66
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            2
          ]
        },
        {
          "enabled": true,
          "start": 693,
          "end": 814,
          "text": "The city\u0027s location to this day ensures its position as an important transit route for various energy and trade projects. ",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 1
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 815,
          "end": 973,
          "text": "Tbilisi\u0027s diverse history is reflected in its architecture, which is a mix of medieval, neoclassical, Beaux Arts, Art Nouveau, Stalinist and Modern structures.",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 0.7
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 974,
          "end": 1179,
          "text": "Because of its location on the crossroads between Europe and Asia, and its proximity to lucrative east-west trade routes, throughout history Tbilisi was a point of contention between various global powers. ",
          "sources": [
            2
          ],
          "sources_improved": [
            {
              "source": 2,
              "cos": 0.66
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            2
          ]
        },
        {
          "enabled": true,
          "start": 1180,
          "end": 1301,
          "text": "The city\u0027s location to this day ensures its position as an important transit route for various energy and trade projects. ",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 1
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 1302,
          "end": 1460,
          "text": "Tbilisi\u0027s diverse history is reflected in its architecture, which is a mix of medieval, neoclassical, Beaux Arts, Art Nouveau, Stalinist and Modern structures.",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 0.7
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 1461,
          "end": 1666,
          "text": "Because of its location on the crossroads between Europe and Asia, and its proximity to lucrative east-west trade routes, throughout history Tbilisi was a point of contention between various global powers. ",
          "sources": [
            2
          ],
          "sources_improved": [
            {
              "source": 2,
              "cos": 0.66
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            2
          ]
        },
        {
          "enabled": true,
          "start": 1667,
          "end": 1788,
          "text": "The city\u0027s location to this day ensures its position as an important transit route for various energy and trade projects. ",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 1
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 1789,
          "end": 1947,
          "text": "Tbilisi\u0027s diverse history is reflected in its architecture, which is a mix of medieval, neoclassical, Beaux Arts, Art Nouveau, Stalinist and Modern structures.",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 0.7
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 1948,
          "end": 2153,
          "text": "Because of its location on the crossroads between Europe and Asia, and its proximity to lucrative east-west trade routes, throughout history Tbilisi was a point of contention between various global powers. ",
          "sources": [
            2
          ],
          "sources_improved": [
            {
              "source": 2,
              "cos": 0.66
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            2
          ]
        },
        {
          "enabled": true,
          "start": 2154,
          "end": 2275,
          "text": "The city\u0027s location to this day ensures its position as an important transit route for various energy and trade projects. ",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 1
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        },
        {
          "enabled": true,
          "start": 2276,
          "end": 2434,
          "text": "Tbilisi\u0027s diverse history is reflected in its architecture, which is a mix of medieval, neoclassical, Beaux Arts, Art Nouveau, Stalinist and Modern structures.",
          "sources": [
            0,
            1
          ],
          "sources_improved": [
            {
              "source": 0,
              "cos": 1
            },
            {
              "source": 1,
              "cos": 0.7
            }
          ],
          "references": [],
          "headers": [],
          "quotes": [],
          "destinations_clusters": [
            0,
            1
          ]
        }
      ],
      "indexes": [
        {
          "id": 0,
          "db_id": 1,
          "name": "",
          "status": "success",
          "queries": 10,
          "type": "external"
        }
      ],
      "references": [],
      "header": [],
      "quotes": [],
      "sources": [
        {
          "dst_pos_success": true,
          "content_type": "text\/html",
          "index": 0,
          "source": "https:\/\/en.wikipedia.org\/wiki\/Tbilisi",
          "length": 1611,
          "percent": 66.16,
          "link": {
            "name": "en.wikipedia.org",
            "urls": [
              "https:\/\/en.wikipedia.org\/wiki\/Tbilisi"
            ]
          },
          "tf_idf": false,
          "plagiarism_length": 1611,
          "plagiarism_percent": 66.16
        },
        {
          "dst_pos_success": true,
          "content_type": "text\/html",
          "index": 0,
          "source": "https:\/\/www.youtube.com\/watch?v=YU-db2NKMtY",
          "length": 1611,
          "percent": 66.16,
          "link": {
            "name": "www.youtube.com",
            "urls": [
              "https:\/\/www.youtube.com\/watch?v=YU-db2NKMtY"
            ]
          },
          "tf_idf": false,
          "plagiarism_length": 1611,
          "plagiarism_percent": 66.16
        },
        {
          "dst_pos_success": true,
          "content_type": "text\/html",
          "index": 0,
          "source": "https:\/\/www.facebook.com\/New-Georgia-Travel-agency-306643492874270\/",
          "length": 1030,
          "percent": 42.3,
          "link": {
            "name": "www.facebook.com",
            "urls": [
              "https:\/\/www.facebook.com\/New-Georgia-Travel-agency-306643492874270\/"
            ]
          },
          "tf_idf": false,
          "plagiarism_length": 1030,
          "plagiarism_percent": 42.3
        }
      ],
      "sources_count": 3,
      "matched_length": 2435,
      "matched_percent": 100,
      "external_queries": 10,
      "destinations_clusters": [
        {
          "source": 0,
          "id": 0,
          "offsets": [
            {
              "start": 28510,
              "end": 28843,
              "cos": 1
            },
            {
              "start": 28844,
              "end": 28965,
              "cos": 1
            },
            {
              "start": 28966,
              "end": 29554,
              "cos": 1
            },
            {
              "start": 28844,
              "end": 28965,
              "cos": 1
            },
            {
              "start": 28966,
              "end": 29554,
              "cos": 1
            },
            {
              "start": 28844,
              "end": 28965,
              "cos": 1
            },
            {
              "start": 28966,
              "end": 29554,
              "cos": 1
            },
            {
              "start": 28844,
              "end": 28965,
              "cos": 1
            },
            {
              "start": 28966,
              "end": 29554,
              "cos": 1
            },
            {
              "start": 28844,
              "end": 28965,
              "cos": 1
            },
            {
              "start": 28966,
              "end": 29554,
              "cos": 1
            }
          ]
        },
        {
          "source": 1,
          "id": 1,
          "offsets": [
            {
              "start": 87684,
              "end": 87889,
              "cos": 1
            },
            {
              "start": 87890,
              "end": 88011,
              "cos": 1
            },
            {
              "start": 88012,
              "end": 88180,
              "cos": 0.7
            },
            {
              "start": 87890,
              "end": 88011,
              "cos": 1
            },
            {
              "start": 88012,
              "end": 88180,
              "cos": 0.7
            },
            {
              "start": 87890,
              "end": 88011,
              "cos": 1
            },
            {
              "start": 88012,
              "end": 88180,
              "cos": 0.7
            },
            {
              "start": 87890,
              "end": 88011,
              "cos": 1
            },
            {
              "start": 88012,
              "end": 88180,
              "cos": 0.7
            },
            {
              "start": 87890,
              "end": 88011,
              "cos": 1
            },
            {
              "start": 88012,
              "end": 88180,
              "cos": 0.7
            }
          ]
        },
        {
          "source": 2,
          "id": 2,
          "offsets": [
            {
              "start": 296896,
              "end": 297223,
              "cos": 0.66
            },
            {
              "start": 296896,
              "end": 297223,
              "cos": 0.66
            },
            {
              "start": 296896,
              "end": 297223,
              "cos": 0.66
            },
            {
              "start": 296896,
              "end": 297223,
              "cos": 0.66
            },
            {
              "start": 296896,
              "end": 297223,
              "cos": 0.66
            }
          ]
        }
      ]
    }
  }
}

Secuencia

Para verificar un texto en busca de plagio en su aplicación, DEBE:

  1. Recibir un token de API de autorización.
  2. Enviar el texto utilizando el método de API y recibir un número de identificación del texto.
  3. Esperar hasta que verifiquemos el texto.
  4. Verificar el estado del texto utilizando el ID del paso 2 y el método de API. Si el texto no se ha verificado, vaya al paso 3 con un tiempo de espera.
  5. Recibir un informe utilizando el ID del texto del paso 2 y el método de API.
  6. Renderizar el informe JSON en su aplicación.

Autorización

Para la autorización, DEBE tener una cuenta registrada en PlagiarismCheck.org y un token de API especial de nuestro equipo de soporte.

Para recibir un token de API, debe ponerse contacto con nuestro soporte. También puede iniciar sesión como propietario y copiar el token de API actual a continuación.

Enviar la solicitud

La solicitud tiene parámetros:

  • author - Nombre de usuario (correo electrónico) de un miembro de la organización. Este miembro será el autor de la verificación.
  • group_token - el token de API
  • text - El texto a verificar. También puede enviar un archivo (doc, docx, pdf, txt, odt, rtf, odp, pptx, ppt) como se muestra en el ejemplo.
  • custom_author (opcional) - nombre de un autor si este autor no está registrado en su cuenta de grupo en plagiarismcheck.org. Por el contrario, el campo de autor es obligatorio y este autor podrá encontrar el texto verificado una vez que inicie sesión en su cuenta de PlagiarismCheck.

Solicitud:

curl "https://plagiarismcheck.org/api/org/text/check/"  \
 --request POST \
 --data    "group_token=G-HEfFiCHYWYx...." \
 --data    "author=example@example.com" \
 --data    "text=an application programming interface (API) is a set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer. An API may be for a web-based system, operating system, database system, computer hardware or software library. An API specification can take many forms, but often includes specifications for routines, data structures, object classes, variables or remote calls. POSIX, Microsoft Windows API, the C++ Standard Template Library and Java APIs are examples of different forms of APIs. Documentation for the API is usually provided to facilitate usage" \

Respuesta:

{
   "success":true,
   "data":{
      "id":14, // Check ID
      "filename":"an application",
      "created_at":"1643727469000",
      "updated_at":"1643727469000",
      "submitted_at":"1643727469000",
      "is_deleted":false,
      "deleted_at":null,
      "state":3,
      "language":"en",
      "pages":1,
      "words":127,
      "group_id":3,
      "custom_author":null,
      "user_id":24,
      "report_id":null,
      "integration_links":[
         {
            "id":11,
            "integration_id":null,
            "submission":null,
            "course_work":null,
            "assignment":null,
            "publishable":false
         }
      ]
   }
}
            

Verificar el estado

Este método recibe el ID del texto y devuelve información detallada sobre el texto. Aquí hay una tabla con estados:

IDNombreDescripción
2STATE_STOREDEl texto ha sido almacenado y está esperando ser verificado.
3STATE_SUBMITTEDEl texto ha sido almacenado y está esperando ser verificado.
4STATE_FAILEDEl texto no ha sido verificado. Ocurrió un error.
5STATE_CHECKEDEl texto ha sido verificado con éxito y puede recibir el informe.

En el ejemplo: "14" es el ID del texto

Solicitud:

curl "https://plagiarismcheck.org/api/org/text/status/14/"  \
 --request POST \
 --data    "group_token=G-HEfFi..."

Respuesta:

{
   "success":true,
   "data":{
      "id":14,  //Check ID
      "filename":"an application",
      "created_at":"1643727469000",
      "updated_at":"1643727471000",
      "submitted_at":"1643727469000",
      "is_deleted":false,
      "deleted_at":null,
      "state":5,
      "language":"en",
      "pages":1,
      "words":127,
      "group_id":3,
      "custom_author":null,
      "creator":{
         "id":24,
         "name":"Default User", //author name
         "email":"example@example.com", //author email
         "created_at":"1643307115000",
         "updated_at":"1643647307000",
         "is_blocked":false,
         "allowed_languages":[
            "en"
         ],
         "balance":{
            "balance":0,
            "bonus":397,
            "hold":0,
            "hold_bonus":0
         },
         "avatar":null,
         "sale_role":null
      },
      "report":{
         "id":13,
         "created_at":"1643727471000",
         "source_count":5,
         "percent":"28.57"  // Percent of plagiarism
      },
      "integration_links":[
         {
            "id":11,
            "integration_id":null,
            "submission":null,
            "course_work":null,
            "assignment":null,
            "publishable":false
         }
      ]
   }
}

Obtener el informe

Este método recibe un ID del texto y devuelve un informe detallado. El texto DEBE tener el estado 5 (STATE_CHECKED). El informe contiene nodos, fuentes y otra información. Cada nodo contiene el texto, la posición de inicio, la posición de fin y las fuentes donde se encontró el texto. Cada fuente tiene el tipo de contenido, el porcentaje de plagio y una URL. En el ejemplo "14" es el ID del texto.

Solicitud:

curl "https://plagiarismcheck.org/api/org/text/report/14/"  \
 --request POST \
 --data    "group_token=G-HEfFiCHYWY..."
 

Respuesta:

{
   "success":true,
   "data":{
      "report":{
         "id":13,
         "created_at":"1643727471000",
         "source_count":5,
         "percent":"28.57",
         "text_id":14
      },
      "report_data":{
         "version":"1.1",
         "length":637,
         "created_at":"2017-05-12 05:10:57",
         "nodes":[
            {
               "enabled":true,
               "start":0,
               "end":19,
               "text":"\nnon_matched_header\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[
                  0
               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":20,
               "end":34,
               "text":"matched_header\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[
                  0
               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":35,
               "end":53,
               "text":"non_matched_header\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[
                  0
               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":54,
               "end":74,
               "text":"\nnon_matched_content\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":75,
               "end":90,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":91,
               "end":122,
               "text":"matched_content_with_paraphrase\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":0.65
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":123,
               "end":138,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":139,
               "end":179,
               "text":"non_matched_content\n\nnon_matched_content\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":180,
               "end":195,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":196,
               "end":233,
               "text":"matched_content_with_multiple_sources\n",
               "sources":[
                  0,
                  1
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  },
                  {
                     "source":1,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0,
                  1
               ]
            },
            {
               "enabled":true,
               "start":234,
               "end":334,
               "text":"matched_content_from_internal_db\nmatched_content_from_cache\nnon_matched_content\n\nnon_matched_content\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":335,
               "end":350,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":351,
               "end":377,
               "text":"matched_content_with_quote\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[
                  0
               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":378,
               "end":393,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":394,
               "end":413,
               "text":"non_matched_content\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":414,
               "end":444,
               "text":"non_matched_content_with_quote\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[
                  1
               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":445,
               "end":485,
               "text":"non_matched_content\n\nnon_matched_content\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":486,
               "end":501,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":502,
               "end":532,
               "text":"matched_content_with_reference\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[
                  0
               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":533,
               "end":548,
               "text":"matched_content\n",
               "sources":[
                  0
               ],
               "sources_improved":[
                  {
                     "source":0,
                     "cos":1
                  }
               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[
                  0
               ]
            },
            {
               "enabled":true,
               "start":549,
               "end":568,
               "text":"non_matched_content\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":569,
               "end":603,
               "text":"non_matched_content_with_reference\n",
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[
                  1
               ],
               "headers":[

               ],
               "quotes":[

               ],
               "destinations_clusters":[

               ]
            },
            {
               "enabled":true,
               "start":604,
               "end":636,
               "sources":[

               ],
               "sources_improved":[

               ],
               "references":[

               ],
               "headers":[

               ],
               "quotes":[

               ],
               "text":"non_matched_content\n\nVERSION 1.4\n",
               "destinations_clusters":[

               ]
            }
         ],
         "indexes":[
            {
               "id":0,
               "db_id":1,
               "name":"",
               "status":"success",
               "queries":5,
               "type":"external"
            },
            {
               "id":1,
               "db_id":1,
               "name":"",
               "status":"success",
               "queries":7,
               "type":"external"
            },
            {
               "id":2,
               "db_id":2,
               "name":"",
               "status":"success",
               "queries":0,
               "type":"internal"
            },
            {
               "id":3,
               "db_id":3,
               "name":"",
               "status":"success",
               "queries":0,
               "type":"cache"
            }
         ],
         "references":[
            {
               "id":0,
               "length":31
            },
            {
               "id":1,
               "length":35
            }
         ],
         "header":[
            {
               "id":0,
               "length":54
            }
         ],
         "quotes":[
            {
               "id":0,
               "length":27
            },
            {
               "id":1,
               "length":31
            }
         ],
         "sources":[
            {
               "dst_pos_success":true,
               "content_type":"text\/plain",
               "index":0,
               "source":"http:\/\/searchengine.localhost\/resource\/first",
               "length":255,
               "percent":40.03,
               "link":{
                  "name":"searchengine.localhost",
                  "urls":[
                     "http:\/\/searchengine.localhost\/resource\/first"
                  ]
               },
               "tf_idf":false,
               "plagiarism_length":182,
               "plagiarism_percent":28.57
            },
            {
               "dst_pos_success":false,
               "content_type":"text\/plain",
               "index":0,
               "source":"http:\/\/searchengine.localhost\/resource\/second",
               "length":38,
               "percent":5.97,
               "link":{
                  "name":"searchengine.localhost",
                  "urls":[
                     "http:\/\/searchengine.localhost\/resource\/second"
                  ]
               },
               "tf_idf":false,
               "plagiarism_length":38,
               "plagiarism_percent":5.97
            },
            {
               "dst_pos_success":false,
               "content_type":"text\/plain",
               "index":1,
               "source":"http:\/\/another.searchengine.localhost\/some_url",
               "length":0,
               "percent":0,
               "link":{
                  "name":"another.searchengine.localhost",
                  "urls":[
                     "http:\/\/another.searchengine.localhost\/some_url"
                  ]
               },
               "tf_idf":false,
               "plagiarism_length":0,
               "plagiarism_percent":0
            },
            {
               "dst_pos_success":false,
               "content_type":"text\/plain",
               "index":2,
               "source":"7200207",
               "length":0,
               "percent":0,
               "link":{
                  "name":"7200207",
                  "urls":[
                     "7200207"
                  ]
               },
               "tf_idf":false,
               "plagiarism_length":0,
               "plagiarism_percent":0
            },
            {
               "dst_pos_success":false,
               "content_type":"text\/plain",
               "index":3,
               "source":"http:\/\/real.searchengine.localhost\/url\/to\/original\/resource",
               "length":0,
               "percent":0,
               "link":{
                  "name":"real.searchengine.localhost",
                  "urls":[
                     "http:\/\/real.searchengine.localhost\/url\/to\/original\/resource"
                  ]
               },
               "tf_idf":false,
               "plagiarism_length":0,
               "plagiarism_percent":0
            }
         ],
         "sources_count":5,
         "matched_length":182,
         "matched_percent":28.57,
         "external_queries":12,
         "destinations_clusters":[
            {
               "source":0,
               "id":0,
               "offsets":[
                  {
                     "start":20,
                     "end":34,
                     "cos":1
                  },
                  {
                     "start":75,
                     "end":90,
                     "cos":1
                  },
                  {
                     "start":91,
                     "end":122,
                     "cos":0.65
                  },
                  {
                     "start":123,
                     "end":138,
                     "cos":1
                  },
                  {
                     "start":180,
                     "end":233,
                     "cos":1
                  },
                  {
                     "start":335,
                     "end":393,
                     "cos":1
                  },
                  {
                     "start":486,
                     "end":548,
                     "cos":1
                  }
               ]
            },
            {
               "source":1,
               "id":1,
               "offsets":[
                  {
                     "start":196,
                     "end":233,
                     "cos":1
                  }
               ]
            },
            {
               "source":2,
               "id":2,
               "offsets":[

               ]
            },
            {
               "source":3,
               "id":3,
               "offsets":[

               ]
            },
            {
               "source":4,
               "id":4,
               "offsets":[

               ]
            }
         ]
      }
   }
}

Eliminar el informe

Este método eliminará una entidad de texto.

Solicitud:

curl "https://plagiarismcheck.org/api/org/text/delete/14/"  \
                        --request POST \
                        --data    "group_token=G-HEfFiCHYWY..."
                        

Respuesta:

{"success": true}

Interfaz de usuario para el informe.

Puede enviar un informe a la interfaz de usuario. Necesitará crear un formulario HTML y enviarlo desde el navegador del usuario.

<!DOCTYPE html>
  <html>
      <body>
          <form method="post" action="https://plagiarismcheck.org/lms/public-report/14/">
              <input type="hidden" name="token" value="G-HEf......" />
              <input type="hidden" name="lms-type" value="api" />
              <input type="submit" />
          </form>
      </body>
  </html>
              

Introducción

Este documento proporciona toda la información necesaria que necesita para verificar textos para la inteligencia artificial (IA) en su aplicación.

Puede visitar nuestro perfil de GitHub para encontrar más ejemplos.

También puede consultar una página Swagger con la especificación del API.

Secuencia

Para verificar un texto para la inteligencia artificial (IA) en su aplicación, DEBE:

  1. Recibir un token de API de autorización.
  2. Enviar el texto utilizando el método de API y recibir un número de identificación del texto.
  3. Esperar hasta que verifiquemos el texto.
  4. Verificar el estado del texto utilizando el ID del paso 2 y el método de API. Si el texto no se ha verificado, vaya al paso 3 con un tiempo de espera.
  5. Recibir un informe utilizando el ID del texto del paso 2 y el método de API.
  6. Renderizar el informe JSON en su aplicación.

Autorización

Para la autorización, DEBE tener una cuenta registrada en PlagiarismCheck.org y un token de API especial de nuestro equipo de soporte.

Para recibir un token de API, debe ponerse en contacto con nuestro soporte. También puede iniciar sesión y copiar el token de API actual a continuación.

El API devuelve 401 no autorizado si proporciona un token no válido. DEBE enviar su token en el encabezado con el nombre X-API-TOKEN.

Ejemplo de un encabezado HTTP:

X-API-TOKEN: vsMKX3179tjK3CqvhE228IDeMV-eBBER

Donde vsMKX3179tjK3CqvhE228IDeMV-eBBER es un ejemplo del token de API.

Enviar la solicitud

La solicitud tiene parámetros:

  • text - El texto en formato de texto sin formato que se va a verificar. Puede enviar solo texto sin formato o un archivo.
  • file - Un archivo (doc, docx, pdf, txt, odt, rtf) que se va a verificar. Puede enviar solo texto sin formato o un archivo.
  • group_id - ID del grupo. Enviar solo para una cuenta B2B.

Solicitud:

curl "https://plagiarismcheck.org/api/v1/chat-gpt/"  \
 --request POST \
 --header  "X-API-TOKEN: vsMKX3179tjK3CqvhE228IDeMV-eBBER" \
 --data    "text=an application programming interface (API) is a set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer. An API may be for a web-based system, operating system, database system, computer hardware or software library. An API specification can take many forms, but often includes specifications for routines, data structures, object classes, variables or remote calls. POSIX, Microsoft Windows API, the C++ Standard Template Library and Java APIs are examples of different forms of APIs. Documentation for the API is usually provided to facilitate usage" \

Respuesta:

{
  "success": true,
  "data": {
    "enabled": true,
    "id": 2,
    "status": 2,
    "percent": null,
    "processed_percent": null,
    "strong_percent": null,
    "likely_percent": null,
    "mark": null,
    "comment": null,
    "comment_author": null,
    "type": 3,
    "content": "",
    "chunks": []
  }
}
                

Verificar el estado

Este método recibe un ID del texto y devuelve información detallada sobre el texto. Aquí hay una tabla con estados:

IDNombreDescripción
1STATE_QUEUEDEl texto se ha almacenado y está esperando una verificación.
2STATE_IN_PROGRESSEl texto se ha almacenado y está esperando una verificación.
3STATE_FAILEDEl texto no ha sido revisado. Ocurrió un error.
4STATE_CHECKEDEl texto se ha verificado correctamente y puede recibir el informe.

En el ejemplo: "2" es el ID del texto

Solicitud:

curl "https://plagiarismcheck.org/api/v1/chat-gpt/2"  \
-X GET \
-H "X-API-TOKEN: vsMKX3179tjK3CqvhE228IDeMV-eBBER"

Respuesta:

{
  "success": true,
  "data": {
    "enabled": true,
    "id": 2,
    "status": 2,
    "percent": null,
    "processed_percent": null,
    "strong_percent": null,
    "likely_percent": null,
    "mark": null,
    "comment": null,
    "comment_author": null,
    "type": 3,
    "content": "",
    "chunks": []
  }
}

Verificar el estado

Este método recibe un ID del texto y devuelve información detallada sobre el texto. El texto DEBE tener el estado 4 (STATE_CHECKED). El informe contiene porcentaje general, porcentaje procesado, fragmentos y otra información. Cada fragmento tiene confiabilidad, una posición inicial y una posición final en el texto donde se encontró la IA. En el ejemplo "2" es el ID del texto.

Solicitud:

curl "https://plagiarismcheck.org/api/v1/chat-gpt/2"  \
-X GET \
-H "X-API-TOKEN: vsMKX3179tjK3CqvhE228IDeMV-eBBER" 

Respuesta:

{
  "success": true,
  "data": {
    "enable": true,
    "id": 2,
    "status": 4,
    "percent": 50.5,
    "processed_percent": 70.25,
    "strong_percent": 40.25,
    "likely_percent": 30,
    "mark": 1,
    "comment": "Comment message",
    "comment_author": {
      "id": 24,
      "name": "John Doe"
    },
    "type": 3,
    "content": "an application programming interface (API) is a set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components. A good API makes it easier to develop a computer program by providing all the building blocks, which are then put together by the programmer. An API may be for a web-based system, operating system, database system, computer hardware or software library. An API specification can take many forms, but often includes specifications for routines, data structures, object classes, variables or remote calls. POSIX, Microsoft Windows API, the C++ Standard Template Library and Java APIs are examples of different forms of APIs. Documentation for the API is usually provided to facilitate usage",
    "chunks": [
      {
        "reliability": 1,
        "position": [
          100,
          200
        ]
      }
    ]
  }
}