Skip to main content

Posts API

The Posts API allows you to retrieve and filter posts collected by your searches.

Authentication Required

All API requests require authentication. See API Reference for details.

List Posts

Retrieve a paginated list of posts with extensive filtering options.

GET /api/posts

Query Parameters

Required Parameters

ParameterTypeDescription
workspace_idstringThe workspace ID to fetch posts from
search_idsstringComma-separated list of search IDs to filter by

Pagination Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (≥ 1)
page_sizeinteger100Items per page (1-500)
snapshot_timestringcurrent timeISO 8601 timestamp for consistent pagination

Sorting Parameters

ParameterTypeDefaultDescription
sort_bystringposted_atField to sort by: posted_at, created_at, or weight
sort_directionstringdescSort direction: asc or desc

Filter Parameters

ParameterTypeDescription
matchstringAI relevance classification: relevant, not_relevant, unclassified, or combinations (comma-separated). Note: Only works if AI filtering is configured for your searches.
typestringPost types: buying_intent, hiring, thought_leadership, lead_magnet, promotion, announcement, other
sentimentstringSentiment: positive, negative, neutral
authorstringComma-separated author types
langstringComma-separated language codes (e.g., en, es, fr, de)
created_afterstringISO 8601 date (YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS)
created_beforestringISO 8601 date (max 31 days range)
countrystringComma-separated ISO country codes to include
country_excludestringComma-separated ISO country codes to exclude
functionstringFunctions: ENG (Engineering/IT), PRD (Product), MKT (Marketing), SAL (Sales), FIN (Finance), OPS (Operations), HR (Human Resources), CS (Customer Success), LEG (Legal), DA (Data/Analytics), DSN (Design/UX), EDU (Education/Academia), AMB (Ambiguous/Consultant), GEN (General Management), UNMAPPED
function_excludestringFunctions to exclude (same values as above)
authoritystringAuthority levels: L (Executive/C-Level), M (Middle Management), S (Individual Contributors), XS (Junior/Entry-Level), NA (Solopreneur/Freelancer), UNMAPPED
authority_excludestringAuthority levels to exclude (same values as above)
company_sizestringCompany sizes: XXS (1-10), XS (11-50), S (51-200), M (201-500), L (501-1000), XL (1001-5000), XXL (5001+), UNMAPPED
company_size_excludestringCompany sizes to exclude (same values as above)
company_industrystringIndustries: TECH_INFO_MEDIA, FINANCIAL_SERVICES, HEALTH_CARE, PROFESSIONAL_SERVICES, MANUFACTURING, RETAIL, EDUCATION, CONSTRUCTION, CONSUMER_SERVICES, ENTERTAINMENT, TRANSPORTATION_LOGISTICS, ACCOMMODATION_SERVICES, ADMINISTRATIVE_SERVICES, FARMING_RANCHING_FORESTRY, GOV_ADMIN, HOLDING_COMPANIES, OIL_GAS_MINING, REAL_ESTATE_EQUIPMENT, UTILITIES, WHOLESALE, UNMAPPED
company_industry_excludestringIndustries to exclude (same values as above)

Response

{
"items": [
{
"_id": "507f1f77bcf86cd799439011",
"url": "https://linkedin.com/feed/update/...",
"urn": "urn:li:activity:...",
"content": "Post content text...",
"author": {
"name": "John Doe",
"profile_url": "https://linkedin.com/in/johndoe",
"profile_image_url": "https://...",
"description": "Software Engineer at Company",
"username": "johndoe",
"profile_type": "user",
"country_code": "US",
"country": "United States",
"authority": "M",
"function": "ENG",
"company_size": "L",
"company_industry": "Technology",
"company_website": "https://example.com"
},
"posted_at": "2024-01-15T10:30:00Z",
"reaction_count": 42,
"comment_count": 8,
"embedded_content": {
"type": "article",
"url": "https://example.com/article",
"title": "Article Title",
"content": "Preview text...",
"image_url": "https://...",
"thumbnail_url": "https://..."
},
"search_id": "507f1f77bcf86cd799439012",
"workspace_id": "507f1f77bcf86cd799439013",
"classification": {
"type": "post",
"lang": "en",
"sentiment": "positive",
"weight": 0.85
},
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:00Z"
}
],
"total": 1234,
"page": 1,
"page_size": 100,
"pages": 13,
"snapshot_time": "2024-01-15T12:00:00Z"
}

Rate Limiting

  • 60 requests per minute per API key

Example Request

