Service Online
⏱️ Latency: 23ms
πŸ“Š Uptime: 99.99%
πŸ”’ TLS 1.3
πŸ“¦ v2.0.0 OGC

GetCapabilities #

Retrieves the WFS capabilities document describing the available operations, layers, coordinate reference systems, and output formats.

GET /wfs?service=WFS&version=2.0.0&request=GetCapabilities β–Ό

Description

Returns an XML document conforming to the OGC Web Feature Service β€” Part 1: Core specification. This document lists all supported operations, feature types, coordinate reference systems, and output formats.

Parameters

Parameter Type Required Description
service string Required Must be WFS
version string Required WFS version: 2.0.0, 1.1.0, 1.0.0
request string Required Must be GetCapabilities
acceptFormats string Optional Comma-separated list of output MIME types

Example Response

XML 200 OK
<wfs:WFS_Capabilities xmlns:wfs="http://www.opengis.net/wfs/2.0"> <Service> <Name>WFS</Name> <Title>GeoServer Web Feature Service</Title> <Abstract>OGC-compliant WFS 2.0.0 service</Abstract> <OnlineResource>https://api.geoserver.io/wfs</OnlineResource> <Operations> <Operation><Name>GetCapabilities</Name></Operation> <Operation><Name>DescribeFeatureType</Name></Operation> <Operation><Name>GetFeature</Name></Operation> <Operation><Name>Transaction</Name></Operation> </Operations> </Service> <FeatureTypeList> <FeatureType> <Name>topp:states</Name> <Title>US States</Title> <CRS> <Default>urn:ogc:def:crs:EPSG::4269</Default> </CRS> <ows:WGS84BoundingBox> <LowerCorner>-179.15 24.96</LowerCorner> <UpperCorner>-66.96 49.38</UpperCorner> </ows:WGS84BoundingBox> </FeatureType> </FeatureTypeList> </wfs:WFS_Capabilities>

DescribeFeatureType #

Returns the XML Schema (XSD) definition for one or more feature types, describing their attributes, types, and geometry elements.

GET /wfs?service=WFS&version=2.0.0&request=DescribeFeatureType&typeNames=topp:states β–Ό

Parameters

Parameter Type Required Description
typeNames string Required Comma-separated list of feature type names (e.g., topp:states)
outputFormat string Optional application/vnd.ogc.wfs_xml (default), application/json

Example Response

XML Schema 200 OK
<xsd:schema xmlns:topp="http://www.thetagcompany.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" targetNamespace="http://www.thetagcompany.com"> <xsd:element name="states" type="topp:statesType"/> <xsd:complexType name="statesType"> <xsd:complexContent> <xsd:extension base="gml:AbstractFeatureType"> <xsd:sequence> <xsd:element ref="gml:boundedBy" minOccurs="0"/> <xsd:element ref="topp:the_geom" minOccurs="0"/> <xsd:element name="STATE_NAME" type="xsd:string"/> <xsd:element name="STATE_FIPS" type="xsd:string"/> <xsd:element name="STATE_ABBR" type="xsd:string"/> <xsd:element name="LAND_KM" type="xsd:double"/> <xsd:element name="WATER_KM" type="xsd:double"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:schema>

GetFeature #

Retrieves feature data from one or more feature types. Supports attribute filtering, bounding box queries, pagination, and multiple output formats.

GET /wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp:states&outputFormat=application/json β–Ό

Parameters

Parameter Type Required Description
typeNames string Required Comma-separated feature type names
outputFormat string Optional application/json, application/gml+xml, application/vnd.google-earth.kml+xml, text/csv
count integer Optional Maximum number of features to return
startIndex integer Optional Starting index for pagination (default: 0)
bbox string Optional Bounding box filter: minx,miny,maxx,maxy[,srsName]
propertyName string Optional Comma-separated list of properties to return
srsName string Optional Coordinate reference system (e.g., EPSG:4326)
sortby string Optional Sort features by property (e.g., STATE_NAME ASC)
filter XML Optional OGC Filter XML (POST only, use body parameter)

Example Response (GeoJSON)

JSON 200 OK
{"type": "FeatureCollection", "features": [ { "type": "Feature", "id": "states.1", "geometry": { "type": "Polygon", "coordinates": [[[-156.01, 21.97], [-156.04, 22.07], [-156.81, 22.16], [-157.34, 21.72], [-157.27, 19.05], [-156.56, 18.91], [-155.92, 19.35], [-156.01, 21.97]]] }, "properties": { "STATE_NAME": "Hawaii", "STATE_FIPS": "15", "STATE_ABBR": "HI", "LAND_KM": 10932, "WATER_KM": 757 } }, { "type": "Feature", "id": "states.2", "geometry": { "type": "MultiPolygon", "coordinates": [...] }, "properties": { "STATE_NAME": "Alaska", "STATE_FIPS": "02", "STATE_ABBR": "AK", "LAND_KM": 1476848, "WATER_KM": 49329 } } ], "totalFeatures": 52 }
POST /wfs β–Ό

Description

Use POST for complex queries including OGC Filter expressions, large result sets, or when request URL length exceeds limits. The request body contains the WFS operation as XML.

Example Request Body

