Suomi.fi Target groups API

Target groups endpoints

GitHub OpenAPI

Operations 1

GET /api/v12/target-groups Paginated list #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/suomi-fi:suomi-fi-target-groups-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

suomi-fi-target-groups-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Suomi Fi Target groups API
  version: 0.1.0
  description: 'Operations tagged Target groups across 2 of this provider''s published API definitions: suomi-fi-ptv-v12-openapi.json, suomi-fi-ptv-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-gw.palvelutietovaranto.suomi.fi
  description: Development server
tags:
- name: Target Groups
  description: Target groups endpoints
paths:
  /api/v12/target-groups:
    get:
      operationId: getTargetGroups
      summary: Paginated list
      tags:
      - Target Groups
      parameters:
      - schema:
          type: integer
          minimum: 1
          maximum: 1000000
          default: 1
        in: query
        name: page
        required: true
        description: Pagination page
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
        in: query
        name: pageSize
        required: true
        description: Pagination page size
      - schema:
          type: boolean
        in: query
        name: isValid
        required: false
        description: Validity of the code used for the filter
      - schema:
          type: array
          items:
            type: string
            format: uri
          uniqueItems: true
          maxItems: 20
        in: query
        name: uris
        required: false
        description: List of URIs to filter by
      - schema:
          type: array
          items:
            type: string
            pattern: ^(?!\.)[a-zA-Z0-9\.]+(?<!\.)$
          uniqueItems: true
          maxItems: 20
        in: query
        name: codes
        required: false
        description: List of codes to filter by
      - schema:
          type: string
        in: query
        name: name
        required: false
        description: Filter by name or part of the name
      security:
      - apiKeyHeader: []
      responses:
        '200':
          description: Target groups response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetGroupsResponse'
        '400':
          description: Problem details response with errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsWithErrorsType'
        '500':
          description: Problem details response type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailsType'
    servers:
    - url: https://api-gw.palvelutietovaranto.suomi.fi
      description: Development server
components:
  schemas:
    ValidationErrorType:
      type: object
      required:
      - message
      properties:
        path:
          type: string
          description: Validation error path
        message:
          type: string
          description: Error message
      description: Validation error type
      title: ValidationErrorType
    ProblemDetailsWithErrorsType:
      type: object
      required:
      - title
      - detail
      - status
      - type
      - requestId
      - instance
      - errors
      properties:
        title:
          type: string
          description: Problem details response title
        detail:
          $ref: '#/components/schemas/ProblemDetailsDetail'
        status:
          $ref: '#/components/schemas/ProblemDetailsStatusCode'
        type:
          $ref: '#/components/schemas/ProblemDetailsErrorType'
        requestId:
          $ref: '#/components/schemas/ProblemDetailsRequestId'
        instance:
          $ref: '#/components/schemas/ProblemDetailsInstance'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorType'
      description: Problem details response with errors
      title: ProblemDetailsWithErrorsType
    ProblemDetailsStatusCode:
      type: integer
      description: Status code
      title: ProblemDetailsStatusCode
    TargetGroupsResponse:
      type: object
      required:
      - page
      - pageSize
      - totalItems
      - totalPages
      - items
      properties:
        page:
          type: integer
          description: Pagination current page
        pageSize:
          type: integer
          description: Pagination current page size
        totalItems:
          type: integer
          description: Total items found
        totalPages:
          type: integer
          description: Total number of pages
        items:
          type: array
          items:
            $ref: '#/components/schemas/TargetGroup'
      description: Target groups response
      title: TargetGroupsResponse
    ProblemDetailsType:
      type: object
      required:
      - title
      - detail
      - status
      - type
      - requestId
      - instance
      properties:
        title:
          type: string
          description: Problem details response title
        detail:
          $ref: '#/components/schemas/ProblemDetailsDetail'
        status:
          $ref: '#/components/schemas/ProblemDetailsStatusCode'
        type:
          $ref: '#/components/schemas/ProblemDetailsErrorType'
        requestId:
          $ref: '#/components/schemas/ProblemDetailsRequestId'
        instance:
          $ref: '#/components/schemas/ProblemDetailsInstance'
      description: Problem details response type
      title: ProblemDetailsType
    ProblemDetailsRequestId:
      type: string
      description: Request identifier
      title: ProblemDetailsRequestId
    TargetGroup:
      type: object
      required:
      - code
      - uri
      - parentUri
      - isValid
      - name
      properties:
        code:
          type: string
          pattern: ^(?!\.)[a-zA-Z0-9\.]+(?<!\.)$
        uri:
          type: string
          format: uri
        parentUri:
          anyOf:
          - type: string
            format: uri
          - type: 'null'
        isValid:
          type: boolean
          description: Validity of target group
        name:
          type: object
          properties:
            fi:
              type: string
            sv:
              type: string
            en:
              type: string
            se:
              type: string
            smn:
              type: string
            sms:
              type: string
          additionalProperties: false
      description: Target group
      title: TargetGroup
    ProblemDetailsErrorType:
      type: string
      description: Type of the error
      title: ProblemDetailsErrorType
    ProblemDetailsInstance:
      type: string
      description: Request instance (url)
      title: ProblemDetailsInstance
    ProblemDetailsDetail:
      type: string
      description: Error details
      title: ProblemDetailsDetail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer auth
    apiKeyHeader:
      name: x-api-key
      in: header
      description: API-key auth
      type: apiKey
externalDocs:
  url: https://kehittajille.suomi.fi/palvelut/palvelutietovaranto/rajapinta-ja-arkkitehtuuriuudistus
  description: PTV - Suomi.fi Service developers documentation
x-refined-from:
- suomi-fi-ptv-v12-openapi.json
- suomi-fi-ptv-openapi.yml
x-tagGroups:
- name: Core
  tags:
  - Service channel
  - Connection
  - General description
  - Organization
  - Service
  - Service collection
- name: Reference data
  tags:
  - Languages
  - Countries
  - Municipalities
  - Regions
  - Wellbeing services counties
  - Postal codes
  - Industrial classes
  - Life events
  - Ontology terms
  - Service classes
  - Target groups
- name: Infrastructure
  tags:
  - Health check