{"id":19380396,"url":"https://github.com/margostino/anfield-api","last_synced_at":"2025-02-24T16:43:44.418Z","repository":{"id":218282374,"uuid":"746044385","full_name":"margostino/anfield-api","owner":"margostino","description":"GraphQL API to retrieve the Fantasy Premier League data","archived":false,"fork":false,"pushed_at":"2024-02-02T16:40:41.000Z","size":7454,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-07T06:16:46.474Z","etag":null,"topics":["fantasy-premier-league","golang","premier-league","vercel"],"latest_commit_sha":null,"homepage":"https://anfield-api-margostino.vercel.app/api/playground","language":"Go","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/margostino.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-20T22:31:14.000Z","updated_at":"2024-02-02T16:27:38.000Z","dependencies_parsed_at":"2024-01-20T23:29:01.905Z","dependency_job_id":"f9ab8cde-ba5e-4a61-8049-1a90a12ed6db","html_url":"https://github.com/margostino/anfield-api","commit_stats":null,"previous_names":["margostino/anfield-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/margostino%2Fanfield-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/margostino%2Fanfield-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/margostino%2Fanfield-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/margostino%2Fanfield-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/margostino","download_url":"https://codeload.github.com/margostino/anfield-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240517097,"owners_count":19814138,"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":["fantasy-premier-league","golang","premier-league","vercel"],"created_at":"2024-11-10T09:13:48.966Z","updated_at":"2025-02-24T16:43:44.397Z","avatar_url":"https://github.com/margostino.png","language":"Go","readme":"#  Anfield API\n\nThis project introduces a GraphQL API, developed using Golang and hosted on Vercel, designed to streamline access to **public** information from the Fantasy Premier League. Its primary objective is to offer a simplified, unified, and user-friendly method for retrieving Fantasy Premier League data, eliminating the need to interact with multiple separate endpoints.\n\n## Endpoints\n\n- Query: https://anfield-api-margostino.vercel.app/api/query\n\n- Playground: https://anfield-api-margostino.vercel.app/api/playground\n\n## Authentication\n\nThe API is using the Fantasy Premier League public API, but authentication is required simply to control some minimal rate limits. The API is using a simple token-based authentication, where the token is passed in the `Authorization` header. Yes, for free!\n\n```http\nAuthorization : Bearer \u003capi-token\u003e\n```\n\nYou can request a token by sending an email to me or creating an issue in this repository.\n\n## Schema\n\nYou can find the GraphQL Schema [here](https://raw.githubusercontent.com/margostino/anfield-api/master/graph/schema.graphqls)\n\nThe API provides the following:\n- Teams information (e.g. name, short name, code, strength attack, etc.)\n- Players information (e.g. name, teams, points, cost, game stats, etc.)\n- Events information (e.g. kick-off datetime, stats, etc.)\n- Head to Head information with historical games between 2 teams (e.g. team names, team scores, etc.)\n\n## Example of queries\n\n### Get all players\n\n```graphql\n{\n\tplayers {\n\t\twebName\n\t\tteam\n\t\tnews\n\t\tposition\n\t\tchanceOfPlayingNextRound\n\t\texpectedGoals\n\t\tform\t\t\n\t\tnowCost\n\t\tpointsPerGame\n\t\tselectedByPercent\n\t\tselectedRank\n\t\tselectedRankType\n\t\ttotalPoints\n\t\tminutes\n\t\tgoalsScored\n\t\tassists\n\t\tcleanSheets\n\t\tgoalsConceded\n\t\townGoals\n\t\tinfluence\n\t\townGoals\n\t\tictIndex\n\t\tthreat\n\t\tcreativity\n\t\tbonus\n\t\tredCards\n\t\tyellowCards\n\t}\n}\n```\n\n### Get player by name\n\n```graphql\n{\n\tplayer(webName: \"Salah\") {\n\t\twebName\n\t\tteam\n\t\tnews\n\t\tposition\n\t\tchanceOfPlayingNextRound\n\t}\n}\n```\n\n### Get all players of a team\n\n```graphql\n{\n\tplayers(teamShortName: \"LIV\") {\n\t\twebName\n\t\tteam\n\t\tnews\n\t\tposition\n\t\tchanceOfPlayingNextRound\n\t\texpectedGoals\n\t\tform\t\t\n\t\tnowCost\n\t\tpointsPerGame\n\t\tselectedByPercent\n\t\tselectedRank\n\t\tselectedRankType\n\t\ttotalPoints\n\t\tminutes\n\t\tgoalsScored\n\t\tassists\n\t\tcleanSheets\n\t\tgoalsConceded\n\t\townGoals\n\t\tinfluence\n\t\townGoals\n\t\tictIndex\n\t\tthreat\n\t\tcreativity\n\t\tbonus\n\t\tredCards\n\t\tyellowCards\n\t}\n}\n```\n\n# Support\nFor support, issues, or contributions, please visit our GitHub repository.\n\n# License\n\nAnfield API is licensed under the [MIT license](https://github.com/margostino/anfield-api/blob/master/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmargostino%2Fanfield-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmargostino%2Fanfield-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmargostino%2Fanfield-api/lists"}