Income Tax Brackets API - Ruby Gem
Income Tax Brackets is a tool for retrieving US federal income tax bracket data by year. It returns tax rates, income ranges, and standard deductions for all filing statuses.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_incometax'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_incometax
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_incometax'
# Initialize the client
client = APIVerve::Incometax::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({
country: "US",
year: 2024
})
# Print the response
puts response
Error Handling
begin
response = client.execute({ country: "US", year: 2024 })
puts response["data"]
rescue APIVerve::Incometax::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Incometax::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Incometax::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"year": 2025,
"country": "US",
"type": "federal",
"brackets": {
"single": [
{
"rate": 0.1,
"min": 0,
"max": 11925
},
{
"rate": 0.12,
"min": 11926,
"max": 48475
},
{
"rate": 0.22,
"min": 48476,
"max": 103350
},
{
"rate": 0.24,
"min": 103351,
"max": 197300
},
{
"rate": 0.32,
"min": 197301,
"max": 250525
},
{
"rate": 0.35,
"min": 250526,
"max": 626350
},
{
"rate": 0.37,
"min": 626351,
"max": 999999999
}
],
"married_filing_jointly": [
{
"rate": 0.1,
"min": 0,
"max": 23850
},
{
"rate": 0.12,
"min": 23851,
"max": 96950
},
{
"rate": 0.22,
"min": 96951,
"max": 206700
},
{
"rate": 0.24,
"min": 206701,
"max": 394600
},
{
"rate": 0.32,
"min": 394601,
"max": 501050
},
{
"rate": 0.35,
"min": 501051,
"max": 751600
},
{
"rate": 0.37,
"min": 751601,
"max": 999999999
}
],
"married_filing_separately": [
{
"rate": 0.1,
"min": 0,
"max": 11925
},
{
"rate": 0.12,
"min": 11926,
"max": 48475
},
{
"rate": 0.22,
"min": 48476,
"max": 103350
},
{
"rate": 0.24,
"min": 103351,
"max": 197300
},
{
"rate": 0.32,
"min": 197301,
"max": 250525
},
{
"rate": 0.35,
"min": 250526,
"max": 375800
},
{
"rate": 0.37,
"min": 375801,
"max": 999999999
}
],
"head_of_household": [
{
"rate": 0.1,
"min": 0,
"max": 17000
},
{
"rate": 0.12,
"min": 17001,
"max": 64850
},
{
"rate": 0.22,
"min": 64851,
"max": 103350
},
{
"rate": 0.24,
"min": 103351,
"max": 197300
},
{
"rate": 0.32,
"min": 197301,
"max": 250500
},
{
"rate": 0.35,
"min": 250501,
"max": 626350
},
{
"rate": 0.37,
"min": 626351,
"max": 999999999
}
]
},
"standard_deduction": {
"single": 15000,
"married_filing_jointly": 30000,
"married_filing_separately": 15000,
"head_of_household": 22500
},
"lastUpdated": "2026-02-05T04:00:00.000Z"
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://apiverve.com/marketplace/incometax?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.