Fetching scripts is great when you want to look for scripts to use.
However, if you already have a script in mind, fetching a list could be unnecessary, and in stead you may want to fetch that specific script alone.
For that, we have a dedicated endpoint that returns the details of the script. Another endpoint is also provided if you just need its raw script.
The API path for this is divided into 2 endpoints:
/api/script/:script
/api/script/raw/:script
Both endpoints receive just a single parameter, script
, which is the route parameter placed in the last portion of the API path.
Parameter | Description | Required | Type | Default |
---|---|---|---|---|
script | The script identifier | ✅ | string | - |
The response, unless errored, would be of the following structure:
{
"script": {
"_id": "string",
"title": "string",
"game": {
"_id": "string",
"gameId": number,
"name": "string",
"imageUrl": "string"
},
"features": "string",
"tags": [
"string",
...
],
"script": "string",
"owner": {
"_id": "string",
"username": "string",
"verified": boolean,
"profilePicture": "string",
"status": "string",
},
"image": "string",
"slug": "string",
"verified": boolean,
"keyLink": "string",
"views": number,
"scriptType": "string",
"isUniversal": boolean,
"isPatched": boolean,
"visibility": "string",
"createdAt": "string",
"likeCount": number,
"dislikeCount": number,
"liked": boolean,
"disliked": boolean,
"isFav": boolean
}
}
The raw script
If an error occurs, the response will contain a single message
field:
{
"message": "string"
}