{"id":19517475,"url":"https://github.com/ivkos/sofia-public-transport-api","last_synced_at":"2026-02-11T12:05:24.511Z","repository":{"id":27969567,"uuid":"31462728","full_name":"ivkos/Sofia-Public-Transport-API","owner":"ivkos","description":"Documentation for the Sofia Public Transport API","archived":false,"fork":false,"pushed_at":"2015-02-28T13:27:12.000Z","size":368,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-08T12:44:25.094Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"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/ivkos.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}},"created_at":"2015-02-28T13:00:19.000Z","updated_at":"2024-09-24T20:13:01.000Z","dependencies_parsed_at":"2022-09-04T12:00:35.620Z","dependency_job_id":null,"html_url":"https://github.com/ivkos/Sofia-Public-Transport-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivkos%2FSofia-Public-Transport-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivkos%2FSofia-Public-Transport-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivkos%2FSofia-Public-Transport-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivkos%2FSofia-Public-Transport-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivkos","download_url":"https://codeload.github.com/ivkos/Sofia-Public-Transport-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240766613,"owners_count":19854119,"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":[],"created_at":"2024-11-11T00:03:50.586Z","updated_at":"2026-02-11T12:05:19.489Z","avatar_url":"https://github.com/ivkos.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Sofia Public Transport API\n==========================================\n\n## Description\nThis is an unofficial documentation for the RESTful Web API hosted by the [Sofia Urban Mobility Centre](http://www.sofiatraffic.bg/). It provides information about routes of the metro, buses, trams, trolleys, their stops, and times of arrival.\n\nThis API is currently known to be used in the [SofiaTraffic](https://play.google.com/store/apps/details?id=com.sofiatraffic.android) Android app, developed by the Sofia Urban Mobility Centre.\n\nDocumenting the API would hopefully allow developers to build better third-party apps.\n\n## API\n\n**Base URL**: `http://drone.sumc.bg/api`\n\n### POST **/v1/timing**\nReturns a list of lines and their arrival times for a given stop. For metro stations, use the `/v1/metro/times` endpoint documented below.\n\nRequired parameter:\n\n- `stopCode` — 4-digit stop code, as seen on information plates. Leading zeroes can be omitted.\n\nExample request:\n```json\n{ \"stopCode\": 1338 }\n```\n\nExample response:\n```json\n[\n    {\n        \"timing\": \"13:07:20,\",\n        \"routeId\": 1904,\n        \"type\": 1,\n        \"lineId\": 76,\n        \"lineName\": \"14\"\n    },\n    {\n        \"timing\": \"13:40:49,12:46:34,\",\n        \"routeId\": 1842,\n        \"type\": 1,\n        \"lineId\": 38,\n        \"lineName\": \"12\"\n    }\n]\n```\n\n\n\n### POST **/v1/routes/changes**\nReturns a list of routes. Each route has (among other properties) a type, a name, and a list of points on the map, including where public transport vehicles go, locations of stops, their names, and locations.\n\nOptional parameter:\n\n - `from_date` — UNIX timestamp. Only changes to routes made since this point of time will be returned. If this parameter is not sent, or set to `0`, all routes will be returned.\n\nExample request:\n```json\n{ \"from_date\": 1425073908 }\n```\n\nExample response:\n```json\n{\n    \"new\": [],\n    \"updated\": [\n        {\n            \"routes_id\": 3,\n            \"type\": 2,\n            \"route_name\": \"Дружба-2 - Хаджи Димитър      \",\n            \"line_id\": 1,\n            \"id\": 4,\n            \"line_name\": \"4\",\n            \"points\": [\n                {\n                    \"stop\": 1920,\n                    \"stopCode\": 611,\n                    \"StopName\": \"Ж.к. Дружба 2\",\n                    \"lat\": 42.64,\n                    \"lon\": 23.415833333333,\n                    \"vehicleType\": 2\n                },\n                {\n                    \"lat\": 42.64,\n                    \"lon\": 23.415555555556\n                },\n                {\n                    \"lat\": 42.64,\n                    \"lon\": 23.413888888889\n                },\n                {\n                    \"stop\": 2256,\n                    \"stopCode\": 1930,\n                    \"StopName\": \"Ул. Димитър Пешев\",\n                    \"lat\": 42.640277777778,\n                    \"lon\": 23.412777777778,\n                    \"vehicleType\": 2\n                },\n                {\n                    \"lat\": 42.640277777778,\n                    \"lon\": 23.412222222222\n                }\n            ]\n        }\n    ]\n}\n```\n**Note**: The example response above has been truncated. Actual response is much longer.\n\n\n### GET **/v1/metro/all**\nReturns a list of all metro stations. Response includes their names, stop codes, and locations, among other properties.\n\nExample response:\n```json\n[\n\t{\n        \"id\": 5,\n        \"route_id\": 1,\n        \"code\": 2985,\n        \"point_id\": 105,\n        \"name\": \"Лъвов мост\",\n        \"latitude\": 42.705369,\n        \"longitude\": 23.323891\n    },\n    {\n        \"id\": 19,\n        \"route_id\": 1,\n        \"code\": 3013,\n        \"point_id\": 119,\n        \"name\": \"Сердика\",\n        \"latitude\": 42.697765,\n        \"longitude\": 23.321512\n    }\n]\n```\n**Note**: The example response above has been truncated.\n\n\n### GET **/v1/metro/times/:stationID**\nReturns times of arrival of trains in a metro station. Requires metro station ID (use the `/v1/metro/all` endpoint to obtain it).\n\nExample request:\n\n`GET http://drone.sumc.bg/api/v1/metro/times/19`\n\nExample response:\n```json\n{\n    \"route_1\": \"10:02,10:07,10:09,10:15\",\n    \"route_2\": \"09:55,09:59,10:01,10:05\",\n    \"route_1_name\": \"Джеймс Баучер - Цариградско шосе\",\n    \"route_2_name\": \"Цариградско шосе - Джеймс Баучер\"\n}\n```\n**Note**: The example response above has been truncated.\n\n\n### GET **/v1/config**\nReturns configuration options. Purpose is currently unknown.\n\nExample response:\n```json\n{\n    \"key\": \"test\",\n    \"date\": \"2015-02-28 12:35\",\n    \"range\": 800\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivkos%2Fsofia-public-transport-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivkos%2Fsofia-public-transport-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivkos%2Fsofia-public-transport-api/lists"}