curl -H "X-API-Key: your_api_key_here" \
https://production.viacurrent.com/api/posts?workspace_id=507f1f77bcf86cd799439013&search_ids=507f1f77bcf86cd799439012&page=1&page_size=100&match=relevant&sentiment=positive&country=US,GB

Pagination Best Practices

For consistent pagination across pages:

  1. Make your first request without snapshot_time
  2. Save the snapshot_time value from the response
  3. Use that same snapshot_time value for subsequent page requests
# Page 1
curl -H "X-API-Key: your_api_key_here" \
https://production.viacurrent.com/api/posts?workspace_id=...&search_ids=...&page=1

# Response includes: "snapshot_time": "2024-01-15T12:00:00Z"

# Page 2 - use the same snapshot_time
curl -H "X-API-Key: your_api_key_here" \
https://production.viacurrent.com/api/posts?workspace_id=...&search_ids=...&page=2&snapshot_time=2024-01-15T12:00:00Z

Date Filtering

  • Date range cannot exceed 31 days
  • Use ISO 8601 format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS
  • created_after must be before created_before

Error Responses

400 Bad Request

{
"detail": "invalid_search_id_format"
}

403 Forbidden

{
"detail": "search_507f1f77bcf86cd799439012_not_in_workspace"
}

429 Too Many Requests

{
"detail": "Rate limit exceeded"
}

Filter Values Reference

Post Types

ValueDescription
buying_intentPosts indicating purchase intent or evaluation
hiringJob postings or hiring announcements
thought_leadershipIndustry insights, opinions, expertise sharing
lead_magnetContent offers, webinars, downloads
promotionProduct/service promotions
announcementCompany news, product launches
otherUncategorized posts

Sentiment Values

ValueDescription
positivePositive tone or sentiment
negativeNegative tone or sentiment
neutralNeutral or factual tone

Function Codes

CodeFull NameDescription
ENGEngineering/ITDevelopers, Infrastructure, Security, QA, SRE
PRDProductProduct Management
MKTMarketingMarketing roles
SALSalesAccount Executives, SDRs, Partnerships
FINFinanceAccounting, FP&A
OPSOperationsRevOps, BizOps, Supply Chain
HRHuman ResourcesTalent Acquisition, Recruiting, L&D
CSCustomer SuccessSupport, CX, Services
LEGLegalCounsel, Compliance
DAData/AnalyticsData Science, ML, Analytics, BI
DSNDesign/UXProduct Design, UX Research, UI
EDUEducation/AcademiaProfessors, Lecturers, Researchers
AMBAmbiguousConsultants, Advisors (context-dependent)
GENGeneral ManagementCEO, Founder, President, GM
UNMAPPEDUnknownFunction could not be determined

Authority Levels

CodeLevelDescription
LExecutiveC-level, Founder, Owner, VP, Head of function
MMiddle ManagementManager, Team Lead, Department Manager
SIndividual ContributorStandard roles, unclear seniority
XSJuniorJunior, Intern, Student, Entry-level
NAIndependentSolopreneur, Consultant, Advisor, Freelancer
UNMAPPEDUnknownAuthority level could not be determined

Company Sizes

CodeRangeEmployees
XXSNano1-10
XSMicro11-50
SSmall51-200
MMedium201-500
LLarge501-1,000
XLEnterprise1,001-5,000
XXLMega5,001+
UNMAPPEDUnknownSize could not be determined

Industry Codes

CodeIndustry
TECH_INFO_MEDIATechnology, Information and Media
FINANCIAL_SERVICESFinancial Services
HEALTH_CAREHospitals and Health Care
PROFESSIONAL_SERVICESProfessional Services
MANUFACTURINGManufacturing
RETAILRetail
EDUCATIONEducation
CONSTRUCTIONConstruction
CONSUMER_SERVICESConsumer Services
ENTERTAINMENTEntertainment Providers
TRANSPORTATION_LOGISTICSTransportation, Logistics, Supply Chain
ACCOMMODATION_SERVICESAccommodation Services
ADMINISTRATIVE_SERVICESAdministrative and Support Services
FARMING_RANCHING_FORESTRYFarming, Ranching and Forestry
GOV_ADMINGovernment Administration
HOLDING_COMPANIESHolding Companies
OIL_GAS_MININGOil, Gas, and Mining
REAL_ESTATE_EQUIPMENTReal Estate and Equipment Rental
UTILITIESUtilities
WHOLESALEWholesale
UNMAPPEDUnknown