# FIRMSapi > Pre-filing validation API for U.S. Customs and Border Protection (CBP) FIRMS codes, the 4-character facility codes for piers, container freight stations, bonded warehouses, foreign trade zones and exam sites. It catches codes that are unknown, deleted, in the wrong port or the wrong facility type before ACE rejects the filing (ACE 158, 159, 164), and adds lookup, fuzzy search and nearby search. Data as of 2026-10-23: 14979 active and 8400 deleted codes across 479 ports. FIRMS codes are 4 alphanumeric characters (`^[A-Z0-9]{4}$`); about a third are not a letter plus three digits. Deleted codes are kept and returned with status `D`. The API is at https://api.firmsapi.com/v1, authenticates with an `x-api-key` header, and every response carries `meta.data_as_of`, `meta.source` and `meta.mode`. Test keys (`fapi_test_...`) return fixture data and never count toward quota. FIRMSapi is not affiliated with CBP; filers should confirm details in ACE. ## Docs - [Quickstart](https://docs.firmsapi.com/quickstart/): first call with a test key - [API reference](https://docs.firmsapi.com/reference/): every endpoint, generated from the OpenAPI spec - [Validate before you file](https://docs.firmsapi.com/reference/): which checks run and what to confirm in ACE - [API overview](https://docs.firmsapi.com/reference/) and [usage and quotas](https://docs.firmsapi.com/reference/) - [Docs index for LLMs](https://docs.firmsapi.com/llms.txt) and [full docs text](https://docs.firmsapi.com/llms-full.txt) - [Changelog](https://docs.firmsapi.com/changelog/) ## Pricing - Free: $0/month, 20 live calls/month - Pro: $50/month, 200 live calls/month (batch, changes_feed) - Enterprise: $200/month, 2000 live calls/month (batch, changes_feed, watchlists, webhooks) - Call packs and capped metered overage; over quota returns 429 `quota_exceeded`. Details: https://firmsapi.com/pricing/ ## Data pages - [All FIRMS codes](https://firmsapi.com/codes/): one page per code at https://firmsapi.com/codes/{CODE}/ (for example https://firmsapi.com/codes/E430/) - [Ports](https://firmsapi.com/ports/): codes grouped by CBP port at https://firmsapi.com/ports/{PORT}/ ## Use cases - [Customs brokers](https://firmsapi.com/use-cases/customs-brokers/): Validate the FIRMS code on an entry, in-bond or location-of-goods record against its port and intended use before it goes to ACE. - [Freight forwarders and NVOCCs](https://firmsapi.com/use-cases/freight-forwarders/): Turn the facility names on arrival notices and delivery orders into FIRMS codes, and find the CFS or bonded warehouse closest to a pickup. - [TMS, visibility and customs software teams](https://firmsapi.com/use-cases/logistics-software/): Add FIRMS lookup, autocomplete and validation to your product without maintaining the CBP list yourself. - [Bonded warehouse, CFS and FTZ operators](https://firmsapi.com/use-cases/warehouses-and-ftz/): Confirm how CBP lists your facilities, find every code registered at your address, and get told when one changes. ## Optional - [Sitemap](https://firmsapi.com/sitemap-index.xml) - [Developer portal](https://app.firmsapi.com/): sign up, API keys, usage and billing