PlagiarismCheck API

Introduction

This document provides all the necessary information you need for checking your text in your application.

For checking your text, you MUST:

  1. 1) Receive an authorization API token.
  2. 2) Send the text by using the API method and receive an identification of the text.
  3. 3) Wait until we check the text.
  4. 4) Check the status of the text by using the ID from 2 and the API method. If the text is not checked, go to 3 with timeout.
  5. 5) Receive a report by using the text ID from 2 and the API method.
  6. 6) Render the json report in your application.

Authorization

For authorization, you MUST have a registered account with the service and have a special API token. For receiving an API token, you need to contact us. You MUST send your API token in all requests.

API returns 401 Unauthorized if you provide an invalid token. You MUST send your token in the header with the name X-API-TOKEN.

Example of an HTTP header:

X-API-TOKEN: vsMKX3179tjK3CqvhE228IDeMV-eBBER

Send the request

The request has parameters:

  • language - language of the text. At the moment, we support only one text: en.
  • text - content of the text you want to check. It MUST NOT be shorter than 80 characters.
The Request:
							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" \

					
The Response:
							{
							    "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
							    }
							}
					

Check the status

This method receives an ID of the text and returns detailed information about the text. Here is a table with statuses:

IDNameDescription
2STATE_STOREDText has been stored and waiting for a check.
3STATE_SUBMITTEDText has been stored and waiting for a check.
4STATE_FAILEDText has not been checked. An error happened.
5STATE_CHECKEDText has been successfully checked and you can receive the report.

In example: "2" is the ID of text

Request:
						curl "https://plagiarismcheck.org/api/v1/text/2"  \
						     -X GET \
						     -H "X-API-TOKEN: cUwhcQU88K2cYn47aPCg-snWoSNNJwyW" \
					
Response:
						{
						    "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"
						        }
						    }
						}
					

Get the Report

This method receives an ID of the text and returns a detailed report. The text MUST be with status 5 (STATE_CHECKED). The report contains nodes, sources, and other information. Each node has text, a start position, an end position, and sources where the text was found. Each source has: content-type, percentage of plagiarism, and a URL. In example "2" is The ID of the text.

Request:
						curl "https://plagiarismcheck.org/api/v1/text/report/2"  \
						     -X GET \
						     -H "X-API-TOKEN: cUwhcQU88K2cYn47aPCg-snWoSNNJwyW" \
					
Response:
						{
						    "data": {
						        "report": {
						            "id": 3952875,
						            "created_at": "1513617036000",
						            "source_count": 3,
						            "percent": "100.00",
						            "text_id": 3960269
						        },
						        "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
						                        }
						                    ]
						                }
						            ]
						        }
						    }
						}