SAM.gov · Capability

SAM.gov Public Location Services API — Cities

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

Run with Naftiko Sam.govCities

What You Can Do

GET
Getcities — Get List of Cities
/v1/locationservices/v1/cities

MCP Tools

get-list-cities

Get List of Cities

read-only idempotent

Capability Spec

sam-gov-location-services-cities.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: SAM.gov Public Location Services API — Cities
  description: 'SAM.gov Public Location Services API — Cities. 1 operations. Lead operation: Get List of Cities. Self-contained
    Naftiko capability covering one Sam.gov business surface.'
  tags:
  - Sam.gov
  - Cities
  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-cities
    baseUri: https://api.sam.gov
    description: SAM.gov Public Location Services API — Cities business capability. Self-contained, no shared references.
    resources:
    - name: locationservices-v1-cities
      path: /locationservices/v1/cities
      operations:
      - name: getcities
        method: GET
        description: Get List of Cities
        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. cityname, citycode)
        - name: searchvalue
          in: query
          type: string
          description: Value to search for
        - name: q
          in: query
          type: string
          description: General query string for city name search
        - name: active
          in: query
          type: string
          description: Filter to active cities only (Y/N)
        - name: citycode
          in: query
          type: string
          description: City code to filter by
  exposes:
  - type: rest
    namespace: sam-gov-location-services-cities-rest
    port: 8080
    description: REST adapter for SAM.gov Public Location Services API — Cities. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/locationservices/v1/cities
      name: locationservices-v1-cities
      description: REST surface for locationservices-v1-cities.
      operations:
      - method: GET
        name: getcities
        description: Get List of Cities
        call: sam-gov-location-services-cities.getcities
        with:
          api_key: rest.api_key
          cc: rest.cc
          searchby: rest.searchby
          searchvalue: rest.searchvalue
          q: rest.q
          active: rest.active
          citycode: rest.citycode
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: sam-gov-location-services-cities-mcp
    port: 9090
    transport: http
    description: MCP adapter for SAM.gov Public Location Services API — Cities. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: get-list-cities
      description: Get List of Cities
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: sam-gov-location-services-cities.getcities
      with:
        api_key: tools.api_key
        cc: tools.cc
        searchby: tools.searchby
        searchvalue: tools.searchvalue
        q: tools.q
        active: tools.active
        citycode: tools.citycode
      outputParameters:
      - type: object
        mapping: $.