# AFP — 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.

> Access real-time AFP news articles and fact-check stories across multiple languages, with the ability to search, filter by region or topic, and discover trending fact-checks. Browse the latest news ticker, explore fact-checked content by category, and stay informed with curated news and verification articles from AFP's global network.

**Category:** News & Media | **Website:** [afp.com/](https://afp.com/) | **Docs:** [parse.bot/marketplace/eb88d1ba-ae0f-4a27-8656-acf434cdbbfb/afp-com-api](https://parse.bot/marketplace/eb88d1ba-ae0f-4a27-8656-acf434cdbbfb/afp-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_afp_content_categories

Retrieve AFP's main content product categories from the corporate website. Lists multimedia services and specialized content offerings such as photo, video, text, graphics, fact-check, and sport services.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_afp_content_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_factcheck_article

Fetch the full content of a specific AFP Factuel fact-checking article by its document ID. Returns title, publication date, authors, tags, and structured body content (text paragraphs and images). The doc_id can be obtained from any article listing endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `doc_id` | string | Yes | Document ID of the article (e.g. B2GA29E, B43K963). Obtainable from search_factcheck_articles, get_factcheck_homepage, or other listing endpoints. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_factcheck_article \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"doc_id":"<string>"}'
```

### get_factcheck_article_list_all

Retrieve paginated list of all AFP Factuel fact-checking articles, ordered by most recent first. No filtering applied.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination, zero-based. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_factcheck_article_list_all \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>"}'
```

### get_factcheck_by_region

Browse AFP Factuel fact-checking articles filtered by geographic region. Returns paginated results ordered by most recent first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination, zero-based. |
| `region` | string | Yes | Region name for filtering articles. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_factcheck_by_region \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","region":"<string>"}'
```

### get_factcheck_by_topic

Browse AFP Factuel fact-checking articles filtered by topic ID. Returns paginated results ordered by most recent first.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination, zero-based. |
| `topic_id` | string | Yes | Numeric topic ID for filtering articles. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_factcheck_by_topic \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","topic_id":"<string>"}'
```

### get_factcheck_homepage

Retrieve the list of latest fact-checking articles from the factuel.afp.com homepage. Returns the most recent articles displayed on the landing page with title, URL, document ID, date, and tags.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_factcheck_homepage \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_factcheck_trending_topics

Retrieve the currently featured/trending topic tags displayed on the AFP Factuel homepage. Includes both topic-based categories (by ID) and region-based categories.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_factcheck_trending_topics \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_homepage_news_ticker

Scrape the live news ticker on afp.com homepage showing real-time AFP wire dispatches. Each item includes a dateline location, timestamp, and headline text. Ticker updates continuously with global breaking news. Language determines the AFP homepage locale.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lang` | string | No | Language code for the AFP homepage locale. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/get_homepage_news_ticker \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lang":"<string>"}'
```

### search_factcheck_articles

Search AFP Factuel for fact-checking articles by keyword. Supports single and multi-word queries in French. Returns matching articles ordered by relevance with title, URL, document ID, date, and tags.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or phrase (e.g. vaccin, climat, Ukraine) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-afp-com-api-eb88d1ba/search_factcheck_articles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
