# Apiosk Gateway — Mediastack Execute

> Apiosk Gateway — Mediastack Execute is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-15).

Executes a pay-per-call request to the Mediastack news/media API via the Apiosk x402 gateway, paying $0.09 USDC per call on Base.

## Facts

- Endpoint: POST https://gateway.apiosk.com/mediastack/execute
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apiosk-gateway-mediastack-execute-fc0f8e55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uOqwzBzhx9N-gd1spU2K-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability apiosk-gateway-mediastack-execute-fc0f8e55 -d '<json body>'
```

Example prompt: Search Mediastack for the latest English-language news articles about artificial intelligence in the US — fetch the top 10 headlines from today.

## When to prefer this

Choose this endpoint when you need to query Mediastack's news and media data without managing your own Mediastack API key, prefer micropayment-per-call billing in USDC over subscription plans, or are building an agent that needs on-demand news lookups with transparent per-call costs. Prefer alternatives if you need bulk/batch news ingestion or already have a direct Mediastack subscription.

## Known failure modes

- Invalid operation selector returns error in status field
- Malformed JSON input payload causes upstream 400 error reflected in upstream_status
- Insufficient USDC balance or x402 payment failure blocks the call before forwarding
- Mediastack API key misconfiguration on gateway side returns 401 upstream_status
- Rate limit exceeded on Mediastack side returns 429 upstream_status
- Unknown api_slug or operation returns gateway-level 404

## How this service works

Pay-per-call API gateway on the x402 protocol (HTTP 402 + USDC on Base). This document covers the gateway's discovery and execution meta-endpoints. Individual provider APIs are reachable at /{api_slug}/{path} and described by GET /{api_slug}/metadata.

## Output

Returns a JSON object with a status field, the upstream Mediastack API response body in 'result' (articles, metadata, pagination), the operation called, latency in milliseconds, cost string (e.g. '$0.09'), and the upstream HTTP status code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "JSON payload forwarded to the selected operation."
  },
  "operation": {
   "type": "string",
   "description": "Operation id, /path, or METHOD /path selector."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "result"
 ],
 "properties": {
  "api": {
   "type": "string"
  },
  "cost": {
   "type": "string"
  },
  "result": {
   "description": "Upstream response body."
  },
  "status": {
   "type": "string"
  },
  "latency": {
   "type": "number"
  },
  "operation": {
   "type": "string"
  },
  "upstream_status": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apiosk-gateway-mediastack-execute-fc0f8e55/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.apiosk.com](https://www.zero.xyz/host/gateway.apiosk.com/llms.txt)
