# Detik — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse news articles from Detik.com by keywords, topics, or specific channels to get the latest headlines and full article details. Find news tailored to your interests through tag-based browsing and access real-time updates across different content categories.

**Category:** News & Media | **Website:** [detik.com/](https://detik.com/) | **Docs:** [parse.bot/marketplace/407223fe-751b-466e-b06c-959877802211/detik-com-api](https://parse.bot/marketplace/407223fe-751b-466e-b06c-959877802211/detik-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/detik/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get article detail

Extract the full content and metadata of a single detik.com article given its URL. Returns title, cleaned body text, author, publish date, featured image URL, and channel. The content is stripped of ads, related-article blocks, and navigation elements.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full URL of the detik.com article (e.g. 'https://news.detik.com/berita/d-1234567/judul-artikel'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/detik/get-article-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### Get articles by tag

Retrieve articles associated with a specific topic tag on detik.com. Returns paginated results. Tags are URL slugs visible in detik.com tag pages (e.g. 'pemilu', 'teknologi', 'makanan-bergizi-gratis').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `tag` | string | Yes | Tag slug (e.g. 'teknologi', 'pemilu', 'makanan-bergizi-gratis'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/detik/get-articles-by-tag \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","tag":"<string>"}'
```

### Get channel articles

Browse articles from a specific detik.com channel subdomain. Each channel is a subdomain (e.g. finance.detik.com, sport.detik.com). Returns the latest articles listed on that channel's homepage.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `channel` | string | Yes | Channel name. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/detik/get-channel-articles \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"channel":"<string>","page":"<integer>"}'
```

### Get latest news

Get the latest popular news headlines from detik.com. Returns up to 20 articles from the most-popular page across all channels. No input required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/detik/get-latest-news \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search articles

Full-text search over detik.com articles across all channels. Results are paginated and can be sorted by relevance or recency. Optionally fetches full article content for the first 5 results (incurs additional round-trips). Results can be constrained to a date range. Returns article summaries with title, URL, snippet, publish time, channel, and thumbnail.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date for filtering results (inclusive), format YYYY-MM-DD. |
| `date_to` | string | No | End date for filtering results (inclusive), format YYYY-MM-DD. |
| `include_content` | boolean | No | Whether to include full article content for the top 5 results. Each fetched article is an additional request. |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword. |
| `sortby` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/detik/search-articles \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","include_content":"<boolean>","page":"<integer>","query":"<string>","sortby":"<string>"}'
```

### Search news only

Search for articles using detik.com's news-specific search endpoint. Returns paginated results sorted by latest. Covers all channels but uses a news-focused ranking. Results can be constrained to a date range.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `date_from` | string | No | Start date for filtering results (inclusive), format YYYY-MM-DD. |
| `date_to` | string | No | End date for filtering results (inclusive), format YYYY-MM-DD. |
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/detik/search-news-only \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"date_from":"<string>","date_to":"<string>","page":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.