{"id":15693787,"url":"https://github.com/andrevarandas/transportes-portugal-api","last_synced_at":"2025-06-29T18:32:23.744Z","repository":{"id":33923346,"uuid":"163622016","full_name":"AndreVarandas/transportes-portugal-api","owner":"AndreVarandas","description":"🚂 Portuguese public transportation data from GTFS to a rest API.","archived":false,"fork":false,"pushed_at":"2025-02-05T15:24:00.000Z","size":741,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-08T06:48:07.852Z","etag":null,"topics":["gtfs","opendata","portugal","rest-api","transportes"],"latest_commit_sha":null,"homepage":"","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/AndreVarandas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"2018-12-30T22:32:43.000Z","updated_at":"2025-02-05T15:24:03.000Z","dependencies_parsed_at":"2025-03-11T19:44:55.295Z","dependency_job_id":null,"html_url":"https://github.com/AndreVarandas/transportes-portugal-api","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/AndreVarandas/transportes-portugal-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreVarandas%2Ftransportes-portugal-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreVarandas%2Ftransportes-portugal-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreVarandas%2Ftransportes-portugal-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreVarandas%2Ftransportes-portugal-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreVarandas","download_url":"https://codeload.github.com/AndreVarandas/transportes-portugal-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreVarandas%2Ftransportes-portugal-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262647094,"owners_count":23342583,"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":["gtfs","opendata","portugal","rest-api","transportes"],"created_at":"2024-10-03T18:48:55.071Z","updated_at":"2025-06-29T18:32:23.724Z","avatar_url":"https://github.com/AndreVarandas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transportes Portugal API 🚂\n\n![](https://travis-ci.com/AndreVarandas/transportes-portugal-api.svg?token=Qxpxo4Qy2WURs7b8zWyM\u0026branch=master)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n![](https://badges.greenkeeper.io/andrevarandas/transportes-portugal-api.svg?style=flat)\n\nAll the available data about the major public transportation providers of Portugal from GTFS (General Transit Feed Specification)\nto a rest API.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.\n\n### Prerequisites\n\nThe project will not work without the following prerequisites:\n\n- [Node \u003e= 9](https://nodejs.org/en/download/)\n\n- [MongoDb](https://www.mongodb.com/download-center/community)\n\nOptional\n\n- [Postman](https://www.getpostman.com/) - The api only accepts post requests, postman is a good tool to test api's.\n\n### Installing\n\nInstall with\n\n```\nnpm install\n```\n\nStart the development server\n\n```\nnpm run dev\n```\n\n**Important**\n\nBy default, importing data is disabled by the env variable `SKIP_IMPORT=true`. \n\nOn your very first run, you may want to\n**remove** this variable, in order to get some data.\n\n**Try it out**\n\nGo to [http://localhost:3000](http://localhost:3000) to check that the app is running.\n\nOpen *Postman* and send an empty POST to `http://localhost:3000/api/v1/agencies` to get all the available providers. \n\n## Deployment\n\nBuild a production ready package with\n\n```\nnpm run build\n```\n\nAnd start the production package with\n\n```\nnpm start\n```\n\n## Current Agencies\n\n- **Comboios de Portugal** - agency_key: 'cp'\n- **Metro de Lisboa** - agency_key: 'metro-lisboa'\n- **Carris** - agency_key: 'carris'\n- **Fertagus**- agency_key: 'fertagus'\n- **Soflusa** - agency_key: 'soflusa'\n- **Sulfertagus** - agency_key: 'sulfertagus'\n- **Transtejo** - agency_key: 'transtejo'\n- **Rodoviária** de Lisboa - agency_key: 'rodoviaria-de-lisboa'\n- **Transportes** Sul do Tejo - agency_key: 'tst'\n- **STCP** - Sociedade de Transportes Colectivos do Porto - agency_key: 'stcp'\n- **Metro do Porto** - agency_key: 'metro-porto'\n\n## Examples\n\nQuerying for an agency POST `/agencies`\n\n```javascript\n// Get one agency by agency key\nfetch('http://localhost:3000/api/v1/agencies', {\n\tmethod: 'POST',\n\theaders: {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n    },\n\tbody: JSON.stringify({ \n\t    query: { agency_key: 'metro-lisboa' } \n\t})\n})\n    .then(res =\u003e res.json())\n    .then(resp =\u003e console.log(resp))\n    \n// Will log details about the agency.\n```\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/AndreVarandas/transportes-portugal-api/blob/master/.github/CODE_OF_CONDUCT.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/andrevarandas/transportes-portugal-api/tags). \n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrevarandas%2Ftransportes-portugal-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrevarandas%2Ftransportes-portugal-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrevarandas%2Ftransportes-portugal-api/lists"}