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

# Calculate Bearing

> Calculate bearing (direction) between two coordinates.



## OpenAPI

````yaml https://api.tinyfn.io/openapi.json get /v1/geo/bearing
openapi: 3.1.0
info:
  title: TinyFn
  description: >-
    Enterprise-grade infrastructure for checking if 4 is even. And other
    utilities.
  version: 1.0.0
servers: []
security: []
paths:
  /v1/geo/bearing:
    get:
      tags:
        - Geolocation Utilities
      summary: Calculate Bearing
      description: Calculate bearing (direction) between two coordinates.
      operationId: calculate_bearing_v1_geo_bearing_get
      parameters:
        - name: lat1
          in: query
          required: true
          schema:
            type: number
            maximum: 90
            minimum: -90
            description: Latitude of start point
            title: Lat1
          description: Latitude of start point
        - name: lon1
          in: query
          required: true
          schema:
            type: number
            maximum: 180
            minimum: -180
            description: Longitude of start point
            title: Lon1
          description: Longitude of start point
        - name: lat2
          in: query
          required: true
          schema:
            type: number
            maximum: 90
            minimum: -90
            description: Latitude of end point
            title: Lat2
          description: Latitude of end point
        - name: lon2
          in: query
          required: true
          schema:
            type: number
            maximum: 180
            minimum: -180
            description: Longitude of end point
            title: Lon2
          description: Longitude of end point
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````