Billing
Integration calls are billed as the Web Access requests they make. How to estimate and read the cost.
Today a site integration call costs exactly what its requests cost. Each request an action makes goes through
/v1/fetch with your key and is billed at its own rate on your plan, as if you had sent it yourself. The action adds
no charge of its own. Failed requests follow the same rules as any other request: see
Pricing.
What a call cost
The requests array in the response lists every billed request, with the rate it was billed
at in requestType:
"requests": [
{ "url": "https://graphql-mobile-api.yelp.com/gql/mobile", "requestType": "request_standard", "requestId": "d2d57cbf-…" },
{ "url": "https://graphql-mobile-api.yelp.com/gql/mobile", "requestType": "request_standard", "requestId": "e84222ff-…" }
],
"billing": { "mode": "passthrough", "calls": 1, "rows": 1 }This call made two requests at the request_standard rate, so it cost two request-based, standard-proxy requests from
the pricing table.
The billing block says how the call itself was charged:
modeispassthroughfor every call today, meaning the requests are the whole charge.callsis1for a call that returned rows or found nothing, and0for one that failed outright.rowsis the number of rows indata.
When a call stops on a 402 or 429 part way through, the requests it had already made are billed even though no
envelope comes back.
Estimating a call before you make it
Each action declares a request band: how many requests it makes per unit of work. The band is on every action in
the catalog, and in the manifest as requests:
"requests": { "min": 1, "max": 2, "per": "item" }per | One unit is | Example |
|---|---|---|
item | Each entry in items. | Yelp business: 1–2 requests per business. |
page | Each page of results you ask for, such as with pages. | Yelp search: 1–2 requests per page of 10 results. |
batch | Each group of up to size entries in items, sent together. | { "min": 1, "max": 1, "per": "batch", "size": 25 }: 1 request per 25 entries. |
run | The whole call, whatever the input. | { "min": 1, "max": 3, "per": "run" }: 1–3 requests per call. |
setup, when present, is the most requests a call makes once on top of the band, such as resolving a business alias
before reading its reviews. Yelp reviews is { "min": 1, "max": 1, "per": "page", "setup": 1 }: one request per page
of reviews, plus up to one per call.
So a Yelp business call with 100 entries in items makes between 100 and 200 requests. Which rate each request is
billed at depends on the site; the requestType values in a test call show you.
Listed prices
Each action in the catalog also shows a price, such as "$0.002 per row", and the manifest carries it as billing.
That price isn't charged today. Per-action pricing isn't live, so every call bills as its requests, and the
envelope's billing.mode is passthrough. Estimate costs from the request band and the requestType rates, not from
the listed price. Read billing.mode in the response to see how a call was actually charged.