SAM.gov · Capability

SAM.gov Public Location Services API — States

SAM.gov Public Location Services API — States. 1 operations. Lead operation: Get List of States and Provinces. Self-contained Naftiko capability covering one Sam.gov business surface.

Run with Naftiko Sam.govStates

What You Can Do

GET
Getstates — Get List of States and Provinces
/v1/locationservices/v1/states

MCP Tools

get-list-states-and-provinces

Get List of States and Provinces

read-only idempotent

Capability Spec

sam-gov-location-services-states.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SAM.gov Public Location Services API — States
  description: 'SAM.gov Public Location Services API — States. 1 operations. Lead operation: Get List of States and Provinces.
    Self-contained Naftiko capability covering one Sam.gov business surface.'
  tags:
  - Sam.gov
  - States
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SAM_GOV_API_KEY: SAM_GOV_API_KEY
capability:
  consumes:
  - type: http
    namespace: sam-gov-location-services-states
    baseUri: https://api.sam.gov
    description: SAM.gov Public Location Services API — States business capability. Self-contained, no shared references.
    resources:
    - name: locationservices-v1-states
      path: /locationservices/v1/states
      operations:
      - name: getstates
        method: GET
        description: Get List of States and Provinces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: api_key
          in: query
          type: string
          description: SAM.gov Federal Government System Account API key
          required: true
        - name: cc
          in: query
          type: string
          description: Country code (ISO 3166-1 alpha-2, e.g. US for United States)
        - name: searchby
          in: query
          type: string
          description: Field to search by (e.g. statename, statecode)
        - name: q
          in: query
          type: string
          description: General query string for state name search
        - name: active
          in: query
          type: string
          description: Filter to active states/provinces only (Y/N)
  exposes:
  - type: rest
    namespace: sam-gov-location-services-states-rest
    port: 8080
    description: REST adapter for SAM.gov Public Location Services API — States. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/locationservices/v1/states
      name: locationservices-v1-states
      description: REST surface for locationservices-v1-states.
      operations:
      - method: GET
        name: getstates
        description: Get List of States and Provinces
        call: sam-gov-location-services-states.getstates
        with:
          api_key: rest.api_key
          cc: rest.cc
          searchby: rest.searchby
          q: rest.q
          active: rest.active
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: sam-gov-location-services-states-mcp
    port: 9090
    transport: http
    description: MCP adapter for SAM.gov Public Location Services API — States. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: get-list-states-and-provinces
      description: Get List of States and Provinces
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: sam-gov-location-services-states.getstates
      with:
        api_key: tools.api_key
        cc: tools.cc
        searchby: tools.searchby
        q: tools.q
        active: tools.active
      outputParameters:
      - type: object
        mapping: $.