{"id":15663212,"url":"https://github.com/melroy89/metacritic_api","last_synced_at":"2025-05-13T00:08:45.213Z","repository":{"id":17885929,"uuid":"20831818","full_name":"melroy89/metacritic_api","owner":"melroy89","description":"PHP Metacritic API - Mirror from my GitLab","archived":false,"fork":false,"pushed_at":"2023-01-19T21:31:42.000Z","size":83,"stargazers_count":77,"open_issues_count":0,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T00:08:20.818Z","etag":null,"topics":["api","crawler","data","metacritic","parser","php","scores","scraper","webscraping"],"latest_commit_sha":null,"homepage":"https://gitlab.melroy.org/melroy/metacritic_api","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melroy89.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}},"created_at":"2014-06-14T12:41:36.000Z","updated_at":"2024-12-30T02:17:49.000Z","dependencies_parsed_at":"2023-02-11T21:20:21.396Z","dependency_job_id":null,"html_url":"https://github.com/melroy89/metacritic_api","commit_stats":null,"previous_names":["danger89/metacritic_api"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melroy89%2Fmetacritic_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melroy89%2Fmetacritic_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melroy89%2Fmetacritic_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melroy89%2Fmetacritic_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melroy89","download_url":"https://codeload.github.com/melroy89/metacritic_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843215,"owners_count":21972873,"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":["api","crawler","data","metacritic","parser","php","scores","scraper","webscraping"],"created_at":"2024-10-03T13:35:53.875Z","updated_at":"2025-05-13T00:08:45.193Z","avatar_url":"https://github.com/melroy89.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metacritic API\n\nUsing this Metacritic API, you are able to search games on [metacritic.com](http://www.metacritic.com).\n\nIt will give you back the metacritic score, users score, genres, rating, developers and much more (see below for an example).\nThe output is in [JSON format](http://us.php.net/manual/en/function.json-decode.php), so it is easy to parse in both PHP or other languages.\n\nBy default it uses the URL prefix: \"http://www.metacritic.com/game/pc/\". If you want to search for Playstation 3 games, just change it to:\n\"http://www.metacritic.com/game/playstation-3\". See [metacritic.php](metacritic.php) file.\n\n## Example\n\nSearching on the PC game called \"The Elder Scrolls V: Skyrim\", \nwill give the following JSON output:\n\n```json\n{\n  \"name\": \"The Elder Scrolls V: Skyrim\",\n  \"metascritic_score\": 94,\n  \"users_score\": 8.2,\n  \"rating\": \"M\",\n  \"genres\": [\n    \"Role-Playing\",\n    \"First-Person\",\n    \"First-Person\",\n    \"Western-Style\"\n  ],\n  \"developers\": [\n    \"Bethesda Game Studios\"\n  ],\n  \"publishers\": \"Bethesda Softworks\",\n  \"release_date\": \"Nov 10, 2011\",\n  \"also_on\": [\n    \"PlayStation 3\",\n    \"Xbox 360\"\n  ],\n  \"also_on_url\": [\n    \"/game/playstation-3/the-elder-scrolls-v-skyrim\",\n    \"/game/xbox-360/the-elder-scrolls-v-skyrim\"\n  ],\n  \"thumbnail_url\": \"http://static.metacritic.com/images/products/games/7/5988ee04196a686e107b46174f94a3ae-98.jpg\",\n  \"cheat_url\": \"http://www.gamefaqs.com/console/pc/code/615805.html\"\n}\n```\n\n## On error\n\nWhen for some reason the page couldn't be loaded / found or parsed, you will get the following JSON response:\n\n```json\n{\"error\":\"Page could not be loaded!\"}\n```\n\nOr when metacritic.php is directly called, without input you will get: `{\"error\": \"Game title is empty\"}`\n\n## Code example\n\nPlease, see [example.php](example.php)\n\nAnother way to access the API is to directly call [metacritic.php](metacritic.php) via the website URL:\n```sh\nmetacritic.php?game_title=Halo%202\n```\n\nBe-aware that the game title needs to be [URL encoded](https://www.w3schools.com/tags/ref_urlencode.asp) to work.\n\nHave fun!\n\n## CI/CD\n\nCode quality is checked in GitLab CI/CD, to avoid regression.\n\nCurrently in the pipeline:\n\n* [Psalm](https://psalm.dev/) - Static analysis tool for PHP\n* [Phpcs](https://github.com/squizlabs/PHP_CodeSniffer) - PHP coding style standard (`phpcbf` command for auto-fix)\n* [Phpmetrics](https://phpmetrics.github.io/PhpMetrics/) - PHP metrics for complexity, object oriented, maintainability and more.\n  * [Latest Metrics Report](https://gitlab.melroy.org/melroy/metacritic_api/-/jobs/artifacts/master/file/report/index.html?job=phpmetrics)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelroy89%2Fmetacritic_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelroy89%2Fmetacritic_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelroy89%2Fmetacritic_api/lists"}