Data API
Endpoint Examples
Data API
Discover and call NanoGPT data tools through one stable endpoint family
GET
Data API
Overview
NanoGPT exposes a unified Data API under/api/v1/data. It gives customers one discoverable entry point for web search, URL scraping, maps data, social data, and business enrichment.
The Data API is a wrapper around the existing direct endpoints. It does not change the underlying response bodies, validation rules, billing, rate limits, async behavior, provider options, authentication, or x402 behavior unless noted here. Direct endpoints remain available for compatibility.
Base URL
Authentication
Use the same NanoGPT API key authentication as existing API routes:Authorization or x-api-key, and include x-x402: true. NanoGPT will return 402 Payment Required with available payment options.
An unauthenticated request without x-x402: true is treated as a normal unauthenticated request and returns 401 missing_api_key.
Currently documented accountless Data API paths:
POST /api/v1/data/web/searchPOST /api/v1/data/url/scrape
GET /api/v1/x402/endpoints as the deployment source of truth, including Lightning L402 availability when advertised. See Accountless x402 API Payments for completion, replay, and polling behavior. Direct legacy routes remain available, but accountless docs prefer the public v1 data paths.
Some underlying endpoints may also support browser-session flows. The Data API forwards authentication and payment-related headers to the underlying route.
Discovery
List available Data API endpoints:Example catalog response
Endpoint Metadata
For endpoints that do not supportGET, calling their Data API path with GET returns the public metadata object instead of dispatching the tool.
GET, the request is forwarded to the underlying endpoint.
Calling Endpoints
The Data API supports path-style dispatch and body-style dispatch.Path-style dispatch
Use a stable Data API path and send the underlying endpoint’s normal input body.Body-style dispatch
UsePOST /api/v1/data and specify the target endpoint in the request body.
endpoint, id, or type.
Endpoint input can be provided in an input object:
input is present, it is forwarded. If data is present and input is absent, data is forwarded. Otherwise, all fields except endpoint, id, type, input, and data are forwarded as the endpoint input.
Request Forwarding Behavior
The Data API:- Preserves request query parameters.
- Preserves request headers except hop-by-hop headers such as
connection,content-length,host,keep-alive,transfer-encoding, andupgrade. - Forces
Content-Type: application/jsonwhen it forwards a JSON body. - Forwards JSON request bodies to
POSTroutes. - Allows empty-body path-style
POSTrequests and forwards{}. - Requires a valid JSON body for body-style
POST /api/v1/data. - Adds tracking headers to dispatched responses.
Response Headers
Dispatched responses include:Error Format
Errors generated by the Data API wrapper use this shape:
Once a request is forwarded, the underlying endpoint may return its own existing error format.
Endpoint Catalog
Endpoint Aliases
Body-style dispatch accepts canonical endpoint IDs and these aliases:
The resolver also normalizes endpoint IDs by trimming slashes, accepting
api/v1/data/...-style strings, converting path slashes to dots, and converting hyphens to underscores.
X/Twitter Subpaths
x.read is special. The catalog lists the base X endpoint:
/api/v1/x/....
Examples:
POST requests with no body, the wrapper forwards {} and preserves the query string. This supports query-only X calls.
Examples
Web Search
Scrape URLs
Accountless x402 Data Request
402 Payment Required with a payment object when accountless x402 is enabled and the request can be quoted. If you receive 401 missing_api_key immediately, check that the initial quote request includes x-x402: true. Without that header, NanoGPT does not enter the x402 quote flow.
Google Maps Search
GET for the same behavior exposed by the direct /api/v1/googlemaps endpoint, including polling async runs when applicable.
Hunter Domain Search
X Search With Query Parameters
POST also works for query-only X calls: