Glossary
Regulatory & DataAPI

API Well Number

A unique 14-digit identifier assigned to every oil and gas well drilled in the United States by the American Petroleum Institute. The API number encodes the state, county, and unique well identifier, and serves as the universal primary key for linking well data across regulatory databases.

The API well number is the universal identifier for oil and gas wells in the United States. Every well drilled since the system was adopted carries a unique API number that follows it through its entire regulatory and production life. It is the primary key that links permit records, wellbore data, production history, completion records, and ownership information across different state and federal databases.

Short Answer

An API well number is the identifier used to connect well records across permits, completions, production, maps, and operator files. It matters because names can change, but the well identifier is usually the best join key.

Structure of the API Number

A full API number contains 14 digits organized into four components:

42  - 101  - 12345  - 00  - 00
↑     ↑       ↑       ↑     ↑
State County  Unique  Sidetrack Perforation
Code  Code    Well ID  Code    Code
  • State Code (2 digits): Texas = 42, New Mexico = 30, Colorado = 05, North Dakota = 33
  • County Code (3 digits): FIPS county code within the state
  • Unique Well ID (5 digits): Sequential number assigned by the state regulatory agency
  • Sidetrack Code (2 digits): 00 for the original wellbore; increments for each sidetrack
  • Perforation Code (2 digits): Identifies specific completion intervals

API-10 vs. API-12 vs. API-14

Different databases use abbreviated forms. API-10 drops the sidetrack and perforation codes. API-12 drops only the perforation code. When joining data across sources, it is critical to standardize to the same length — a mismatch between API-10 and API-14 formats is one of the most common causes of failed data joins in O&G analytics pipelines.

Example Workflow

SourceAPI format problem
Permit tableMay publish API-10 or API-12
Completion tableMay include sidetrack or completion suffix detail
Production tableMay use lease-level or well-level identifiers depending on state
Map layerMay require normalized API format before joining

The first step is not analysis. The first step is making sure the identifier used in each table refers to the same well or wellbore.

Why It Matters for Data Users

The API number is how EnergyNetWatch links production records from the Texas RRC to permit records, completion data, and geographic coordinates. A well's API number does not change when it changes operators, is reworked, or is transferred — making it the only reliable cross-source identifier.

Related terms

Related EnergyNetWatch pages

See this data in the platform

Search 724K+ wells, track operator activity, and run production analytics across 14+ states.

Request access