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

Trending

Fetch the currently trending scripts

Fetching/searching is great to look through the ScriptBlox script catalogue and see what there is, but what about top scripts at the moment?

For this exact purpose, we have the trending endpoint, that returns a targetted list of the scripts that received the most interactions from the community.

API Path

The API path for this endpoint is /api/script/trending

Parameters

The trending endpoint can only accept a single query parameter max, to limit the amount of results returned.

ParameterDescriptionRequiredTypeDefault
maxThe amount of results to returnAny positive number up to 2020

Response

The response, unless errored, would be of the following structure:

{
    "result": {
        "max": number,
        "scripts": [
            {
                "_id": "string",
                "title": "string",
                "game": {
                    "_id": "string",
                    "name": "string",
                    "imageUrl": "string"
                },
                "slug": "string",
                "verified": boolean,
                "key": boolean,
                "views": number,
                "scriptType": "string",
                "isPatched": boolean,
                "isUniversal": boolean,
                "createdAt": "string",
                "image": "string",
            },
            ...
        ]
    }
}

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

{
    "message": "string"
}