# Medium Search API Documentation

Search public Medium posts by keyword: for each result the id, title, publish date (ISO 8601, UTC) and creator. Page with the 0-based page parameter; has_more is true while more pages exist. A valid empty search result is a successful response.

- **Documentation:** [https://scrappa.co/docs/medium-api/medium_search](https://scrappa.co/docs/medium-api/medium_search)
- **API group:** Medium API
- **Endpoint:** `GET https://scrappa.co/api/medium/search`

## 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, e.g. python programming. |
| `limit` | integer | No | Results per page, 1 to 50. Defaults to 10. |
| `page` | integer | No | 0-based page number. Defaults to 0. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/medium/search?query=python+programming"
```

## Example response

```json
{
    "success": true,
    "data": {
        "query": "python programming",
        "results": [
            {
                "id": "fdffe8969a13",
                "title": "Best Python Classes in Khanna: Learn Python Programming at AG Creative Groups",
                "published_at": "2026-10-10T04:59:13Z",
                "creator": {
                    "id": "6c91b8430c4e",
                    "name": "Manveer kaur",
                    "username": "mvkaur278"
                }
            }
        ],
        "page": 0,
        "has_more": true,
        "next_page": 1
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |
| 404 | Resource Not Found | The requested Medium resource does not exist. This response is not billable. |
| 502 | Invalid Source Response | The upstream answered with a shape that no longer matches the documented contract. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## 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)
