API Reference Structure, Endpoints, Parameters, and Versioning
How API reference docs group resources, endpoints, and parameters, and how major providers document HTTP APIs.
Public HTTP APIs are usually explained in an API reference: the place you look up URLs, methods, request parameters, and response shapes. Much of this page follows Cloudflare’s API content strategy, which defines how resources, endpoints, and parameters fit together. It also summarises how Brave Search API and Perplexity organise their reference material alongside tutorials and quickstarts.
API reference pages: what they are versus get-started guides
Section titled “API reference pages: what they are versus get-started guides”Reference material answers “what can I call, with what inputs, and what comes back?” Tutorials and how-to guides answer “how do I build something end to end?” Cloudflare’s Sandbox SDK concepts describe that split explicitly:
Tutorials - Learn by building complete applications
How-to guides - Solve specific problems
API reference - Technical details and method signatures
Perplexity’s quickstart steers you to the right product before you open endpoint specs: “Choose your API based on your use case:”, then points you to “View complete API documentation with detailed endpoint specifications” and separate examples. Brave’s API dashboard documentation leads with “Explore our complete API reference with interactive examples.”
Use get-started and authentication guides first; use the API reference when you already know which service and operation you need.
API content types: resources, endpoints, parameters, and deprecated APIs
Section titled “API content types: resources, endpoints, parameters, and deprecated APIs”Cloudflare’s API content types outline the usual sections in a product API doc set:
Get started - API
Resources
Endpoints
Parameters
Deprecated APIs
The Cloudflare style guide ties documentation work to those building blocks:
Follow the conventions for documenting endpoints, parameters, and resources.
| Section | Role in reference docs |
|---|---|
| Get started / quickstart | Auth, first request, links into reference |
| Resources | Logical grouping of related operations |
| Endpoints | Concrete HTTPS paths and HTTP methods |
| Parameters | Query, path, header, and body options |
| Deprecated APIs | Older paths or fields still documented for migration |
Deprecated sections matter when you migrate—for example Cloudflare AI Search REST API migration lists REST API documentation, Chat Completions API reference, Search API reference, and Legacy AutoRAG API reference in one place.
Resources in API reference: how endpoints are grouped
Section titled “Resources in API reference: how endpoints are grouped”In Cloudflare’s model, a resource is the folder in the mental map of the API, not a single HTTP call.
The resource groups all of the associated endpoints together.
— Cloudflare, Resources
You see the same pattern in product docs: a REST resource page lists Resource and Methods; Cloudflare AI Search API groups API Migration, Instances, Items, and Search under one API surface. When you search provider docs, start from the resource name (zone, item, web search) and drill down to one method.
Endpoints in API reference: HTTPS paths and HTTP methods
Section titled “Endpoints in API reference: HTTPS paths and HTTP methods”An endpoint is one callable operation on the API.
An endpoint is used to make HTTPS requests, and the GET, POST, PUT, PATCH, and DELETE methods dictate how to interact with the resource.
— Cloudflare, Endpoints
| HTTP method | Typical use in reference docs |
|---|---|
GET |
Read a resource or list items |
POST |
Create or trigger an action |
PUT / PATCH |
Replace or update |
DELETE |
Remove |
List-style product APIs (DDoS protection, rulesets, Radar) repeat the same endpoint pattern: overview page, Examples for common calls, and a separate Endpoints index. For example, TCP protection common API calls states that “The following sections contain example requests for common API calls. For a list of available API endpoints, refer to Endpoints.” The Rulesets API get-started note adds a safety-oriented parameter: “You can also validate a mutation before deployment by adding the dry_run=true query parameter.”
Individual services (Brave Web Search, Answers, Perplexity Agent API quickstart) each publish “View the complete API reference, including endpoints, parameters, and example requests” or “View complete endpoint documentation and parameters.” The exact path and method names live on those service pages—not in the cluster stubs alone.
Parameters in API reference: path, query, header, and body
Section titled “Parameters in API reference: path, query, header, and body”A parameter is any option you send with the request to shape the response or behaviour.
A parameter is an option passed with the endpoint to receive specific information or values.
— Cloudflare, Parameters
Reference pages usually split parameters by where they appear (path, query, header, JSON body). Behaviour can depend on context: cache response rule settings notes “The available parameters depend on the directive type.” When reading Brave or Perplexity reference, check required auth headers (see Brave authentication) and operator or tool-specific fields (e.g. Search operators) in the same parameter tables as the endpoint.
Pagination query parameters on list endpoints
Section titled “Pagination query parameters on list endpoints”List operations often share pagination parameters. Cloudflare’s Advanced TCP Protection API states:
The API operations that return a list of items use pagination. For more information on the available pagination query parameters, refer to Pagination.
The same wording appears on Programmable Flow Protection. When an endpoint returns a collection, look for a Pagination section or linked doc before assuming limit/cursor names—providers do not always use identical parameter names.
Versioning in API reference: major versions in the request URL
Section titled “Versioning in API reference: major versions in the request URL”Brave documents how the version appears in the path. From Versioning:
The first is a major version number (e.g. v1) included in the API URL. An example URL will look something like this /v1/web/search. As a user, you can expect this version to be rarely changed, but we reserve the right to do so. These will only be used when there is a major API redesign, which should happen only rarely, and naturally would warrant a major upgrade.
Pin client code to the documented major version segment (e.g. v1) and read the provider’s versioning guide when SDKs or base URLs change. Schema.org’s APIReference type (a more specific kind of TechArticle) can carry metadata such as assemblyVersion, programmingModel, and targetPlatform when publishers describe downloadable or packaged API specs—useful for discovery, separate from live URL versioning.
Machine-readable API reference: OpenAPI and embedded specs
Section titled “Machine-readable API reference: OpenAPI and embedded specs”Some stacks expose reference twice: human-readable HTML and machine-readable OpenAPI. The Sandbox SDK HTTP API bridge documents:
The bridge serves its own API documentation:
GET/v1/openapi.json— Machine-readable OpenAPI 3.1 schema.
GET/v1/openapi— Interactive HTML documentation.
Both routes accept authentication via Bearer header or ?token= query parameter. When running locally with npm run dev, open http://localhost:8787/v1/openapi in your browser to explore every endpoint interactively.
That pattern matches what Brave advertises as interactive examples in its dashboard docs: interactive or schema-driven explorers reduce guesswork for parameters and response shapes.
How providers name “complete API reference” sections
Section titled “How providers name “complete API reference” sections”Wording differs, but the promise is the same: endpoints, parameters, and often examples on one canonical page.
| Provider | Typical reference entry |
|---|---|
| Brave | Service pages (Autosuggest, LLM Context, Image Search) — “View the complete API reference, including endpoints, parameters, and example requests” |
| Perplexity | Embeddings best practices, Search best practices, Agent API — “Complete … API documentation” / “View complete endpoint documentation” |
| Cloudflare | Product API reference pages (e.g. Workers AI embedded function calling, Builds API, MCP Client API) |
Perplexity also splits tools (e.g. Web Search, Fetch URL Content) into their own endpoint documentation. Cloudflare’s voice and tone guidance applies to authors: “Include short examples of real life use cases.” Good reference pages pair tables with purposeful examples—not example dumps without context.
Common mistakes when using API reference documentation
Section titled “Common mistakes when using API reference documentation”- Skipping the resource map and searching only for HTTP status codes or error strings—resource pages list which methods exist.
- Treating quickstart code as the full contract—quickstarts omit edge parameters; the reference defines required fields and enums.
- Ignoring pagination on list endpoints and assuming a single response contains every item.
- Hard-coding unversioned URLs when the provider documents a major version prefix (Brave
v1paths). - Mixing deprecated and current reference during migrations without reading the Deprecated APIs or migration page (e.g. AI Search REST API migration).
How to check this on your site
Section titled “How to check this on your site”-
Open the official API reference for your provider (Brave Search API documentation, Perplexity quickstart, or the relevant Cloudflare API product) and confirm your integration calls the documented path, HTTP method, and major API version segment.
-
For each live request, compare your client’s parameters to the reference tables on the matching endpoint page (path, query, headers, body) and remove undocumented fields.
-
If the operation lists many items, locate the provider’s Pagination documentation and verify your client follows the documented query parameters on a list endpoint such as Advanced TCP Protection.
-
Run one documented example request from the provider’s Examples or quickstart (e.g. Brave quickstart authentication) and confirm the response schema matches the reference.
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match the linked provider documentation, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong or unclear.