> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transparencyhubnetwork.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get results (when visible)

> Tallies and turnout.

Tallies and turnout. The election's **results visibility** setting decides when this is available to a key (live, after close, or after publish); before that the reply is `403 request_failed` with the message *Results are not available yet*. Individual ballots are never exposed.

**Required scope:** `elections:read`

```json 200 theme={null}
{
  "status": "success",
  "data": {
    "results": [
      {
        "question_id": 10,
        "candidate_id": 100,
        "vote_count": 57
      }
    ],
    "turnout": {
      "eligible": 120,
      "voted": 78
    }
  }
}
```


## OpenAPI

````yaml GET /v1/elections/{election_id}/results
openapi: 3.0.3
info:
  title: Transparency Hub Public API
  version: 1.7.0
  description: Key-authenticated REST API for association and chapter integrations.
servers:
  - url: https://api.transparencyhubnetwork.ai/api
  - url: https://testapi.transparencyhubnetwork.ai/api
    description: Test
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/elections/{election_id}/results:
    get:
      summary: Get results (when visible)
      description: Requires scope `elections:read`.
      parameters:
        - name: election_id
          in: path
          required: true
          schema:
            type: integer
        - $ref: '#/components/parameters/chapterId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    $ref: '#/components/schemas/ElectionResults'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    chapterId:
      name: chapter_id
      in: query
      schema:
        type: integer
      description: >-
        Required for association-wide keys; must match the key's chapter for
        chapter-bound keys.
  schemas:
    ElectionResults:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
        turnout:
          type: object
    Error:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          type: string
          enum:
            - error
        code:
          type: string
        message:
          type: string
        details:
          type: object
  responses:
    ValidationError:
      description: validation_error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: insufficient_scope or chapter_forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: not_found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: rate_limited; see Retry-After
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.