TheLayoff APIthelayoff.com ↗
Access TheLayoff.com forum data via API. Retrieve paginated layoff posts by company, full post content, reply threads, view counts, and reaction scores.
What is the TheLayoff API?
The TheLayoff.com API exposes 2 endpoints for reading forum discussions about company layoffs, returning up to 40 posts per page with 10+ fields per post including titles, authors, reaction counts, and reply threads. The get_posts endpoint accepts a company slug — such as apple, google, or amazon — and returns paginated post listings, while get_post_detail retrieves a single post's full text and every reply in the thread.
curl -X GET 'https://api.parse.bot/scraper/7ebc6abd-1ea4-4195-af2a-531a49ef94ff/get_posts?page=1&sort=new&company=apple' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace thelayoff-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""TheLayoff.com — monitor company layoff discussions with typed SDK."""
from parse_apis.thelayoff.com_forum_posts_api import TheLayoff, Sort, PostNotFound
client = TheLayoff()
# List recent posts for a company, sorted by newest. limit= caps total items.
for post in client.company("google").posts(sort=Sort.NEW, limit=5):
print(post.title, post.date_display, f"replies={post.replies}")
# Drill into one post's full detail via .details()
summary = client.company("apple").posts(sort=Sort.ACTIVE, limit=1).first()
if summary:
detail = summary.details()
print(detail.title, detail.author, f"reactions_up={detail.reactions_up}")
for reply in detail.replies[:3]:
print(f" {reply.author}: {reply.content[:80]}")
# Fetch a post directly by ID
try:
post = client.posts.get(post_id="1kq7pfwbw")
print(post.title, post.views, f"replies_count={post.replies_count}")
except PostNotFound as exc:
print(f"Post not found: {exc.post_id}")
print("exercised: company.posts / post_summary.details / posts.get / reply access")
Get a paginated list of forum posts for a specific company's layoff discussion page. Returns post titles, content previews, dates, authors, view counts, reactions, and reply counts. Paginates via integer page number; each page returns up to 40 posts. Sort by newest or most recently active threads.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination (1-based). |
| sort | string | Sort order for posts. |
| company | string | Company slug used in the URL path (e.g., 'apple', 'google', 'amazon', 'meta', 'microsoft', 'tesla'). |
{
"type": "object",
"fields": {
"page": "integer, the current page number",
"sort": "string, the sort order applied",
"posts": "array of post objects with title, url, post_id, content, date, date_display, author, views, reactions_total, reactions_up, reactions_down, replies, last_reply_date",
"company": "string, the company slug used in the request",
"posts_count": "integer, number of posts returned on this page",
"company_title": "string, descriptive title of the company's discussion page",
"has_next_page": "boolean, whether a next page of results exists",
"has_previous_page": "boolean, whether a previous page exists"
},
"sample": {
"data": {
"page": 1,
"sort": "new",
"posts": [
{
"url": "https://www.thelayoff.com/t/1ktpgk7gw",
"date": "2026-06-09T15:39:09Z",
"title": "Even more layoffs coming",
"views": 0,
"author": "Anonymous",
"content": "The news comes in an especially delicate context for tech employment...",
"post_id": "@OP+1ktpgk7gw",
"replies": 0,
"date_display": "1 day ago",
"reactions_up": 0,
"reactions_down": 0,
"last_reply_date": "",
"reactions_total": 0
}
],
"company": "google",
"posts_count": 40,
"company_title": "Topics regarding layoffs at Alphabet Inc. (Google)",
"has_next_page": true,
"has_previous_page": false
},
"status": "success"
}
}About the TheLayoff API
What the API Returns
The get_posts endpoint accepts three optional parameters: company (a URL slug like meta or tesla), page (1-based integer for pagination), and sort (order of results). Each call returns an array of post objects containing title, url, post_id, content (preview), date (ISO 8601), date_display (relative string), author, views, reactions_total, reactions_up, and reply count. The response also includes company_title, posts_count, has_next_page, and has_previous_page to support full traversal of a company's discussion history.
Post Detail and Reply Threads
The get_post_detail endpoint takes a single required parameter, post_id, obtainable from the posts array returned by get_posts. It returns the full content of the original post alongside a replies array. Each reply object includes reply_id, content, date, date_display, author, reactions_total, reactions_up, and reactions_down. This makes it possible to reconstruct entire conversations, not just top-level summaries.
Coverage and Scope
Company slugs correspond to the URL path on TheLayoff.com (e.g., thelayoff.com/apple maps to company: 'apple'). The API covers companies that have an active discussion page on the site. Post IDs may appear with an @OP+ prefix in listing results; the detail endpoint strips this automatically. Each get_posts page returns at most 40 posts, so iterating has_next_page is necessary to collect a full company thread history.
The TheLayoff API is a managed, monitored endpoint for thelayoff.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when thelayoff.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official thelayoff.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track layoff sentiment trends for a specific company by aggregating
reactions_upandreactions_downacross posts over time - Build a layoff news feed that surfaces the latest posts using the
sortparameter anddatefield fromget_posts - Analyze employee morale signals by extracting
contentand reaction counts fromget_post_detailreply threads - Monitor which companies are generating the most discussion by comparing
viewsandreactions_totalacross multiple company slugs - Collect datasets of workforce reduction discussions for labor market research using paginated
get_postsresults - Alert on new layoff threads for a watchlist of companies by polling
has_next_pageand comparingpost_idvalues
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does TheLayoff.com have an official developer API?+
What does `get_post_detail` return beyond the original post?+
content of the original post plus a replies array. Each reply includes reply_id, author, content, date (ISO 8601), date_display, reactions_total, reactions_up, and reactions_down. The views count and title of the original post are also present at the top level.Can I search posts by keyword or date range across all companies?+
get_posts endpoint filters by company slug and sort order, but does not support keyword search or date range filtering. You can fork this API on Parse and revise it to add a search or date-filter endpoint.How does pagination work, and are there gaps in post history?+
get_posts endpoint returns up to 40 posts per page. The response includes has_next_page and has_previous_page booleans to guide iteration. Posts are tied to a single company slug, so you must paginate per company. There is no guarantee that deleted or removed posts from the source forum appear in results.Does the API cover companies not listed in the example slugs?+
company parameter accepts any slug that corresponds to an active discussion page on TheLayoff.com, not just the examples (apple, google, amazon, meta, microsoft, tesla). If a company has no discussion page on the site, the endpoint will return an empty result. Support for discovering the full list of available company slugs is not currently built in; you can fork the API on Parse and revise it to add a company directory endpoint.