API use cases for AI agents

Practical workflows for search, commerce, news, jobs and page content.

Where should you start?

Choose a guide below, test a representative request and inspect the returned data before integrating it into an agent. The examples use real FastAF endpoint parameters, with API-key authentication.

How do you make a real request?

This example calls Google SERP API using its documented input. Save the API key from the signup email, confirm your email and set FASTAF_API_KEY in your server environment.

curl --fail-with-body -H "Authorization: Bearer $FASTAF_API_KEY" 'https://api.fastaf.co/v1/serp?query=best+espresso+machine+for+home&country=us&language=en'
# pip install fastaf-sdk
import os
from fastaf import FastAF

with FastAF(os.environ["FASTAF_API_KEY"]) as client:
    data = client.request("serp", {"query":"best espresso machine for home","country":"us","language":"en"})
    print(data)

Google SERP JSON. organic_results contains ranked title, link and snippet fields; search_information describes the query. Other Google result blocks may also appear.

The example costs 5 credits after the trial. Alternatively, this endpoint costs $0.003 per successful x402 call at the default configuration; FastAF x402 calls start at $0.003. These are separate billing modes.

For x402, request the same parameters under /x402/v1/serp without an API key, validate the live PAYMENT-REQUIRED challenge, then sign and retry with a payment-aware client. A bare curl request returns HTTP 402 and does not pay; unsupported higher-cost options require API-key billing.

Frequently asked questions

What do these guides cover?

Practical workflows for search, commerce, news, jobs and page content.

Are the examples production data?

No. Examples show request syntax and documented behavior; live results vary and must be validated for your task.

How much does the example cost?

The API-key example uses 5 credits per successful call after the trial. This endpoint has a default x402 price of $0.003 per successful call in USDC on Base; the live payment challenge is authoritative.

Does the SDK automatically pay an HTTP 402?

No. The API-key SDK does not sign wallet payments; x402 requires an explicitly configured payment-aware client and a funded wallet.