{"id":110,"library":"irs-api","title":"IRS API Python Client","description":"Unofficial Python wrapper for accessing IRS (Internal Revenue Service) public data and tax-related information programmatically. Provides convenience methods for retrieving tax forms, instructions, and other IRS public resources.","status":"maintenance","version":"N/A","language":"python","source_language":"en","source_url":"https://pypi.org/project/irs-api/","tags":["irs","tax","government","api","python","forms"],"install":[{"cmd":"pip install requests","lang":"bash","label":"HTTP client (no official PyPI package)"}],"dependencies":[{"reason":"Used for making HTTP requests to IRS endpoints.","package":"requests","optional":false}],"imports":[{"wrong":"from requests import IRS","symbol":"Session","correct":"from requests import Session"},{"symbol":"Request","correct":"from requests import Request"},{"symbol":"Response","correct":"from requests import Response"}],"quickstart":{"code":"import requests\n\n# IRS provides several public REST APIs (no key required for most)\n# Forms and publications search\nresp = requests.get(\n    \"https://www.irs.gov/api/forms-pubs/1040\",\n    headers={\"Accept\": \"application/json\"}\n)\n# IRS APIs may return HTML on error — check content-type before parsing\nif resp.ok and \"application/json\" in resp.headers.get(\"Content-Type\", \"\"):\n    print(resp.json())\nelse:\n    print(f\"Status: {resp.status_code}\")","lang":"python","description":"IRS public APIs are REST-only (no PyPI package). Endpoints vary by service. Always check Content-Type before calling .json() — some endpoints return HTML error pages on failure."},"warnings":[{"fix":"from irs_api import IRS","message":"The pip package name is irs-api but the import module uses an underscore: irs_api. Using 'import irs_api' not 'import irs-api'.","severity":"gotcha","affected_versions":"all"},{"fix":"Implement retry logic and fallback handling in case upstream IRS data sources change.","message":"This is an unofficial wrapper around publicly available IRS data. It is not endorsed or maintained by the IRS. Endpoints may break if the IRS changes their public website structure.","severity":"gotcha","affected_versions":"all"},{"fix":"Check the GitHub repository for any open issues or forks with more recent updates before relying on this in production.","message":"The package has not been updated frequently. The last PyPI release is 0.0.3. API surface may be limited or stale.","severity":"deprecated","affected_versions":"all"},{"fix":"Add delays between requests using time.sleep() and cache results locally to minimize repeated calls.","message":"Rate limiting or IP blocking may occur if too many requests are made to IRS endpoints in a short period.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'access':9 'api':2,38 'client':4 'conveni':23 'data':15 'form':28,40 'govern':37 'inform':20 'instruct':29 'intern':11 'ir':1,10,32,35 'method':24 'programmat':21 'provid':22 'public':14,33 'python':3,6,39 'relat':19 'resourc':34 'retriev':26 'revenu':12 'servic':13 'tax':18,27,36 'tax-rel':17 'unoffici':5 'wrapper':7","created_at":"2026-03-18T03:17:36.493833+00:00","updated_at":"2026-04-16T15:48:19.418139+00:00","problems":null,"ecosystem":"rest","meta_description":null,"install_score":0,"quickstart_score":80,"quickstart_tag":"verified","pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":"stale"}}