instances
if you need a list of instances, you don't need to scrape the website, just use this api.the api's endpoint is
/api/instances.json
, for this website the link will be http://instances.cobalt.best/api/instances.json
. make sure you change the user-agent! i'm blocking default user-agents to prevent bots from hitting my websites!
example user-agent:
your-project/versionorcommit (+https://codeberg.org/kwiat/yourproject)
this is how the response will look like:
[ [ { "api": "cobalt.invalid", "frontend": "None", "nodomain": false, "online": { "api": false, "frontend": true }, "protocol": "https", "score": -1, "services": {}, "trust": 1 }, { "api": "kityune.imput.net", "branch": "main", "commit": "53067608901f2969f56766ab2fef834ce0fdfe86", "cors": true, "frontend": "cobalt.tools", "name": "None", "nodomain": false, "online": { "api": true, "frontend": true }, "protocol": "https", "score": 91, "services": { "bilibili": "error.api.service.disabled", "bilibili_tv": "error.api.service.disabled", "bluesky": true, "dailymotion": true, "facebook": true, "instagram": true, "loom": true, "odnoklassniki": true, "pinterest": true, "reddit": true, "rutube": true, "snapchat": true, "soundcloud": true, "streamable": true, "tiktok": true, "tumblr": true, "twitch": true, "twitter": true, "vimeo": true, "vk": true, "youtube": true, "youtube_music": true, "youtube_shorts": true }, "trust": 1, "version": "10.7" }, // ... ]
last updated
if you want to know when the instance list was last updated, just to a request to/api/lastupdated
and you'll get the time of the last update. example response:
23:17:44