{
  "openapi": "3.0.1",
  "info": {
    "title": "B2B People and Company Search API - GTM Database",
    "description": "Search a go-to-market database of people and companies with a query language that reaches across from a person to their employer and back: current title, seniority, headcount, industry, revenue, funding and technologies in one expression. Also runs your own enrichment routines. Pay per result.",
    "version": "0.1",
    "x-build-id": "SUZ6Q8S0VBu8kFcK8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~gtm-database-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-gtm-database-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~gtm-database-search-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-gtm-database-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~gtm-database-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-gtm-database-search-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to do",
            "enum": [
              "query",
              "filters",
              "filterFields",
              "queryReference",
              "routine"
            ],
            "type": "string",
            "description": "The advanced query is the expressive one: a query language with nested boolean logic and criteria that reach across from a person to their employer and back. Structured filters are the older JSON form. The two reference modes write out the vocabulary this provider accepts, which is served at run time rather than published, so run one of them first if you are building a search by hand.",
            "default": "query"
          },
          "sourceType": {
            "title": "Record type",
            "enum": [
              "people",
              "companies"
            ],
            "type": "string",
            "description": "Which records to search or describe, for the structured filters and filter fields modes. The advanced query works this out for itself from the query you write, so this is ignored there.",
            "default": "people"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "In advanced query mode, the query to run, written in the provider own language. It reads like a sentence: select from people where experiences.any(is_current = true and job_title is_similar_to (\"head of sales\") and company.estimated_employee_count >= 500). It supports parentheses, and, or, not, and criteria that cross from a person to their employer with experiences.any(...) or from a company to its staff with people.exists(...). Passed through exactly as written."
          },
          "filters": {
            "title": "Filters object",
            "type": "object",
            "description": "In structured filters mode, the filters to apply, as a JSON object of filter name to value. The filter names this provider accepts are not published: run the filter fields mode with your own key to write the whole vocabulary into a dataset, then use the names it gives you. Anything set here wins over the three convenience fields below."
          },
          "jobTitleKeywords": {
            "title": "Job title keywords",
            "type": "array",
            "description": "A shortcut for the job title filter in structured filters mode, when searching people. One phrase per line. Ignored if you set the same filter by hand in the filters object above.",
            "items": {
              "type": "string"
            }
          },
          "locationCities": {
            "title": "Cities",
            "type": "array",
            "description": "A shortcut for the city filter in structured filters mode, when searching people. One city per line.",
            "items": {
              "type": "string"
            }
          },
          "companyIndustries": {
            "title": "Company industries",
            "type": "array",
            "description": "A shortcut for the industry filter in structured filters mode, when searching companies. One industry per line.",
            "items": {
              "type": "string"
            }
          },
          "routineId": {
            "title": "Routine id",
            "type": "string",
            "description": "In routine mode, the id of the enrichment function to run. This is one of the provider own managed functions, or a custom function you have saved in your workspace. Take the id from the provider interface or its command line tool."
          },
          "routineItems": {
            "title": "Routine items",
            "type": "array",
            "description": "In routine mode, the rows to run the function over, as a list of JSON objects of input values, for example {\"domain\": \"example.com\"}. Up to 100 per batch, and larger lists are split into batches for you. Give an object an \"id\" of your own to tie the result back to your record; one is generated from the row position otherwise."
          },
          "requireLinkedinUrl": {
            "title": "Keep only rows with a profile URL",
            "type": "boolean",
            "description": "Drop rows carrying no professional network profile URL.",
            "default": false
          },
          "requireCompanyDomain": {
            "title": "Keep only companies with a domain",
            "type": "boolean",
            "description": "Drop company rows where the website domain is unknown. A domain is what most downstream enrichment needs.",
            "default": false
          },
          "countries": {
            "title": "Keep only these countries",
            "type": "array",
            "description": "Keep only rows whose country matches one of these, compared without regard to case. Leave empty to keep every country.",
            "items": {
              "type": "string"
            }
          },
          "reportWorkspace": {
            "title": "Report the workspace behind the key",
            "type": "boolean",
            "description": "Log which workspace this key belongs to before the run starts. Useful when you hold keys for more than one. Informational only.",
            "default": false
          },
          "pageSize": {
            "title": "Records per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many records to draw from the provider at a time, up to its ceiling of 500. Larger pages mean fewer requests; smaller pages mean the run stops closer to your result cap.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pace the run so it stays under whatever rate your plan allows.",
            "default": 120
          },
          "routineTimeoutMinutes": {
            "title": "Routine timeout in minutes",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Give up waiting for one routine batch after this long. The batch keeps running at the provider, so nothing is lost. Enrichment functions call out to other services, so a full batch takes minutes rather than seconds.",
            "default": 20
          },
          "skipNotFound": {
            "title": "Skip values with no result",
            "type": "boolean",
            "description": "Leave items the provider returned nothing for, and inputs refused before they were sent, out of the dataset. Off by default, because knowing which of your rows failed is usually the point. Misses are never charged for either way.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. This is the cap on both spend and run time.",
            "default": 100
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own API key for the go-to-market database API, created under Settings, then Account, then API keys in your provider workspace. Sent in a request header and never written to the log. Stored as a secret."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}