The ScriptBlox API has had major changes. If you are using the API, please migrate to the new structure. Details in https://scriptblox.com/docs/migration

Fetch individual scripts

Obtain details for a specific script

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.

API Path

The API path for this is divided into 2 endpoints:

  • For the details of the script - The API path is /api/script/:script
  • For the raw script - The API path is /api/script/raw/:script

Parameters

Both endpoints receive just a single parameter, script, which is the route parameter placed in the last portion of the API path.

ParameterDescriptionRequiredTypeDefault
scriptThe script identifierstring-

Response

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
    }
}

If an error occurs, the response will contain a single message field:

{
    "message": "string"
}