Skip to main content

Overview

The PricingSaaS Intelligence API provides powerful filtering and search capabilities to help you find exactly the data you need. This guide covers all available query parameters and best practices.

Available Query Parameters

Full-text search across company names
?search=slack
category
string
Filter by business category
?category=Communication
employees
string
Filter by employee count range
?employees=10000%2B
Valid values: 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10000+
limit
integer
default:"20"
Number of results per page (max 100)
?limit=50
page
integer
default:"1"
Page number for pagination
?page=2
sort
string
default:"name"
Sort field and direction
?sort=name:asc
?sort=created_at:desc
Valid fields: name, created_at, employees

Search Examples

Search for companies by name:
curl "https://api.pricingsaas.com/functions/v1/api/companies?search=notion" \
  -H "Authorization: Bearer $API_KEY"

Partial Matches

The search supports partial matching:
# Finds "Mailchimp", "Gmail", etc.
curl "https://api.pricingsaas.com/functions/v1/api/companies?search=mail" \
  -H "Authorization: Bearer $API_KEY"
Search is case-insensitive:
# All return the same results
?search=SLACK
?search=slack
?search=Slack

Category Filtering

Single Category

Filter by one category:
curl "https://api.pricingsaas.com/functions/v1/api/companies?category=Communication" \
  -H "Authorization: Bearer $API_KEY"

Available Categories

?category=Communication
# Slack, Zoom, Microsoft Teams, etc.
Remember to URL-encode category names with spaces (e.g., Customer%20Support)

Employee Count Filtering

Filter companies by size:

Small Companies (1-50 employees)

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=1-10" \
  -H "Authorization: Bearer $API_KEY"

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=11-50" \
  -H "Authorization: Bearer $API_KEY"

Medium Companies (51-1000 employees)

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=51-200" \
  -H "Authorization: Bearer $API_KEY"

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=201-500" \
  -H "Authorization: Bearer $API_KEY"

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=501-1000" \
  -H "Authorization: Bearer $API_KEY"

Large Companies (1000+ employees)

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=1001-5000" \
  -H "Authorization: Bearer $API_KEY"

curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=5001-10000" \
  -H "Authorization: Bearer $API_KEY"

# Enterprise (10000+)
curl "https://api.pricingsaas.com/functions/v1/api/companies?employees=10000%2B" \
  -H "Authorization: Bearer $API_KEY"
Remember to URL-encode the + character as %2B in 10000+

Combining Filters

Combine multiple filters to narrow your results:

Category + Employee Count

# Medium-sized productivity tools
curl "https://api.pricingsaas.com/functions/v1/api/companies?category=Productivity&employees=51-200" \
  -H "Authorization: Bearer $API_KEY"

Search + Category

# Communication tools with "team" in the name
curl "https://api.pricingsaas.com/functions/v1/api/companies?search=team&category=Communication" \
  -H "Authorization: Bearer $API_KEY"

All Filters Combined

# Large communication companies with "video" in the name
curl "https://api.pricingsaas.com/functions/v1/api/companies?search=video&category=Communication&employees=10000%2B&limit=10" \
  -H "Authorization: Bearer $API_KEY"

Pagination

Navigate through large result sets:

Basic Pagination

# Page 1 (first 20 results)
curl "https://api.pricingsaas.com/functions/v1/api/companies?limit=20&page=1" \
  -H "Authorization: Bearer $API_KEY"

# Page 2 (results 21-40)
curl "https://api.pricingsaas.com/functions/v1/api/companies?limit=20&page=2" \
  -H "Authorization: Bearer $API_KEY"

Custom Page Sizes

# Get 50 results per page
curl "https://api.pricingsaas.com/functions/v1/api/companies?limit=50&page=1" \
  -H "Authorization: Bearer $API_KEY"

# Maximum 100 results per page
curl "https://api.pricingsaas.com/functions/v1/api/companies?limit=100&page=1" \
  -H "Authorization: Bearer $API_KEY"

Pagination Metadata

Every response includes pagination information:
{
  "data": [...],
  "pagination": {
    "total": 1500,      // Total companies matching filters
    "page": 2,          // Current page
    "limit": 20,        // Results per page
    "has_more": true    // More pages available
  }
}

