{"id":20807316,"url":"https://github.com/pingiun/urlshorten","last_synced_at":"2026-05-04T00:32:54.305Z","repository":{"id":105868322,"uuid":"76749365","full_name":"pingiun/urlshorten","owner":"pingiun","description":"A super tiny url shortener with a simple API","archived":false,"fork":false,"pushed_at":"2019-04-30T11:11:39.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T08:33:19.393Z","etag":null,"topics":["docker","docker-compose","flask","mit-license","rest-api","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"Python","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/pingiun.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":"2016-12-17T22:13:48.000Z","updated_at":"2019-04-30T11:11:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"d09c779e-5ddc-4c97-955f-d6080d56f518","html_url":"https://github.com/pingiun/urlshorten","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pingiun/urlshorten","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingiun%2Furlshorten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingiun%2Furlshorten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingiun%2Furlshorten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingiun%2Furlshorten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingiun","download_url":"https://codeload.github.com/pingiun/urlshorten/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingiun%2Furlshorten/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32590268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","docker-compose","flask","mit-license","rest-api","url-shortener"],"created_at":"2024-11-17T19:35:05.580Z","updated_at":"2026-05-04T00:32:54.269Z","avatar_url":"https://github.com/pingiun.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# urlshorten\nA super tiny url shortener with a simple API\n\n## Running\nurlshorten is a simple Flask app, so it can run anywhere you have python. \nI also made a Dockerfile and docker-compose.yml if you like containers.\nJust run `docker-compose up` if you want to try that out.\n\nIf you are testing, you can use requirements-testing.txt because it doesn't\ninclude psycopg2. Then just run `python3 urlshorten.py`, or\n`FLASK_APP=urlshorten.py flask run`. Be sure to supply the environment\nvariables DB_URL and GLOBAL_RATELIMIT as well.\n\n## API\n\n### POST /urls/\n#### Parameters\n- `url=https://example.com`: The long url you want to shorten\n- `secret=false`: Secret urls are longer and hidden from the /urls overview\n\nReturns a json blob that looks like this, where 's' the shortened url:\n```json\n{\n  \"status\": 200,\n  \"message\": \"s\"\n}\n```\n#### Errors\n- 400 'Use the argument \\`url\\`': You didn't supply the url argument\n- 400 'Not a valid url': The url wasn't matched by the url regex\n- 500 'Some error message': There was an internal error\n\n### GET /urls/\n#### Parameters\n- `page=1`: The page for the result. (Pages are 25 urls long.)\n\nReturns a list of shortened urls (excluding secret urls) that looks like this:\n```json\n{\n  \"status\": 200,\n  \"message\": {\n    \"s\": \"https://example.com\"\n  }\n}\n```\n#### Errors\n- 500 'Some error message': There was an internal error\n\n### GET /urls/\\\u003curl_id\\\u003e\nReturns a the long url for the url_id:\n```json\n{\n  \"status\": 200,\n  \"message\": \"https://example.com\"\n}\n```\n\n#### Errors\n- 404 'Not found': The requested url_id was not found\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingiun%2Furlshorten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpingiun%2Furlshorten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingiun%2Furlshorten/lists"}