POST Body β€” XML
<wfs:GetFeature service="WFS" version="2.0.0" count="10" startIndex="0" outputFormat="application/json" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:swe="http://www.opengis.net/swe/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <wfs:Query typeNames="topp:states"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyIsGreaterThan> <ogc:PropertyName>LAND_KM</ogc:PropertyName> <ogc:Literal>500000</ogc:Literal> </ogc:PropertyIsGreaterThan> </ogc:Filter> </wfs:Query> </wfs:GetFeature>

Transaction #

Create, update, or delete features. Requires authenticated access with appropriate write permissions.

POST /wfs β–Ό

Authentication

All transaction operations require authentication. Include an API key in the header:

HTTP Header
Authorization: Bearer YOUR_API_KEY Content-Type: application/xml

Insert Example

POST Body β€” Insert
<wfs:Transaction service="WFS" version="2.0.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:topp="http://www.thetagcompany.com"> <wfs:Insert> <topp:states> <topp:the_geom> <gml:Point srsName="EPSG:4326"> <gml:coordinates>-73.935,40.730</gml:coordinates> </gml:Point> </topp:the_geom> <topp:STATE_NAME>New York</topp:STATE_NAME> <topp:STATE_FIPS>36</topp:STATE_FIPS> </topp:states> </wfs:Insert> </wfs:Transaction>

Supported Operations

Operation Description Auth Required
Insert Create new features Yes
Update Modify existing feature properties Yes
Delete Remove features by OGC Filter or feature ID Yes

Available Feature Types #

All published feature types accessible via this WFS endpoint.

πŸ—ΊοΈ

topp:states

US State boundaries with demographic attributes

52 features EPSG:4269
πŸ›£οΈ

topp:roads

Road network across Tasmania, Australia

12,847 features EPSG:4326
🏘️

topp:tasmania_towns

Towns and settlements in Tasmania

31 features EPSG:4326
πŸ“

topp:tasmania_state_boundaries

State boundary polygons for Tasmania

1 feature EPSG:4326

Query Builder #

Construct and test WFS GetFeature requests interactively.

βš™οΈ Build a Query

200 OK (142ms)
Generated URL
Response Preview

Code Examples #

Integrate with GeoServer WFS from your preferred language or framework.

Terminal
# GetCapabilities curl "https://api.geoserver.io/wfs?service=WFS&version=2.0.0&request=GetCapabilities" # GetFeature as GeoJSON curl "https://api.geoserver.io/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp:states&outputFormat=application/json&count=10" # Bounding box query curl "https://api.geoserver.io/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp:states&bbox=-120,30,-70,50,EPSG:4326&outputFormat=application/json" # POST with filter curl -X POST https://api.geoserver.io/wfs \ -H "Content-Type: application/xml" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '<wfs:GetFeature...>...</wfs:GetFeature>'
Python
import requests from owslib.wfs import WebFeatureService # Using OWSLib wfs = WebFeatureService(url='https://api.geoserver.io/wfs', version='2.0.0') # List available layers for layer in wfs.contents: print(layer, wfs[layer].title) # Query features response = wfs.getfeature( typename=['topp:states'], outputFormat='application/json', maxfeatures=10 ) import json features = json.loads(response.read()) for f in features['features']: print(f['properties']['STATE_NAME']) # Using requests directly url = 'https://api.geoserver.io/wfs' params = { 'service': 'WFS', 'version': '2.0.0', 'request': 'GetFeature', 'typeNames': 'topp:states', 'outputFormat': 'application/json', 'count': 5 } r = requests.get(url, params=params) data = r.json() print(f"Total: {data['totalFeatures']} features")
JavaScript / Node.js
// Browser fetch const url = 'https://api.geoserver.io/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp:states&outputFormat=application/json&count=10'; const response = await fetch(url); const data = await response.json(); console.log(`Total: ${data.totalFeatures} features`); data.features.forEach(f => { console.log(f.properties.STATE_NAME); }); // Node.js with axios const axios = require('axios'); const { data } = await axios.get('https://api.geoserver.io/wfs', { params: { service: 'WFS', version: '2.0.0', request: 'GetFeature', typeNames: 'topp:states', outputFormat: 'application/json', count: 10 } }); console.log(data.features.length);
Leaflet + GeoJSON
// Add WFS layer to Leaflet map const map = L.map('map').setView([39.8283, -98.5795], 4); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map); fetch('https://api.geoserver.io/wfs?service=WFS&version=2.0.0&request=GetFeature&typeNames=topp:states&outputFormat=application/json') .then(r => r.json()) .then(data => { L.geoJSON(data, { style: feature => ({ fillColor: '#00b4d8', color: '#0f4c75', weight: 1, fillOpacity: 0.4 }), onEachFeature: (feature, layer) => { layer.bindPopup(`<strong>${feature.properties.STATE_NAME}</strong><br/>Area: ${feature.properties.LAND_KM.toLocaleString()} kmΒ²`); } }).addTo(map); });

Output Formats #

Supported output formats for GetFeature and DescribeFeatureType operations.

Format MIME Type GetFeature DescribeFeatureType Notes
GeoJSON application/json βœ“ β€” Recommended for web applications
GML 3.2 application/gml+xml βœ“ βœ“ OGC standard format (default)
KML application/vnd.google-earth.kml+xml βœ“ β€” Compatible with Google Earth
CSV text/csv βœ“ β€” Tabular data export
SHAPE-ZIP application/zip βœ“ β€” Esri Shapefile archive