21 October Mapping IRS 1040 Tax Data with the Zip Code API: A Complete Guide October 21, 2025 By Ricardo Rangel Tutorials 1040, IRS Statistics, Zip Code API Introduction When analyzing local markets, income patterns, or demographic segments, raw IRS data can be a goldmine — but it’s often difficult to interpret and integrate. The IRS 1040 Individual Tax Return dataset contains rich information about how Americans earn and report income across every ZIP code, yet working directly with these files requires significant data wrangling. That’s where the Zip Code API from Metadapi comes in. Our API simplifies access to this information by mapping key IRS 1040 fields to our SOI (Statistics of Income) endpoint. Instead of downloading massive spreadsheets, decoding variable names and cleaning data, developers and analysts can pull precise tax-related metrics for any U.S. ZIP code in seconds. This guide walks you through how the IRS 1040 data is mapped within the Zip Code API, what each field represents, and how to use it effectively for your projects. Understanding the Source: IRS 1040 Data The IRS releases anonymized, aggregated data each year based on the Form 1040 — the U.S. Individual Income Tax Return. This dataset summarizes filing activity and income components by ZIP code, giving an unparalleled look into local economic characteristics. Some examples of what the IRS 1040 data reveals: Number of individual tax returns filed per ZIP code Total and average Adjusted Gross Income (AGI) Number of dependents claimed Distribution of returns by income bracket Types of income (wages, dividends, self-employment, etc.) Total taxable income and total tax paid For marketers, researchers, and developers, these metrics can reveal income distribution patterns, household size trends, and economic vitality at the community level. The Zip Code API Mapping The Zip Code API organizes these IRS metrics into structured, developer-friendly fields that align directly with 1040 variables. Here’s a simplified look at how some of the mappings work: In the below example, we are going to focus on 4 tax return measures. Taxable Interest, Ordinary Dividends, Total Income and Adjusted Gross Income. (Our dataset includes hundreds of different return metrics, but for this example, we'll focus on only 4 of them). The data provided by the IRS is "grouped" into 6 categories based on the size of the adjusted gross income reported: Size of adjusted gross income Id: 1 = $1 under $25,000 2 = $25,000 under $50,000 3 = $50,000 under $75,000 4 = $75,000 under $100,000 5 = $100,000 under $200,000 6 = $200,000 or more Our API documentation includes the mapping reference to both the IRS variable name as well as the Tax form box it relates to. For example, to get AGI (Adjusted Gross Income) we look at field adjustedGrossIncome in the documentation and we find the following information: From there we know that the AGI is related to variable A00100 and you can find this amount on the tax form 1040 Box 11 Looking at the other field documentation, we can find: We found the right fields we are interested in. Now it's time to call the API, using the following endpoint (only for year 2022): https://global.metadapi.com/zipc/v1/zipcodes/90210/soi?year=2022 The JSON response includes all the attributes provided by the IRS, for simplicity we'll format the result in an easy to read table (amounts are in '000) AGI Group ID Zip Code Attribute 1 2 3 4 5 6 Total 90210 returns 1,710 950 730 570 1,330 3,740 9,030 adjustedGrossIncome $ 17,669 $ 34,935 $ 45,672 $ 49,634 $ 191,474 $ 5,664,409 $ 6,003,793 returnsWithTotalIncome 1,710 950 730 570 1,330 3,740 9,030 totalIncomeAmount $ 18,637 $ 36,206 $ 46,927 $ 50,978 $ 196,128 $ 5,721,670 $ 6,070,546 returnsWithTaxableinterest 660 430 360 310 920 3,340 6,020 taxableinterestAmount $ 1,018 $ 1,498 $ 1,920 $ 1,209 $ 6,758 $ 226,152 $ 238,555 returnsWithOrdinaryDividends 550 330 300 270 710 2,780 4,940 ordinaryDividendsAmount $ 2,718 $ 2,878 $ 3,739 $ 4,139 $ 12,605 $ 517,408 $ 543,487 From this result we can now produce all types of analytics or applications that leverage this data. Instead of handling raw column codes like A00200 or N02650, you get intuitive JSON fields ready to integrate into your dashboards, reports, or applications. Why This Mapping Matters 1. Time Savings for Developers The IRS raw data is extremely detailed but not immediately usable. It requires decoding hundreds of field codes and applying proper weighting. The Zip Code API abstracts all of this complexity, letting you access IRS-sourced data in seconds. 2. Consistent Field Definitions Every field in the API corresponds to an exact IRS definition. That means your calculations and visualizations remain accurate and consistent with official government data. 3. Geographic Precision Since the dataset is ZIP code–based, you can zoom into highly localized areas — ideal for comparing neighborhoods, sales territories, or marketing zones. 4. Use Cases Across Industries Marketing & Advertising: Target areas by income level or number of dependents. Real Estate: Identify ZIP codes with higher disposable income or family density. Finance & Lending: Evaluate borrower risk by local average AGI and tax liability. Public Policy & Research: Measure income inequality or economic growth by region. Example Queries and Use Cases Example 1: Compare Income Levels Between Two ZIP Codes https://global.metadapi.com/zipc/v1/zipcodes/94103/soi https://global.metadapi.com/zipc/v1/zipcodes/94016/soi Compare the adjustedGrossIncome and returns fields to measure income concentration between urban and suburban areas. Example 2: Identify ZIP Codes with High Business Income Filter by: "businessOrProfessionalNetIncomeAmount" > 100000000 This helps pinpoint areas with high levels of self-employment or small business activity. Getting Started with the API To explore the mappings and documentation: Visit https://www.metadapi.com/API-Products/Zip-Code-API Sign up for a free developer account. Review the IRS Mapping Documentation section to see every 1040 variable available. Use your API key to query any ZIP code for immediate JSON data. Best Practices for Using IRS-Based Data Normalize for Population Size: Always compare ratios (e.g., AGI per return) rather than raw totals when analyzing across ZIP codes. Combine with Demographics: Layer in population, or census data for richer insights. Respect Data Granularity: IRS data is aggregated to protect privacy, so treat it as indicative rather than exact for individual-level analysis. Conclusion The Zip Code API transforms complex IRS 1040 return data into an accessible, structured format that anyone can use — whether you’re a developer integrating financial indicators, a marketer refining audience profiles, or a researcher studying local economies. By providing clear field mappings between the IRS 1040 dataset and the API’s endpoints, you gain reliable access to official income and tax insights for every ZIP code in the United States — without the need for manual data processing. Explore the documentation today and start building smarter, data-driven applications powered by accurate, IRS-sourced insights. Related Posts The Power of Zip Code Statistics: Leveraging IRS Data for Targeted Market Analysis This blog post introduces the immense potential of zip code statistics for business analysis, highlighting how leveraging IRS data through an API can enable smarter, targeted marketing decisions. Dynamically Invoking REST API with Data Factory This tutorial walks trough the process of setting up a Data Factory Pipeline and invoking a REST API (using the Zip Code API as an example) as a lookup to enhance the data within the pipeline. MSA Codes by Zip Code for Targeted Data Insights In the dynamic landscape of data analysis, harnessing the power of Micro Statistical Area (MSA) codes linked to zip codes opens a myriad of possibilities for insightful exploration. From market research and demographic profiling to targeted marketing strategies, this unique correlation facilitates precision in data analysis. This article delves into the expansive realm of MSA by zip code, shedding light on its diverse applications and how businesses and researchers alike can leverage this invaluable data set for strategic advantage. Top 5 Benefits of Accessing Zip Code Data through an API Accessing zip code data through an API offers significant benefits for businesses and developers looking to leverage data related to Zip Codes. Key advantages include real-time data access for up-to-date insights, precision in targeting through hyper-local information, enhanced data customization, scalability for large-scale analysis, and seamless integration to improve user experience. Get US Population By Zip Code Unlocking the demographic pulse of a region has never been more accessible, thanks to the US Zip Code API services leveraging the rich dataset from the Census Bureau's ZCTAs (ZIP Code Tabulation Areas) population data. In this blog, we embark on a journey to demystify the intricacies of ZCTAs, explore the fusion of Census Bureau data with modern API technology, and showcase the myriad ways in which the Population by Zip Code functionality can be a game-changer for businesses, researchers, and developers alike. Unlocking Local Insights: Income by Zip Code This blog article explores the value of analyzing income by ZIP code for marketers, real estate professionals, and analysts. It outlines how localized income data can drive smarter decisions in targeting, expansion, and performance benchmarking. The post also features a sample Python script that takes a ZIP code, radius, and income threshold as inputs, then identifies nearby ZIP codes with higher-than-threshold average incomes using IRS data. Practical use cases and ideas for extending the script are included to help teams turn raw data into strategic insights. Please enable JavaScript to view the comments powered by Disqus. blog comments powered by Disqus