{"id":21032243,"url":"https://github.com/whirlxd/fetch-data-from-api","last_synced_at":"2026-03-17T21:06:36.195Z","repository":{"id":121876361,"uuid":"372163510","full_name":"whirlxd/fetch-data-from-api","owner":"whirlxd","description":"How to fetch data from a restful api","archived":false,"fork":false,"pushed_at":"2021-05-30T13:56:15.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T00:17:43.089Z","etag":null,"topics":["api","fetch","hype","node-fetch","restful-api","tutorial"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whirlxd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-30T08:36:33.000Z","updated_at":"2021-07-08T10:14:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c624caf-6ef4-45e1-8941-2e76615891d8","html_url":"https://github.com/whirlxd/fetch-data-from-api","commit_stats":null,"previous_names":["whirlxd/fetch-data-from-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/whirlxd/fetch-data-from-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whirlxd%2Ffetch-data-from-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whirlxd%2Ffetch-data-from-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whirlxd%2Ffetch-data-from-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whirlxd%2Ffetch-data-from-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whirlxd","download_url":"https://codeload.github.com/whirlxd/fetch-data-from-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whirlxd%2Ffetch-data-from-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30631446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fetch","hype","node-fetch","restful-api","tutorial"],"created_at":"2024-11-19T12:41:44.833Z","updated_at":"2026-03-17T21:06:36.179Z","avatar_url":"https://github.com/whirlxd.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to fetch Data from a restful api?\nHi! Im  Whirl and im gonna teach you how to fetch data from a restful api \n# What is a API?\nAPI is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. Each time you use an app like Facebook, send an instant message, or check the weather on your phone, you're using an API.\n# How to make your own api?\nThis is not the topic of this tutorial but still [you can view it here!](https://canary.discord.com/channels/784691824790208512/784711943831289876/843086500022714428 \"The discord message link\")\n\n[make sure to join that server to view](https://discord.gg/QspCPNuKpy \"The discord server link\")\n# How to fetch data \n1 - you need to be familiar with json (it is really easy )\n\n2 - for this tutorial i'll use this api - https://brawlapi.com\n\n3 - now go the brawlers page in endpoints category\n\n4 - they have listed a endpoint there \n\n5 - when you click on that link you see some text \n\n6 -  Now We would fetch that data and represent it on your console\n\n7 - write this code -\n\n```\n const fetch = require('node-fetch')//npm i node-fetch\nfetch('https://api.brawlapi.com/v1/brawlers/16000038')\n    .then(res =\u003e res.json())\n    .then(json =\u003e console.log(json));\n  ```\nThis would print what was on that endpoint page!\n\nNow if you look closely they mention a brawler name , id , is released and much more !\n\nHow to get this content?\n\ni'll use this method -\nconsole.log(json.name) - this would log the brawler name which in this case is surge \n\nThere may be some api's which have a more complicated json for [which traditional javascript method of reading objects can be used!](https://replit.com/talk/learn/JavaScript-Crash-Course-1000-Lines/135512 \"How to read objects\")\n\n# Thanx To -\nWhirl","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhirlxd%2Ffetch-data-from-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhirlxd%2Ffetch-data-from-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhirlxd%2Ffetch-data-from-api/lists"}