Kompas scraper

ExtractHub extractors are versioned web scrapers: each one is a saved scraper for one kind of page that returns structured JSON through an API. For Kompas (kompas.com) there are 3 public extractors: Kompas.com - section page, Kompas.com - home page and Kompas.com - article. Together they return fields such as pageTitle, url, sections, stories, headline, description, section, subsection and 23 more fields. Call one with your API key and a pinned extractor_id, from the REST API, the Batch API or an AI agent over MCP.

Kompas scrapers on ExtractHub

  • kompas.com · @extracthub1/kompas-section@1 (v1.0.0)

    Stories of a Kompas.com section or channel page (www.kompas.com/tren, nasional.kompas.com, megapolitan.kompas.com, ...): headline, link, label, date and image in page order, plus the page title and link and the sections of the navigation bar (News, Tren, Lestari, Money, ...). Section pages use different card layouts; the extractor reads each with selector lists (combineStrategy first): articleItem (home, Nasional, Money, Lifestyle), trenLatest (Tren) and article__grid (Tekno, Bola, Otomotif). Pairs with @extracthub1/kompas-article.

    Fields: pageTitle , url , sections , stories

    Kompas.com - section page scraper: fields, versions and examples →
  • kompas.com · @extracthub1/kompas-home@1 (v1.0.0)

    Stories of the Kompas.com home page (www.kompas.com): headline, link, label, date and image in page order, plus the page title and link and the sections of the navigation bar (News, Kolom, Tekno, Otomotif, Bola, Lifestyle, Tren, Money, ...). Pairs with @extracthub1/kompas-section and @extracthub1/kompas-article.

    Fields: pageTitle , url , sections , stories

    Kompas.com - home page scraper: fields, versions and examples →
  • kompas.com · @extracthub1/kompas-article@1 (v1.1.0)

    One Kompas.com article (www.kompas.com/<channel>/read/<yyyy>/<mm>/<dd>/<id>/<slug> and <channel>.kompas.com/read/..., best with ?page=all): headline, description, section and subsection, breadcrumb, published and modified time, author with profile link and job title, editor, dateline, content type, word and page count, lead image with caption, tags, subheadings, body paragraphs, full text and the 'Baca juga' related links. Plain fetch through an Indonesian proxy (NewsArticle JSON-LD, content_* meta tags and page markup). Also returns the whole body as Markdown (content), with the subheadings in place between the paragraphs.

    Fields: url , headline , description , section , subsection , breadcrumb , articleType , datePublished , dateModified , dateLabel and 18 more

    Kompas.com - article scraper: fields, versions and examples →

How to call the Kompas scraper API

Every call needs your API key (X-API-Key) and a pinned extractor_id. This example uses @extracthub1/kompas-section@1 (Kompas.com - section page); open an extractor's page for its batch, Python and Node examples.

REST: realtime extract
curl -X POST "https://api.extracthub.io/api/extractor/extract" \
  -H "X-API-Key: $EXTRACTHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "extractor_id": "@extracthub1/kompas-section@1",
    "target": { "url": "https://kompas.com/..." }
  }'
MCP: ask your agent (server https://api.extracthub.io/mcp), which calls the extract tool
Use ExtractHub to extract https://kompas.com/... with @extracthub1/kompas-section@1
{
  "tool": "extract",
  "arguments": {
    "extractor_id": "@extracthub1/kompas-section@1",
    "url": "https://kompas.com/..."
  }
}

See the web scraping API reference and the web scraping MCP server setup.

Need another Kompas page type?

Build your own Kompas scraper with an AI agent and the extractor builder skill, or in ExtractHub Studio. It stays private until you release it.

Kompas scraper: frequently asked questions

Is there a ready-made Kompas scraper?

Yes. ExtractHub lists 3 public extractors for kompas.com. An extractor is a versioned web scraper for one kind of page: its owner released it as an immutable version with an output schema, and you call that version with your own API key.

What data can I scrape from Kompas?

Kompas.com - section page returns pageTitle, url, sections and stories. Kompas.com - home page returns pageTitle, url, sections and stories. Kompas.com - article returns url, headline, description, section, subsection, breadcrumb and 22 more. Every field is listed on the extractor's page with a sample response.

How do I call the Kompas scraper API?

Send GET or POST https://api.extracthub.io/api/extractor/extract with your API key in the X-API-Key header, extractor_id=@extracthub1/kompas-section@1 and the URL of a kompas.com page as the target. For many URLs use POST https://api.extracthub.io/api/extractor/batch. AI agents call the same extractor through the extract tool of the ExtractHub MCP server at https://api.extracthub.io/mcp.

Can I build my own Kompas scraper?

Yes. Build an extractor for any Kompas page type in ExtractHub Studio, or let an AI agent such as Claude Code build, test and release it with the open-source extractor builder skill. New extractors are private until you release them.