{"id":35060861,"url":"https://github.com/openspending/taxman","last_synced_at":"2025-12-27T10:31:50.446Z","repository":{"id":3153866,"uuid":"4183967","full_name":"openspending/taxman","owner":"openspending","description":"A very early prototype of a universal tax calculator API","archived":false,"fork":false,"pushed_at":"2016-12-18T08:59:46.000Z","size":53,"stargazers_count":14,"open_issues_count":1,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-08T16:29:33.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://taxman.openspending.org","language":"CoffeeScript","has_issues":true,"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/openspending.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":"2012-04-30T15:22:54.000Z","updated_at":"2024-02-25T22:40:58.000Z","dependencies_parsed_at":"2022-08-19T11:42:13.812Z","dependency_job_id":null,"html_url":"https://github.com/openspending/taxman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openspending/taxman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openspending%2Ftaxman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openspending%2Ftaxman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openspending%2Ftaxman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openspending%2Ftaxman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openspending","download_url":"https://codeload.github.com/openspending/taxman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openspending%2Ftaxman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28077501,"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-12-27T02:00:05.897Z","response_time":58,"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":[],"created_at":"2025-12-27T10:31:49.293Z","updated_at":"2025-12-27T10:31:50.437Z","avatar_url":"https://github.com/openspending.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"TaxMan\n======\n\nTaxMan is a very early prototype of a universal tax calculator API. It's\nrunning at \u003chttp://taxman.openspending.org\u003e.\n\nWhat does it do?\n----------------\n\nIt provides a JSON API to find out tax rates for countries around the world,\nand to perform the relevant calculations to work out what tax citizens pay\n(and have paid in the past).\n\nGet a list of jurisdictions currently supported by TaxMan:\n\n    $ curl -s 'taxman.openspending.org'\n    {\n      \"message\": \"Welcome to the TaxMan\",\n      \"jurisdictions\": {\n        \"gb\": \"http://taxman.openspending.org/gb\"\n      }\n    }\n\nGet tax rates for the current year:\n\n    $ curl -s 'taxman.openspending.org/gb'\n    {\n      \"data\": {\n        \"allowances\": {\n          \"personal\": 8105,\n          \"personal_income_limit\": 25400\n        },\n        \"income_tax\": {\n          \"bands\": [\n            {\n              \"width\": 34370,\n              \"rate\": 0.2\n            },\n    ...\n\nGet the UK personal allowance for 2002:\n\n    $ curl -s 'taxman.openspending.org/gb?year=2002' | json data.allowances.personal\n    4615\n\nFind out how much income tax you would pay with a salary of £22,000:\n\n    $ curl -s 'taxman.openspending.org/gb?income=22000' | json calculation.income_tax.total\n    2779\n\nAnd so on. Specify a `callback` GET parameter if you want JSONP back rather than JSON.\n\nHow can I make it better?\n-------------------------\n\nYou can add a tax calculator for your own jurisdiction! Fork this repository\nand add a module for your jurisdiction, using the ISO 3166 two-letter code for\nyour country as a name. For example, if you wanted to add taxes for Spain,\nyou'd create `tax/es/index.coffee`, implementing the `calculate()` function:\n\n    exports.calculate = (params) -\u003e\n      # do your tax calculation...\n\n      return {\n        options: [parsed options]\n        data: [raw data used to perform the tax calculation]\n        calculation: [the tax calculation]\n      }\n\nAt the moment we place no restrictions on what you return from the calculate\nfunction. That said, it is hoped that as we add more jurisdictions we will\nwork out which parts of the API we can standardise. **Consistency** across\njurisdictions is very important if TaxMan is to be useful, and at the moment\nwe are relying entirely on contributors' discipline to ensure it.\n  \nDeveloper details\n-----------------\n\nTo develop, you'll need to have [Node.js](http://nodejs.org)\nand [npm](http://npmjs.org) installed.\n\n### Getting started\n\n    $ npm install .\n\n### Development workflow\n\n    $ grunt\n\nCode styles are checked by [CoffeeLint](http://www.coffeelint.org/) and tests runs by [Mocha](http://mochajs.org/) automatically whenever watched files are changed. These tasks helps you while developing.\n\n### Running the server locally\n\n    $ grunt server\n\nBy `watch` process, the server automatically restarts whenever you change CoffeeScript files.\n\n### Running tests\n\n    $ grunt test\n\nAll tests in `tax/*/test/*.coffee` run. It is expected that you write tests with [Mocha](http://mochajs.org/) and [should.js](http://github.com/visionmedia/should.js).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenspending%2Ftaxman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenspending%2Ftaxman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenspending%2Ftaxman/lists"}