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

# Fetch a LinkedIn profile's recent posts

> Fetches recent posts from a LinkedIn profile or company page within a 1/7/30-day window. Not cached; an empty list is a genuine answer, not a miss. Costs 3 credit(s) per call.



## OpenAPI

````yaml /horizon/openapi.json post /v1/linkedin/posts
openapi: 3.1.0
info:
  title: Horizon API
  version: '1.0'
  description: >-
    Horizon is a prepaid-credits REST API for LinkedIn/company enrichment, email
    finding and verification, job search, and web search. Every request
    authenticates with an `Authorization: Bearer <key>` header and, on a billed
    endpoint, debits a fixed number of credits from your prepaid balance (see
    each endpoint's description for its exact cost). Check your balance any time
    with GET /v1/usage.
servers:
  - url: https://horizon.gravitygtm.com/api
security:
  - bearerAuth: []
paths:
  /v1/linkedin/posts:
    post:
      tags:
        - linkedin
      summary: Fetch a LinkedIn profile's recent posts
      description: >-
        Fetches recent posts from a LinkedIn profile or company page within a
        1/7/30-day window. Not cached; an empty list is a genuine answer, not a
        miss. Costs 3 credit(s) per call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkedinPostsRequest'
      responses:
        '200':
          description: 200 — success. Charges 3 credit(s) on this endpoint.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                        content:
                          type: string
                        date:
                          type: string
                        timestamp:
                          type: number
                      additionalProperties: true
                    description: Array of recent posts.
                  credits_charged:
                    type: number
                    description: Normally 3; see per-endpoint miss/skip policy notes.
                  credits_remaining:
                    type: number
                  cached:
                    type: boolean
                    description: >-
                      True when this result was served from cache without
                      calling the vendor.
                  request_id:
                    type: string
                    format: uuid
                required:
                  - data
                  - credits_charged
                  - credits_remaining
                  - cached
                  - request_id
        '401':
          description: >-
            401 unauthorized — missing or invalid `Authorization: Bearer <key>`
            header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: >-
            402 insufficient_credits — not enough credit balance to cover this
            endpoint's price. The vendor is never called.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: 429 rate_limited — per-key fixed-window rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: >-
            502 vendor_error — the upstream vendor call failed or threw. Any
            reserved credits are refunded in full.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            503 vendor_capacity — this endpoint's vendor has hit its global
            daily spend cap. No credits are reserved; try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LinkedinPostsRequest:
      type: object
      properties:
        linkedin_url:
          type: string
          format: uri
        days_back:
          anyOf:
            - type: number
              enum:
                - 1
            - type: number
              enum:
                - 7
            - type: number
              enum:
                - 30
          default: 7
      required:
        - linkedin_url
    ErrorResponse:
      type: object
      description: >-
        Standard error body. Every response (success or error) carries a
        request_id for support reference.
      properties:
        error:
          type: string
          description: Machine-readable error code.
          enum:
            - unauthorized
            - insufficient_credits
            - not_found
            - rate_limited
            - vendor_error
            - vendor_capacity
        message:
          type: string
          description: Human-readable error detail.
        request_id:
          type: string
          format: uuid
        credits_remaining:
          type: number
          description: >-
            Present whenever a post-reservation/refund balance is known for this
            request.
        refund_issue:
          type: boolean
          description: >-
            Set only when a compensating credit refund itself failed (e.g. a
            transient store error) — the customer may have been charged without
            the refund landing yet.
      required:
        - error
        - message
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````