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:
[ { "protocol": "https", "frontend": "None", "api": "offlineinstance.fake", "trust": 0, "online": { "api": true, "frontend": false }, "services": {}, "score": -1 }, { "protocol": "https", "frontend": "cobalt.tools", "api": "api.cobalt.tools", "trust": 1, "online": { "api": true, "frontend": true }, "services": { "YouTube": false, "YouTube Music": true, "YouTube Shorts": true, "TikTok": true, "Instagram": true, "Twitter": true, "Reddit": true, "SoundCloud": true, "BiliBili": false, "Dailymotion": true, "Odnoklassniki": true, "Streamable": true, "Tumblr": true, "Twitch Clips": true, "VK": true, "Vimeo": true, "Pinterest": true, "RUTUBE": true, "Vine": true, "Loom": true }, "version": "7.15", "branch": "current", "commit": "05ba1f0", "name": "olly", "cors": true, "score": 90 }, // ... ]
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