{"id":18889475,"url":"https://github.com/peterfritz/tryvia-api","last_synced_at":"2025-08-22T18:13:54.397Z","repository":{"id":160041521,"uuid":"524171984","full_name":"peterfritz/tryvia-api","owner":"peterfritz","description":"API gratuita para trivias em português.","archived":false,"fork":false,"pushed_at":"2024-04-09T17:37:12.000Z","size":335,"stargazers_count":14,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:32:07.667Z","etag":null,"topics":["javascript","nextjs","planetscale","prisma","sql","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://tryvia.ptr.red","language":"TypeScript","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/peterfritz.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}},"created_at":"2022-08-12T17:29:10.000Z","updated_at":"2024-11-28T13:34:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"a32b2d0d-8966-4ac4-87bf-ead6fb62e849","html_url":"https://github.com/peterfritz/tryvia-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peterfritz/tryvia-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftryvia-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftryvia-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftryvia-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftryvia-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterfritz","download_url":"https://codeload.github.com/peterfritz/tryvia-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfritz%2Ftryvia-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271680336,"owners_count":24802074,"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","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["javascript","nextjs","planetscale","prisma","sql","tailwindcss","typescript"],"created_at":"2024-11-08T07:49:07.389Z","updated_at":"2025-08-22T18:13:54.354Z","avatar_url":"https://github.com/peterfritz.png","language":"TypeScript","readme":"\u003chr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eTryvia API\u003c/h1\u003e\n  \u003cp\u003eUma API que te traz perguntas em português de forma rápida.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./public/logo_dark.svg\"\u003e\n    \u003cimg alt=\"Tryvia API logo\" src=\"./public/logo_light.svg\"  height=\"100\"\u003e\n  \u003c/picture\u003e\n\u003c/div\u003e\n\n\u003chr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg alt=\"Typescript\" src=\"https://img.shields.io/badge/TYPESCRIPT-000000?style=for-the-badge\u0026logo=TYPESCRIPT\u0026logoColor=3178C6\" /\u003e\n  \u003cimg alt=\"Vercel\" src=\"https://img.shields.io/badge/VERCEL-000000?style=for-the-badge\u0026logo=VERCEL\u0026logoColor=FFFFFF\" /\u003e\n  \u003cimg alt=\"Next.js\" src=\"https://img.shields.io/badge/NEXT.JS-000000?style=for-the-badge\u0026logo=NEXTDOTJS\u0026logoColor=FFFFFF\" /\u003e\n  \u003cimg alt=\"Turso\" src=\"https://img.shields.io/badge/TURSO-000000?style=for-the-badge\u0026logo=TURSO\u0026logoColor=4FF8D2\" /\u003e\n  \u003cimg alt=\"Drizzle\" src=\"https://img.shields.io/badge/DRIZZLE-000000?style=for-the-badge\u0026logo=DRIZZLE\u0026logoColor=C5F74F\" /\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## Como usar?\n\nEssa API é totalmente compatível com a [Open Trivia Database](https://opentdb.com/).\n\n`https://tryvia.ptr.red/api_category.php` - Lista todas as categorias disponíveis e seus respectivos ids.\n\n`https://tryvia.ptr.red/api_token.php?command=request` - Retorna um token para trazer perguntas que não se repitam (tempo de expiração de 6 horas).\n\n`https://tryvia.ptr.red/api.php?amount=${quantidadeDePerguntas}\u0026token=${token}` - Retorna perguntas de categoria, tipo e dificuldades aleatórias.\n\n```url\nhttps://tryvia.ptr.red/api.php\n    ?amount=${quantidade de perguntas}\n    \u0026category=${null || 0 || id de uma categoria}\n    \u0026type=${null || 0 || multiple || boolean}\n    \u0026difficulty=${null || 0 || easy || medium || hard}\n    \u0026token=${token}\n```\n\nNão enviar um parâmetro ou enviá-lo com o valor 0 trará questões com a propriedade correspondente aleatória.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfritz%2Ftryvia-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterfritz%2Ftryvia-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfritz%2Ftryvia-api/lists"}