{"id":18498431,"url":"https://github.com/yashkathe/f1-api-json","last_synced_at":"2025-04-09T00:31:17.221Z","repository":{"id":115431414,"uuid":"542270970","full_name":"yashkathe/F1-API-JSON","owner":"yashkathe","description":"F1-API is a TypeScript-based web scraping API designed to extract information about Formula 1 races, drivers, cars, standings, and race schedules. This powerful web scraper automates the process of gathering data and aggregating it into a structured format for easy analysis and consumption.","archived":false,"fork":false,"pushed_at":"2025-03-28T18:58:21.000Z","size":639,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T19:05:36.928Z","etag":null,"topics":["axios","cheerio","f1","f1-api","formula1","formula1-analysis","formula1-api","nodejs","npm","typescript","web-scraping"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/f1-api-node","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yashkathe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2022-09-27T20:10:43.000Z","updated_at":"2025-03-28T18:55:56.000Z","dependencies_parsed_at":"2024-02-09T13:14:54.582Z","dependency_job_id":"7d6b3501-3ad4-4508-a54e-3d59b0b139af","html_url":"https://github.com/yashkathe/F1-API-JSON","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"287030327c7c4ccacff10c9e2bbec176c084b7c8"},"previous_names":["yashkathe/f1-api"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashkathe%2FF1-API-JSON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashkathe%2FF1-API-JSON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashkathe%2FF1-API-JSON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yashkathe%2FF1-API-JSON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yashkathe","download_url":"https://codeload.github.com/yashkathe/F1-API-JSON/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949874,"owners_count":21023407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cheerio","f1","f1-api","formula1","formula1-analysis","formula1-api","nodejs","npm","typescript","web-scraping"],"created_at":"2024-11-06T13:39:50.949Z","updated_at":"2025-04-09T00:31:17.208Z","avatar_url":"https://github.com/yashkathe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Formula1 API\n\n**Completely Updated and Adjusted according to the New Changes in Formula 1's Website ~ 2025!**\n\n![f1](https://logodownload.org/wp-content/uploads/2016/11/formula-1-logo-7.png)  \n\nThe scraper scrapes this website: \u003chttps://www.formula1.com\u003e\n\n## Installation\n\n```bash\nnpm i f1-api-node\n```\n\n## Example snippet\n  \nThe following function will print the current lineup of F1 drivers.\n\n```javascript\nconst f1Api = require('f1-api-node') \n\nconst myFunction = async () =\u003e {\n    const driverLineup = await f1Api.getDriverData() // replace this function\n    console.log(driverLineup)\n}\n\nmyFunction()\n```\n\n## Functions\n\n### **1. getConstructorStandings**  \n  \n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n| Fetch Constructors standings from points table | Yes - 1 | The year from which you want to extract points table for (1950 - current) | current year |\n\n![const stnd](./readme/constructor_standing.png)\n\n### **2. getDriverStandings**\n\n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n| Fetch F1 driver standings from points table | Yes - 1 |  The year from which you want to extract points table for (1950 - current) | current year |\n\n![driver stnd](./readme/driver_standing.png)\n\n### **3. getDriverLineup**  \n\n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n| Fetch the current lineup of F1 drivers | No |  - | - |\n\n![driver lineup](./readme/driver_lineup.png)\n\n### **4. getTeamLineup**  \n\n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n| Fetch the current list of F1 teams | No |  - | - |\n\n![team lineup](./readme/team_lineup.png)\n\n### **5. getWorldChampions**  \n\n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n|   Fetch all the world champions   | No |  - | - |\n\n![hall of fame](./readme/world_champion.png)\n\n### **6. getRaceResults** - **[Does Not Work]**  \n\n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n|   Fetch race results of all the grand prix in a given year   | Yes - 1  | The year from which you want to extract race results (1950 - current) | - |\n\n![race results](./readme/race_results.png)\n\n### **7. getRaceSchedule** [DOES NOT WORK]\n  \n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n| Fetch race schedule for an entire year | Yes - 1 | The year from which you want to extract race schedule | current year |\n\n### **8. getFastestLaps**  \n  \n| Description | Needs Paramter ? | Paramter Description | Default Argument |\n|:------------|------------------|----------------------|------------------|\n| Fetch fastest laps for all races in a year | Yes - 1 | The year from which you want to extract fastest laps | current year |\n\n![fastest lap](./readme/fastest_lap.png)\n\n## Snapshots\n\nIf you want to have a look at the output from the given functions check [this](https://github.com/yashkathe/F1-API/tree/master/__tests__/__snapshots__).\n\n## Accessing API through Docker\n\nThe docker image of the rest api can be found on [Docker Hub](https://hub.docker.com/repository/docker/katheyash/f1-api-node/general)\n\n- ### Pull the Image and start the development in no time  \n\n#### 1. Pull from Docker Hub\n\n```bash\ndocker push katheyash/f1-api-node:tagname\n```\n\n#### 2. Pull from Github Container Registry\n\n```bash\ndocker pull ghcr.io/yashkathe/f1-api-node:2\n```\n\n- ### The default port is 80\n\n```bash\ndocker run -p 80:80 --name f1-api-node-test-1 katheyash/f1-api-node:1\n```\n\n- ### If .env file exists\n\n```bash\ndocker run --env-file ./.env -p 3001:3001 --name f1-api-node-test-1 f1-api-node:1\n```\n\n## Usage\n\nWARNING: Abusing this library may result in an IP ban from the host website.  \nPlease use with caution and try to limit the rate and amount of your requests if you value your access to formula1.com\n\n## Report Problems\n\nIf you have any problems regarding this project, read the following [disclaimer](https://github.com/yashkathe/F1-API/blob/master/DISCLAIMER.md).  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashkathe%2Ff1-api-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashkathe%2Ff1-api-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashkathe%2Ff1-api-json/lists"}