For the complete documentation index, see llms.txt. This page is also available as Markdown.

Making Requests

Learn how to construct and send HTTP requests to the Pullbay API. This guide covers request formatting, headers, parameters, response structure, and practical examples in multiple languages.

Base URL

All Pullbay API requests use this base URL:

https://api.pullbay.com

Append the service path and endpoint to this base URL.

Request Format

GET /{service}/{endpoint}?{parameters}

Example:

GET /appstore/reviews?appId=389801252&country=us&page=1

All current Pullbay endpoints are GET requests. Parameters are passed in the query string.

Required Headers

Header
Required
Value
Example

Authorization

Yes

Bearer token with your API key

Authorization: Bearer YOUR_API_KEY

User-Agent

Optional

Your application identifier

User-Agent: MyApp/1.0

Authorization header format

Replace YOUR_API_KEY with your actual API key from the Pullbay dashboard. Your API key is secret — never share it or commit it to version control.

Common Parameters

Parameters vary by endpoint; each endpoint's reference page lists its own. The App Store reviews endpoint, for example, accepts:

Parameter
Type
Required
Description

appId

string

One of appId/bundleId

App Store app ID (numeric). Pattern ^\d{8,12}$.

bundleId

string

One of appId/bundleId

App bundle ID (e.g. com.burbn.instagram).

country

string

No

Two-letter storefront code (e.g. us, gb, jp).

sort

string

No

Sort order: recent or helpful.

page

integer

No

Page number (1–10). Mutually exclusive with maxItems.

maxItems

integer

No

One-shot bulk pull (1–500). Mutually exclusive with page.

Use page to fetch one page at a time, or maxItems for a single bulk call — not both.

Example:

Request Examples

Basic GET request

Paginated request (page)

Bulk pull (maxItems)

Response Structure

All successful responses follow this consistent JSON structure:

Response fields explained

Top level

  • requestId (string): Unique identifier for this request. Save it for debugging and support.

  • status (integer): HTTP status code.

  • message (string): Human-readable status message.

  • success (boolean): Whether the request succeeded.

data (array)

  • Contains the actual results. Each object's structure depends on the endpoint.

  • An empty array [] means no matching results (not an error).

pagination (object) — present on list/search endpoints

  • page (integer): Current page number.

  • hasNextPage (boolean): Whether more pages are available.

  • cursor / offset (string): Used only by cursor- or offset-paginated services (e.g. Google Maps); null for App Store.

pricing (object)

  • creditsCharged (number): Credits consumed by this request.

Error Response Format

When a request fails, the response keeps the same top-level envelope and adds an error object:

  • success is false on failure.

  • status / message describe the failure (e.g. 402 Insufficient credits, 404 Not found).

  • error.code is a machine-readable code for programmatic handling.

  • Include requestId when contacting Pullbay support for faster debugging.

Complete Request/Response Example

Request

Response (200 OK)

Language-Specific Examples

Python

Node.js

PHP

Ruby

Frequently Asked Questions

What's the difference between `page` and `maxItems`?

They're mutually exclusive modes on list/search endpoints. Use page to fetch one page at a time (max 10 pages for App Store reviews) with fine control over credits. Use maxItems (max 500 for App Store reviews) to pull a full set in a single call — simpler for batch jobs. Don't send both.

How do I know if there are more results?

Check pagination.hasNextPage. When it's true, request the next page by incrementing page.

How do I pass multiple parameters?

Use the query string: GET /appstore/reviews?appId=389801252&country=us&sort=recent&page=1.

Should I include the User-Agent header?

It's optional but recommended for better diagnostics. Identify your application, e.g. User-Agent: MyApp/1.0.

What should I do with the `requestId`?

Save it from responses, especially errors. Include it when contacting Pullbay support so they can locate your request in the logs.

Can I cache API responses?

Yes — caching reduces calls and credit consumption. Cache app metadata longer than dynamic data like reviews, and validate freshness with timestamps.

What encoding should I use for special characters in parameters?

URL-encode query parameters with your language's standard library: Python urllib.parse.urlencode(), JavaScript URLSearchParams, PHP http_build_query(), Ruby URI.encode_www_form().

Last updated