Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

HarvestAPI / Search LinkedIn posts

HarvestAPI tool harvestapi-post-search on looot: input fields, $0.004 per call, output shape, and code to run it with curl, JavaScript or Python.

Search LinkedIn posts by keywords, author, date range, and more.

  • Tool id: harvestapi-post-search
  • Provider: HarvestAPI
  • Job: Search linkedin post (linkedin.post.search)
  • Price: $0.004 per call. A call that fails at the provider costs $0.

Inputs

Name Type Required Description
authorKeywords string no Filter by keywords in authors’ profiles
authorsCompany string no List of LinkedIn companies where authors of posts work (comma-separated). It supports company URLs and IDs.
authorsIndustryId string no List of LinkedIn industry IDs of authors’ companies (comma-separated). It supports industry IDs. Full list of industry IDs: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng.csv
company string no Filter posts by this company URL(s) or company ID(s) (comma-separated). Note: LinkedIn returns fewer results per company when using post search. To extract all posts by a company, use the /linkedin/company-posts endpoint
contentType string no Filter by content type. Supported values: ‘videos’, ‘images’, ‘live_videos’, ‘documents’, ‘collaborative_articles’, ‘jobs’
group string no Group LinkedIn URL or Group ID
mentioningCompany string no Filter posts mentioning this LinkedIn company URL or ID (comma-separated). It supports company URLs and IDs.
mentioningMember string no Filter posts mentioning this LinkedIn profile URL or ID (comma-separated). It supports profile URLs and IDs.
page integer no Page number for pagination
paginationToken string no Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn’t apply for all queries, usually profile posts return this token
postedLimit string no Filter posts by maximum posted date. Supported values: ‘24h’, ‘week’, ‘month’. This parameter will be sent to LinkedIn, the filtering will be done on their side
profile string no Filter posts by author’s profile URL(s) or public identifier(s) or profile ID(s) (comma-separated). Note: LinkedIn returns fewer results per profile when using post search. To extract all posts by a profile, use the /linkedin/profile-posts endpoint
scrapePostedLimit string no Post-Filter posts by maximum posted date. Supported values: ‘1h’, ‘24h’, ‘week’,‘month’, ‘3months’, ‘6months’, ‘year’. This parameter will be applied after receiving results from LinkedIn, the filtering will be done on our side
search string no Keywords to search for in posts
sortBy string no Sort by field. Supported values: ‘relevance’, ‘date’

Output

The run’s result holds the provider’s answer. Signed in, looot inspect harvestapi-post-search prints its fields.

Run it

Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.

Example input with placeholder values:

curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"harvestapi-post-search","input":{},"wait":30}'
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "harvestapi-post-search",
    input: {},
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "harvestapi-post-search",
        "input": {},
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))

To let looot pick among every provider of this job instead, send job:linkedin.post.search as endpointId; see the job page.

Was this page helpful?