Search and retrieve digitized well log data from state geological survey repositories, primarily the Kansas Geological Survey (KGS) public database and the Digital Well Log Repository (DWLR). Use this skill when the user asks about well logs, wireline log data, gamma ray curves, resistivity logs, neutron-density crossplots, formation evaluation from logs, log-derived porosity or permeability, or needs to access subsurface petrophysical data from public repositories. Trigger for phrases like "well logs for Kansas", "gamma ray log data", "digital wireline logs", "formation tops from well logs", "log-derived porosity", "KGS well data", "petrophysical data from public wells", "LAS file download", "resistivity log for formation", or any request for digitized borehole log data from public geological survey databases. Covers LAS-format digital logs with GR, ILD, NPHI, RHOB, and other curves. Produces log curve summaries and download links.
Queries the Kansas Geological Survey (KGS) public well database REST API to locate digitized wireline well logs, retrieve LAS file metadata, and summarize log curve availability for formation evaluation. Also documents access patterns for other state geological survey log repositories.
The KGS well database REST API is fully public. No API key needed.
Base URL: https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.
The KGS exposes well data through Oracle REST Data Services (ORDS). Endpoints return JSON and follow a consistent pattern.
# county_cd is the 3-digit FIPS code for Kansas counties
# Example: 035 = Cowley County, 177 = Shawnee County (Topeka area)
curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_county_wells_sp?county_cd=035&type=json"
Response fields:
| Field | Description |
|---|---|
kid | KGS internal well ID (use for follow-up queries) |
api_number | 14-digit API well number |
well_name | Well name as reported |
operator | Current operator |
county_name | County name |
latitude | Decimal degrees (NAD83) |
longitude | Decimal degrees (NAD83) |
kb_elev | Kelly bushing elevation (ft) |
td | Total depth (ft) |
spud_date | Spud date |
# kid = KGS well ID from county wells query
curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_well_log_sp?kid=1050066180&type=json"
Response includes log runs with available curve mnemonics, depth ranges, and LAS file download URLs.
# Full 14-digit API number
curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_well_by_api_sp?api_number=15035012340000&type=json"
curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_log_details_sp?log_id=LOG_ID&type=json"
LAS files (Log ASCII Standard) are the standard digital format for wireline log data. The KGS serves LAS 2.0 files directly via HTTP.
# Download LAS file (URL from get_well_log_sp response)
curl -s "https://www.kgs.ku.edu/WellLogs/logs/LAS/NNNNNN.las" -o well.las
# View first 50 lines to inspect header
head -50 well.las
LAS 2.0 file structure:
~VERSION INFORMATION
VERS. 2.0 : CWLS LOG ASCII STANDARD - VERSION 2.0
WRAP. NO : ONE LINE PER DEPTH STEP
~WELL INFORMATION
STRT.FT 1000.0000 : START DEPTH
STOP.FT 5432.0000 : STOP DEPTH
STEP.FT 0.5000 : STEP
NULL. -999.25: NULL VALUE
WELL. SMITH #1 : WELL NAME
API . 15035012340000 : API NUMBER
LAT . 37.8234 : LATITUDE
LONG. -98.1123 : LONGITUDE
~CURVE INFORMATION
DEPT.FT : 1 DEPTH
GR .GAPI : 2 GAMMA RAY
ILD .OHMM : 3 DEEP INDUCTION RESISTIVITY
NPHI.V/V : 4 NEUTRON POROSITY
RHOB.G/C3 : 5 BULK DENSITY
~DATA
1000.0000 42.3 18.4 0.21 2.38
1000.5000 45.1 17.9 0.22 2.36
Null value: -999.25 is the universal LAS null sentinel. Exclude from
statistics and analysis.
For users who prefer a browser workflow:
https://www.kgs.ku.edu/Magellan/well_logs/index.htmlhttps://www.kgs.ku.edu/Magellan/Cgi-bin/servedata.cgihttps://www.kgs.ku.edu/PRS/Strat/For petroleum-relevant counties in Kansas:
| County | FIPS | Key Plays |
|---|---|---|
| Butler | 015 | Producing Hugoton, Central KS Uplift |
| Ellis | 051 | Smoky Hills, Niobrara |
| Finney | 057 | Hugoton gas area |
| Grant | 067 | Hugoton |
| Haskell | 081 | Hugoton |
| Reno | 155 | Central KS |
| Rush | 163 | Central KS Uplift |
| Russell | 167 | Central KS Uplift |
| Seward | 175 | Hugoton |
Use curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_county_list_sp?type=json" to get the full county list if the endpoint is available.
get_county_wells_spget_well_by_api_spget_well_log_sp# Example: find wells in Russell County (FIPS 167)
curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_county_wells_sp?county_cd=167&type=json" \
| jq '.items[] | {kid: .kid, api: .api_number, name: .well_name, td: .td, lat: .latitude, lon: .longitude}'
If the county query returns many wells (>100), add filters or ask the user to specify a smaller area or a well name.
# For a specific KGS well ID
curl -s "https://chasm.kgs.ku.edu/ords/rgws.kgs_well_srvc.get_well_log_sp?kid=KID_HERE&type=json" \
| jq '.items[] | {log_id: .log_id, curves: .curves, depth_from: .depth_from, depth_to: .depth_to}'
Extract the list of curves available (comma-separated mnemonic string) and the LAS download URL.
If the user wants to analyze curves, download the LAS file and parse the
~CURVE section to list available logs, then the ~DATA section for statistics.
curl -s "LAS_URL_FROM_RESPONSE" -o /tmp/well.las
# Show curve inventory
awk '/^~C/,/^~/' /tmp/well.las | head -30
Summarize the curve inventory table and provide download link. If the user wants formation evaluation, use the curve summary to guide interpretation.
## Well Log Summary — [Well Name], [API Number]
**Well Info:**
- Operator: [Operator]
- County: [County], KS
- TD: [depth] ft
- Spud Date: [date]
- Coordinates: [lat], [lon]
### Available Log Runs
| Run | Curves | Top (ft) | Base (ft) | LAS Download |
|-----|--------|----------|-----------|--------------|
| 1 | GR, ILD, NPHI, RHOB, CALI | 500 | 4,200 | [link] |
| 2 | GR, SP, ILD | 200 | 1,100 | [link] |
### Curve Detail (Run 1)
| Mnemonic | Log Type | Unit | Min Value | Max Value | Null Count |
|----------|----------|------|-----------|-----------|------------|
| GR | Gamma Ray | GAPI | 12.3 | 148.7 | 0 |
| ILD | Deep Induction Res | OHMM | 0.8 | 4,250 | 3 |
| NPHI | Neutron Porosity | V/V | 0.03 | 0.42 | 0 |
| RHOB | Bulk Density | G/C3 | 2.10 | 2.71 | 12 |
**Assessment:** Run 1 provides a full suite for formation evaluation including
porosity (NPHI, RHOB) and saturation (ILD). Suitable for neutron-density
crossplot analysis. [n] null values in RHOB suggest minor washout intervals.
See references/api_reference.md for the comprehensive mnemonic table.
Frequently used curves:
| Mnemonic | Full Name | Unit | PE Application |
|---|---|---|---|
| GR | Gamma Ray | GAPI | Shale volume, lithology discrimination |
| SP | Spontaneous Potential | MV | Permeability indicator, correlation |
| ILD | Deep Induction Resistivity | OHMM | Fluid saturation (Sw) |
| ILM | Medium Induction Resistivity | OHMM | Invasion profile |
| MSFL | Micro-Spherically Focused Log | OHMM | Flushed zone Rxo |
| NPHI | Neutron Porosity | V/V or % | Porosity, gas identification |
| RHOB | Bulk Density | G/CC | Porosity, lithology |
| DPHI | Density-derived Porosity | V/V | Porosity (from RHOB) |
| DT | Sonic Transit Time | US/FT | Velocity, compaction, Vp |
| CALI | Caliper | IN | Borehole diameter, washout |
| PE | Photoelectric Factor | B/E | Lithology indicator |
| DEPT | Depth track | FT | Depth reference |
# Density porosity (limestone matrix)
DPHI = (RHOma - RHOB) / (RHOma - RHOfl)
where RHOma = 2.71 g/cc (limestone), RHOfl = 1.00 g/cc (freshwater)
# Neutron-density crossplot porosity (gas correction)
PHIxp = sqrt((DPHI^2 + NPHI^2) / 2)
# Shale volume from gamma ray (linear)
IGR = (GR - GRmin) / (GRmax - GRmin)
Vsh = IGR (linear; Clavier: Vsh = 1.7 - sqrt(3.38 - (IGR + 0.7)^2))
# Water saturation (Archie)
Sw = sqrt((a * Rw) / (PHI^m * Rt))
typical: a=1, m=2, n=2 for clean sandstone
The KGS has the most accessible API. Other states with digital log access:
| State | Agency | Access Method | URL |
|---|---|---|---|
| Kansas | KGS | REST API (JSON) | chasm.kgs.ku.edu |
| Oklahoma | OGS | OGS Oil & Gas Portal | https://www.ogs.ou.edu/OGWebNew/ |
| Texas | BEG | Texas Well Finder | https://txwellfinder.beg.utexas.edu/ |
| West Virginia | WVGES | Pipeline data request | https://www.wvgs.wvnet.edu/pipe2/ |
| Colorado | CGS | Well data portal | https://coloradogeologicalsurvey.org/ |
| North Dakota | NDGS | Well completion query | https://www.dmr.nd.gov/oilgas/ |
| Wyoming | WSGS | Oil & Gas portal | https://www.wsgs.wyo.gov/ |
For WV well logs specifically: WVGES has digitized logs for some wells but does not expose a public REST API. Requests go through the Pipeline web interface at https://www.wvgs.wvnet.edu/pipe2/ or direct contact.
| Condition | Meaning | Action |
|---|---|---|
| ORDS returns Oracle error ORA-XXXX | Invalid parameter or missing required field | Check county_cd is zero-padded 3 digits; verify kid exists |
items array empty | No wells with logs in that county | Try adjacent counties; not all KGS wells have digitized logs |
| LAS URL returns 404 | File moved or deleted | Check KGS web interface for alternate access |
| LAS data parses as all -999.25 | Depth range mismatch or corrupt run | Check STRT/STOP/STEP in header; verify null value sentinel |
Mnemonics non-standard (e.g., RESM, GRLOG) | Older vintage log with aliased names | Cross-reference with standard aliases in references/api_reference.md |
| API number format error | KGS uses 14-digit API; NDIC uses 10-digit | Pad with trailing zeros: 10-digit + "0000" = 14-digit |
NULL.
line in the header.references/api_reference.md lists common aliases.