# Apiosk Gateway – NewsAPI Execute

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

Executes a pay-per-call proxied NewsAPI request through the Apiosk x402 gateway, forwarding a JSON payload to a selected NewsAPI operation and returning the upstream response.

## Facts

- Endpoint: POST https://gateway.apiosk.com/newsapi/execute
- Price: $0.06/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-newsapi-execute-5bcdea6d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MvTaikSEiiCY7LPQ88BTf

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-newsapi-execute-5bcdea6d -d '<json body>'
```

Example prompt: Search NewsAPI for the top 5 headlines about artificial intelligence published today — use the everything endpoint with the query 'artificial intelligence' and sort by publishedAt.

## When to prefer this

Use this endpoint when you need to query NewsAPI (headlines, article search, source listing) through a metered, pay-per-call gateway without managing your own NewsAPI credentials or billing. Prefer it when your agent needs on-demand, cost-controlled access to news data billed in USDC via the x402 protocol, and when you do not already have a direct NewsAPI integration.

## Known failure modes

- Invalid or unrecognized operation selector returns an error status
- Malformed JSON input payload causes upstream 400 bad request
- NewsAPI rate limit or key exhaustion results in upstream 429 or 403
- Payment not settled via x402 results in HTTP 402 and no execution
- Unavailable upstream service returns upstream_status 5xx
- Missing required query parameters (e.g. apiKey or q) forwarded as-is may cause NewsAPI rejection

## 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 containing status, the upstream NewsAPI response body (articles, sources, or metadata depending on operation), the operation used, latency in milliseconds, cost in USDC, 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-newsapi-execute-5bcdea6d/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)
