Skip to content

HTTP request

Lets your agent call external APIs and fetch web content. Supports all HTTP methods, custom headers, and request bodies. Default timeout is 30 seconds.

Supported in: Python; Node.js 22+, modern browsers (TypeScript).

The Python tool delegates all networking to an httpx.AsyncClient. Use the make_http_request factory to supply a pre-configured client with authentication, timeouts, redirects, proxies, or other transport-level configuration.

Example:

import { Agent } from '@strands-agents/sdk'
import { httpRequest } from '@strands-agents/sdk/vended-tools/http-request'
const agent = new Agent({
tools: [httpRequest],
})
// Make API requests
await agent.invoke('Get data from https://api.example.com/users')
await agent.invoke('Post {"name": "John"} to https://api.example.com/users')

Full API reference: TypeScript, Python