{"id":27874194,"url":"https://github.com/fizzymo/beyondbackend.large-dataset-generation","last_synced_at":"2026-04-29T00:32:02.004Z","repository":{"id":252287942,"uuid":"838983870","full_name":"FizzyMo/BeyondBackend.Large-Dataset-Generation","owner":"FizzyMo","description":"Generating a large dataset by fetching data from an API and exporting it to a text file.","archived":false,"fork":false,"pushed_at":"2025-07-08T09:58:22.000Z","size":2795,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T10:48:02.459Z","etag":null,"topics":["axios-library","data-export","javascript","news-api","nodejs","replit","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FizzyMo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-06T18:21:30.000Z","updated_at":"2025-07-08T09:58:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ae79468-9152-441f-ad75-adffc768d057","html_url":"https://github.com/FizzyMo/BeyondBackend.Large-Dataset-Generation","commit_stats":null,"previous_names":["fizzymo/large-dataset-generation","fizzymo/beyondbackend.large-dataset-generation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FizzyMo/BeyondBackend.Large-Dataset-Generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FizzyMo%2FBeyondBackend.Large-Dataset-Generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FizzyMo%2FBeyondBackend.Large-Dataset-Generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FizzyMo%2FBeyondBackend.Large-Dataset-Generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FizzyMo%2FBeyondBackend.Large-Dataset-Generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FizzyMo","download_url":"https://codeload.github.com/FizzyMo/BeyondBackend.Large-Dataset-Generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FizzyMo%2FBeyondBackend.Large-Dataset-Generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","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":["axios-library","data-export","javascript","news-api","nodejs","replit","rest-api"],"created_at":"2025-05-05T01:31:34.179Z","updated_at":"2026-04-29T00:32:01.995Z","avatar_url":"https://github.com/FizzyMo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Header](https://github.com/user-attachments/assets/a039ce3a-a652-4d0a-be3e-b0ee4b55c83c)\n\u003ch1 align=\"center\"\u003eLarge Dataset Generation\u003c/h1\u003e\n\nProvides a script to generate a large dataset from a News API using Node.js. The script fetches data from the API, formats it, and writes it to a text file.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [API Details](#api-details)\n- [Script Explanation](#script-explanation)\n  - [Fetching Data](#fetching-data)\n  - [Writing Data to File](#writing-data-to-file)\n- [Running the Script](#running-the-script)\n- [Example Output](#example-output)\n- [Prerequisites](#prerequisites)\n- [Setup](#setup)\n  - [Cloning the Repository](#cloning-the-repository)\n  - [Installing Dependencies](#installing-dependencies)\n  - [Environment Variables](#environment-variables)\n- [Technologies](#technologies)\n- [Project Structure](#project-structure)\n- [Author](#author)\n- [Contact](#contact)\n\n## Introduction\n\nThis project demonstrates how to generate a large dataset by fetching data from an API and exporting it to a text file. It uses the News API to gather articles about a specific topic and store the results in a `.txt` file.\n![](video/generate_data.gif)\n## API Details\nUsed the [News API](https://newsapi.org/) to fetch the latest news articles. Here are the details:\n- Endpoint:\n  `https://newsapi.org/v2/everything`\n- Parameters:\n  - `q`: The query keyword (e.g., Elon Musk)\n  - `language`: The language of the articles (e.g., en for English)\n  - `sortBy`: The sorting criteria (e.g., publishedAt for the most recent articles)\n  - `apiKey`: Your News API key\n\n## Script Explanation\n### **Fetching Data**\nThe script uses the axios library to fetch data from the News API.\n![](images/fetch.data.png)\n\n### **Writing Data to File**\nThe fetched data is formatted and written to a .txt file using the fs (File System) module:\n\n![](images/writing.data.png)\n\n## Running the Script\nTo run the script and generate your dataset, use the following command:\n``node index.js\n``\n\n## Example Output\nAfter running the script, you will find `articles.txt` in the root directory with content similar to:\n\n![](images/example.output.png)\n## Prerequisites\nBefore you begin, ensure you have the following installed:\n  - [Node.js](https://nodejs.org/) installed.\n  - News API Key (You can get one from [News API](https://newsapi.org/)\n\n## Setup\n\n### **Cloning the Repository**\n1. First, clone this repository to your local machine:\n`` git clone https://github.com/yourusername/large-dataset-generation.git ``\n`` cd large-dataset-generation ``\n### **Installing Dependencies**\n2. Install the required Node.js packages:\n`` npm install axios dotenv ``\n### **Environment Variables**\n3. Create a `.env` file in the root directory of the project and add your News API key:\n   - `npm i dotenv`\n   - Add the following line to the `.env` file:\n     `NEWS_API_KEY=your_news_api_key_here`\n     \n## Technologies\nThis project uses the following technologies:\n- **Replit:** For online coding and development\n- **Node.js:** JavaScript runtime environment\n- **JavaScript:** Programming language used for the script\n- **axios:** Promise-based HTTP client for making API requests\n\n## Project Structure\n```\nlarge-dataset-generation\n├── index.js          \n├── README.md         \n├── articles.txt      \n├── .env              \n├── images              \n│   └── example.output.png\n│   └── fetch.data.png\n│   └── writing.data.png\n└── video              \n    └── generate_data.gif\n            \n\n```\n\n## Author\n**Carisa Saenz-Videtto**\n\n## Contact\ncarisasaenz@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzymo%2Fbeyondbackend.large-dataset-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffizzymo%2Fbeyondbackend.large-dataset-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzymo%2Fbeyondbackend.large-dataset-generation/lists"}