Iterating Through Pages

async function getAllCompanies(category) {
  let page = 1;
  let hasMore = true;
  const allCompanies = [];

  while (hasMore) {
    const response = await fetch(
      `https://api.pricingsaas.com/functions/v1/api/companies?category=${category}&page=${page}&limit=100`,
      {
        headers: { 'Authorization': `Bearer ${API_KEY}` }
      }
    );

    const data = await response.json();
    allCompanies.push(...data.data);

    hasMore = data.pagination.has_more;
    page++;
  }

  return allCompanies;
}
Be mindful of rate limits when fetching multiple pages. See Rate Limits for details.

Sorting

Sort results by different fields:

Sort by Name

# Ascending (A-Z)
curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=name:asc" \
  -H "Authorization: Bearer $API_KEY"

# Descending (Z-A)
curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=name:desc" \
  -H "Authorization: Bearer $API_KEY"

Sort by Date Added

# Newest first
curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=created_at:desc" \
  -H "Authorization: Bearer $API_KEY"

# Oldest first
curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=created_at:asc" \
  -H "Authorization: Bearer $API_KEY"

Sort by Company Size

# Largest first
curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=employees:desc" \
  -H "Authorization: Bearer $API_KEY"

# Smallest first
curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=employees:asc" \
  -H "Authorization: Bearer $API_KEY"

Advanced Query Patterns

Get Recently Added Companies

curl "https://api.pricingsaas.com/functions/v1/api/companies?sort=created_at:desc&limit=10" \
  -H "Authorization: Bearer $API_KEY"

Find Competitors in a Category

# All CRM tools
curl "https://api.pricingsaas.com/functions/v1/api/companies?category=Sales&limit=50" \
  -H "Authorization: Bearer $API_KEY"

Discovery Query (No Filters)

# Browse all companies
curl "https://api.pricingsaas.com/functions/v1/api/companies?limit=100" \
  -H "Authorization: Bearer $API_KEY"
# Find specific company
curl "https://api.pricingsaas.com/functions/v1/api/companies?search=salesforce&limit=5" \
  -H "Authorization: Bearer $API_KEY"

Best Practices

Start with specific filters to reduce result size and API calls:
# Good - specific
?category=Communication&employees=10000%2B&limit=20

# Less efficient - too broad
?limit=100
Use the smallest limit that meets your needs:
# Good - get exactly what you need
?limit=10

# Wasteful - if you only need 10
?limit=100
Cache results that don’t change frequently:
const cache = new Map();
const CACHE_TTL = 60 * 60 * 1000; // 1 hour

async function getCachedResults(query) {
  const cached = cache.get(query);
  if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
    return cached.data;
  }

  const data = await fetchFromAPI(query);
  cache.set(query, { data, timestamp: Date.now() });
  return data;
}
Always check for empty results:
const response = await fetch(url);
const data = await response.json();

if (data.data.length === 0) {
  console.log('No results found for this query');
  // Broaden search or show helpful message
}

Query Builder Helper

Use this pattern to build complex queries:
class QueryBuilder {
  constructor(baseUrl) {
    this.baseUrl = baseUrl;
    this.params = new URLSearchParams();
  }

  search(term) {
    this.params.set('search', term);
    return this;
  }

  category(cat) {
    this.params.set('category', cat);
    return this;
  }

  employees(range) {
    this.params.set('employees', range);
    return this;
  }

  limit(num) {
    this.params.set('limit', num);
    return this;
  }

  page(num) {
    this.params.set('page', num);
    return this;
  }

  sort(field, direction = 'asc') {
    this.params.set('sort', `${field}:${direction}`);
    return this;
  }

  build() {
    return `${this.baseUrl}?${this.params.toString()}`;
  }
}

// Usage
const query = new QueryBuilder('https://api.pricingsaas.com/functions/v1/api/companies')
  .category('Communication')
  .employees('10000+')
  .limit(20)
  .sort('name', 'asc')
  .build();

console.log(query);
// https://api.pricingsaas.com/functions/v1/api/companies?category=Communication&employees=10000%2B&limit=20&sort=name:asc

Next Steps