{
  "openapi": "3.0.1",
  "info": {
    "title": "LinkedIn Scraper API by SocialScrape",
    "description": "Scrape LinkedIn company pages, company posts, profiles, post search results, video transcripts and the Ad Library as JSON. 8 endpoints in one actor, with the same field names on every platform. Pay per result: no API key and no other account needed.",
    "version": "0.1",
    "x-build-id": "3mnnuTac7qbhL74p4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/socialscrape~linkedin-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-socialscrape-linkedin-scraper-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/socialscrape~linkedin-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-socialscrape-linkedin-scraper-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/socialscrape~linkedin-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-socialscrape-linkedin-scraper-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "Endpoint",
            "enum": [
              "ad_library.search",
              "ad_library.ad",
              "profile",
              "company",
              "company.posts",
              "search.posts",
              "post",
              "post.transcript"
            ],
            "type": "string",
            "description": "What to fetch. The fields below are shared by the endpoints; each endpoint uses only the ones it needs.",
            "default": "company"
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "For ad_library.search: Keyword to search for. For search.posts: Keyword or phrase to look for in public LinkedIn posts."
          },
          "company": {
            "title": "Company",
            "type": "string",
            "description": "Advertiser name. Used by: ad_library.search."
          },
          "company_id": {
            "title": "Company ID",
            "type": "string",
            "description": "LinkedIn company id: the number in linkedin.com/company/<id>. Used by: ad_library.search."
          },
          "countries": {
            "title": "Countries",
            "type": "string",
            "description": "Comma-separated 2-letter countries, \"US,CA,MX\". Used by: ad_library.search."
          },
          "start_date": {
            "title": "Start Date",
            "type": "string",
            "description": "Start date, YYYY-MM-DD. Use with `end_date`. Used by: ad_library.search."
          },
          "end_date": {
            "title": "End Date",
            "type": "string",
            "description": "End date, YYYY-MM-DD. Use with `start_date`. Used by: ad_library.search."
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Two-letter country code (ISO 3166-1) for results that vary by country. Used by: ad_library.search."
          },
          "trim": {
            "title": "Trim",
            "type": "boolean",
            "description": "Smaller response: drops null fields and `extra`.",
            "default": false
          },
          "raw": {
            "title": "Raw",
            "type": "boolean",
            "description": "Also return the platform's original object as `raw`.",
            "default": false
          },
          "max_age_days": {
            "title": "Max Age Days",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Accept a cached result fetched within this many days. It answers faster."
          },
          "url": {
            "title": "URL",
            "type": "string",
            "description": "For ad_library.ad: Ad URL (linkedin.com/ad-library/detail/...). For profile: Profile URL (linkedin.com/in/<slug>). For company, company.posts: Company page URL (linkedin.com/company/<slug>). For post: Post URL (linkedin.com/posts/... or /feed/update/urn:li:activity:...). For post.transcript: Post URL (linkedin.com/posts/...)."
          },
          "id": {
            "title": "ID",
            "type": "string",
            "description": "Ad id in the library. Used by: ad_library.ad."
          },
          "date_posted": {
            "title": "Date Posted",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only posts found in this window. Used by: search.posts."
          },
          "enrich": {
            "title": "Enrich",
            "type": "boolean",
            "description": "Read each post for its full text, author, date and counts (on by default). Off returns only what the search result states, much cheaper and faster. Used by: search.posts.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Follow the cursor for up to this many pages. You pay for the results, not for the pages.",
            "default": 1
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many results. 0 means no limit other than Max pages.",
            "default": 0
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}