The Star Malaysia API endpoint
Returns public The Star (Malaysia) story metadata and body paragraphs from a canonical story URL. Metered and premium stories return only the public teaser paragraphs the server shows anonymous readers, flagged with paywalled; a story with no readable teaser returns a permission error.
/thestarmy/articleQuery parameter: url is a canonical HTTPS story URL on thestar.com.my or www.thestar.com.my whose path ends in a dated segment, /<section>/[<sub-section>/]YYYY/MM/DD/<slug>, e.g. https://www.thestar.com.my/news/nation/2026/09/25/ros-freeze-could-rattle-pn-prep. Section pages, author pages, the home page, other hosts (including the unrelated Toronto Star at thestar.com) and non-HTTPS URLs return an invalid-params error. Query strings and fragments are dropped.
The endpoint returns public metadata (title, description, published_at, updated_at, section, authors, image_url) and the body paragraphs (story text only; photo captions, embedded widgets and the subscription prompt are not included). published_at is the exact Malaysia-time stamp printed in the story header when it has one. authors is the byline (The Star prints bylines in upper case); a story without a byline names its publisher or wire agency, for example The Star or Reuters. Invisible soft-hyphen and zero-width characters The Star's CMS embeds in text are removed; hyphenation that The Star's print layout leaves as an ordinary hyphen inside a word (for example infor-mation in some letters) is returned as published.
Paywall behavior: The Star meters and gates part of its content (StarBiz Premium and metered stories). An anonymous reader is served only a short public teaser, typically two paragraphs, followed by a subscription prompt. For those stories paywalled is true and paragraphs holds exactly that teaser; the endpoint never attempts to unlock a story. A story whose page carries a paywall marker and no readable teaser at all returns a permission error (403). paywalled is omitted for free stories. A real gated example is https://www.thestar.com.my/business/business-news/2024/04/08/consumers-forecast-to-spend-cautiously-this-year (metered StarBiz story: two teaser paragraphs, paywalled: true); sponsored (Branded) stories are served in full and are not flagged. An unknown story returns a not-found error.
Example response (truncated):
{"code":200,"data":{"url":"https://www.thestar.com.my/business/business-news/2024/04/08/consumers-forecast-to-spend-cautiously-this-year","title":"Consumers forecast to spend cautiously this year","description":"PETALING JAYA: Consumers are anticipated to tread cautiously in terms of spending as they face escalating cost of living and economic uncertainty, with projections of a modest uptick in private consumption this year.","published_at":"2024-04-07T16:00:00Z","section":"Economy","authors":["The Star"],"paywalled":true,"paragraphs":["PETALING JAYA: Consumers are anticipated to tread cautiously in terms of spending as they face escalating cost of living and economic uncertainty, with projections of a modest uptick in private consumption this year.","Kenanga Research forecasts private consumption to grow 5.8% in 2024 versus 4.7% recorded in the previous year."]}}
| Field | In the sample | Value in the sample |
|---|---|---|
| url | Has a value | thestar.com.my |
| title | Has a value | 48 characters |
| description | Has a value | 216 characters |
| published_at | Has a value | 2024-04-07 |
| updated_at | Has a value | 2024-04-07 |
| section | Has a value | “Economy” |
| authors | Has a value | 1 entry |
| image_url | Has a value | apicms.thestar.com.my |
| paywalled | Has a value | true |
| paragraphs | Has a value | 2 entries |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| url | string | Yes | Canonical The Star (Malaysia) story URL | https://www.thestar.com.my/news/nation/2026/09/25/ros-freeze-could-rattle-pn-prep | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/thestarmy/article?url=https%3A%2F%2Fwww.thestar.com.my%2Fnews%2Fnation%2F2026%2F09%2F25%2Fros-freeze-could-rattle-pn-prep" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"data": {
"url": "https://www.thestar.com.my/business/business-news/2024/04/08/consumers-forecast-to-spend-cautiously-this-year",
"title": "Consumers forecast to spend cautiously this year",
"description": "PETALING JAYA: Consumers are anticipated to tread cautiously in terms of spending as they face escalating cost of living and economic uncertainty, with projections of a modest uptick in private consumption this year.",
"published_at": "2024-04-07T16:00:00Z",
"section": "Economy",
"authors": [
"The Star"
],
"paywalled": true,
"paragraphs": [
"PETALING JAYA: Consumers are anticipated to tread cautiously in terms of spending as they face escalating cost of living and economic uncertainty, with projections of a modest uptick in private consumption this year.",
"Kenanga Research forecasts private consumption to grow 5.8% in 2024 versus 4.7% recorded in the previous year."
]
}
}Request schema
No body schema
Response schema
#/definitions/publicnews.articleResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | newsplatform.ArticleResponse | No | ||||
| data.authors | array | No | ||||
| data.description | string | No | ||||
| data.image_url | string | No | ||||
| data.paragraphs | array | No | ||||
| data.paywalled | boolean | No | Paywalled is true when the publisher serves only a teaser of this article to anonymous readers, so Paragraphs is a partial body rather than the full text. It is omitted when the full public body was returned. | |||
| data.published_at | string | No | ||||
| data.section | string | No | ||||
| data.title | string | No | ||||
| data.updated_at | string | No | ||||
| data.url | string | No |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 403 | Forbidden | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/thestarmy/article?url=https%3A%2F%2Fwww.thestar.com.my%2Fnews%2Fnation%2F2026%2F09%2F25%2Fros-freeze-could-rattle-pn-prep" \
-H "x-api-key: $CRAWLORA_API_KEY"