Skip to content


Data Endpoints

Endpoint Description Credit Cost Get one or more companies 1 credit per company returned Get one or more job posts 1 credit per job post returned Get one or more eCommerce SKUs 0.5 credits per SKU returned Get one or more SaaS products 1 credit per product returned Get company, product, or SKU categories and metadata free Get the number of remaining SourceStack credits free

Making Your First Query

Each Quickstart example requires your API key to be set as an environment variable first
curl -H "X-API-KEY: $SOURCESTACK_KEY" "" | json_pp
if requests is not yet installed
# (If necessary) Install the package manager pip
curl -o && python
# Install requests via pip
pip install requests
import requests
import os

response = requests.get(
    headers={"X-API-KEY": os.environ["SOURCESTACK_KEY"]}
if axios is not yet installed
# (If necessary) Install NodeJS and the package manager npm
brew install node
# Install axios via npm
npm install axios
const axios = require('axios');

axios.get('', {
    headers: {'X-API-KEY': process.env.SOURCESTACK_KEY}
.then(response => {
.catch(error => {
if Go is not yet installed
# Check if it is installed with
go version
# (If necessary) Install Go
brew install golang
package main

import (

func main() {
  req, err := http.NewRequest("GET", "", nil)
  if err != nil {
    log.Fatal("Error reading request. ", err)
  req.Header.Set("X-API-KEY", os.Getenv("SOURCESTACK_KEY"))

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    log.Fatal("Error reading response. ", err)

  defer resp.Body.Close()
  body, err := ioutil.ReadAll(resp.Body)
  if err != nil {
    log.Fatal("Error reading body. ", err)
  } else {
// Note: this implementation is slightly different than the other examples in that it uses Advanced Filtering and POST
function fetch_sourcestack_data() {
    $api_key = getenv("SOURCESTACK_KEY");
    $data = array(
        "limit" => 1,
        "fields" => ["url", "company_name", "categories"],
        "filters" => array(array("field" => "company_name", "operator" => "EQUALS", "value" => "SourceStack"))
    $options = array(
        'http' => array(
            'header'  => "Content-type: application/json\r\n" . "X-API-KEY: $api_key\r\n",
            'method'  => 'POST',
            'content' => json_encode($data),
    $context  = stream_context_create($options);
    $response = file_get_contents("", false, $context);
    return json_decode($response, true);


You will need an active SourceStack account in good standing to use the API.

If you do not currently have one, please visit our Pricing page.

API Credits

Each SourceStack package includes a number of credits - 100,000, or 1,000,0000 - that correspond to the number of rows returned by users' queries.

To conserve API credits, you can modify the maximum number of rows returned by a given query with the limit= parameter. The default limit per query (if not specified) is 10.

Each API response will include the number of credits remaining in the X-SOURCESTACK-CREDITS-REMAINING header. You can also fetch the value at no cost from the /quota endpoint.

Similarly, Count_Only queries and queries that return 0 rows do not cost any credits.

Accounts that have exhausted their credits and have not turned on Auto Billing will receive 429 responses on every subsequent request.


Authentication is via the X-API-KEY header. If you have a usecase that does not support API request headers, please share details of your needs with your account representative.

Each API key is a secret. Take care to not inadvertently commit it to GitHub, expose it clientside, or log it.


Advanced notice will be given if backward-incompatible breaking changes are planned.

For minor API versions and release notes, consult the Updates page.