Extract Images from Article URL API LLM Markdown

Back to Details
# Extract Images from Article URL API

Extract ordered image candidates from a public article.

## API Overview

- **HTTP Protocol:** HTTPS
- **HTTP Method:** POST
- **HTTP Endpoint:** https://api.gugudata.io/v1/websitetools/fetchcontentimages
- **Response Type:** application/json; charset=utf-8
- **DEMO Endpoint:** https://api.gugudata.io/v1/websitetools/fetchcontentimages/demo
- **Live Demo:** https://gugudata.io/demo/fetchcontentimages
- **Postman:** https://www.postman.com/gugudata/gugudata-io
- **LLM Page:** https://gugudata.io/details/fetchcontentimages/llm
- **Raw Markdown:** https://gugudata.io/details/fetchcontentimages/llm.md

## Remote MCP

- **MCP Endpoint:** https://mcp.gugudata.io/mcp
- **MCP Guide:** https://gugudata.io/mcp/
- **Authorization:** OAuth authorization opens in the browser; do not paste appkeys into MCP clients.
- **Tool Scope:** MCP clients receive GuGuData API tools available to the authorized account.

## Data & API Features

- Article-focused image candidates: Collect the hero image and images from the readable article area instead of unrelated page furniture.
- Absolute image URLs: Resolve relative and lazy-loaded sources against the final page URL for easier downstream use.
- Best srcset candidate: Select the strongest available image candidate from responsive srcset declarations.
- Stable order and deduplication: Preserve meaningful article order while removing repeated final image URLs.
- Alt text and dimensions: Receive alternative text and declared width or height values when the page provides them.
- SEO and media workflows: Build image audits, media inventories, content previews, accessibility checks, and editorial pipelines.

## API Request Parameters

| Name | Type | Is Required | Default Value | Remark |
| --- | --- | --- | --- | --- |
| appkey | string | true | YOUR_APPKEY | API key used to authenticate the request. |
| url | string | true | https://gugudata.github.io/gugudata-io/guides/extract-images-from-article-url-api-seo-guide/ | Complete public HTTP or HTTPS article URL, up to 2048 characters. |

## API Response Parameters

| Name | Type | Remark |
| --- | --- | --- |
| url | string | Final page URL after redirects. |
| images | array<object> | Ordered, deduplicated article image candidates. |
| images.src | string | Selected image source value. |
| images.absoluteUrl | string | Final absolute HTTP or HTTPS image URL. |
| images.alt | string | Image alternative text, or an empty string. |
| images.width | string \| null | HTML width attribute when available. |
| images.height | string \| null | HTML height attribute when available. |

## API Response Status Codes

| Status Code | Explanation of Status Code | Remarks |
| --- | --- | --- |
| 200 | Request processed successfully. | Some endpoints expose a separate application-level status field in the response body, such as `dataStatus.statusCode`. |
| 400 | Invalid request parameters or request format. | Check required fields, data types, and request body format. |
| 401 | Missing or unknown application key. | Provide a valid `appkey` with the request. |
| 403 | The application key is recognized but access is not allowed. | The key may be expired, inactive, or not permitted for the requested API. |
| 422 | The target response cannot be processed as a readable article. | Use an HTML article page with readable body content and a valid redirect chain. |
| 429 | Request rate or trial usage limit exceeded. | Reduce request frequency and retry with backoff. If a trial allowance is exhausted, check Trial Keys for remaining requests and subscribe to continue. |
| 500 | Internal service error. | Retry later or contact support if the error persists. |
| 502 | The target website could not be reached successfully. | Retry later or verify that the target website is available. |
| 503 | The extraction service is temporarily unavailable. | Retry later or contact support if the error persists. |

## cURL Example

```bash
curl --location 'https://api.gugudata.io/v1/websitetools/fetchcontentimages?appkey=YOUR_APPKEY' --request POST --header 'Content-Type: application/json' --data '{
  "url": "https://gugudata.github.io/gugudata-io/guides/extract-images-from-article-url-api-seo-guide/"
}'
```