# Baidu Images

Returns image results with decoded original and source URLs, dimensions, file type, source, thumbnails, and pagination. Raw Baidu fields remain in images and the complete payload is in provider_response.

- **Documentation:** [https://scrappa.co/docs/baidu-api/baidu_images](https://scrappa.co/docs/baidu-api/baidu_images)
- **API group:** Baidu API
- **Endpoint:** `GET https://scrappa.co/api/baidu/images`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search query. |
| `page` | integer | No | Page number from 1 to 50. Default: 1. |
| `limit` | integer | No | Results requested per page from 1 to 50. Default: 10. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/baidu/images?query=Shanghai+skyline&page=1&limit=10"
```

## Example response

```json
{
    "search_parameters": {
        "engine": "baidu_images",
        "query": "Shanghai skyline",
        "page": "1",
        "limit": "10"
    },
    "images_results": [
        {
            "position": 1,
            "title": "Shanghai skyline",
            "link": "https://example.com/shanghai",
            "original": "https://images.example.com/shanghai.jpg",
            "thumbnail": "https://images.example.com/shanghai-thumb.jpg",
            "source": "Example Images",
            "source_domain": "example.com",
            "original_width": 1920,
            "original_height": 1080,
            "file_type": "jpg",
            "is_gif": false
        }
    ],
    "search_information": {
        "query_displayed": "Shanghai skyline",
        "total_results": 1000,
        "results_on_page": 10,
        "page": 1,
        "limit": 10
    },
    "pagination": {
        "page": 1,
        "limit": 10,
        "results_on_page": 10,
        "total_results": 1000,
        "has_more": true,
        "next_page": 2
    },
    "images": [
        {
            "thumbURL": "https://images.example.com/shanghai-thumb.jpg",
            "fromPageTitle": "Shanghai skyline",
            "width": 1920,
            "height": 1080
        }
    ],
    "provider_response": {
        "data": []
    },
    "response_time_ms": 900
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 503 | Upstream unavailable | Baidu could not be reached after safe retries. The request is not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
