> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecorn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find companies by tech stack

> Import companies using a given technology stack to your webhook

Import the companies matching a technology-stack query. This is the second
step of the two-step tech-stack search — run
[preview](https://docs.pipecorn.com/api-reference/endpoints/signals/tech_stack_preview.md) first to size
the segment for free, then extract to receive the full company records on your
webhook. Technographics are powered by TheirStack.

## Credits and rate limits

* Credits: **3 enrichment credits** per imported company
* Authentication: standard v2 scheme (`X-API-KEY`)

Extract is exempt from request rate limiting — the credit balance is its own
throttle. If the account lacks enough enrichment credits for the companies that
would be imported, the request returns `402` with `code: "insufficient_credits"`,
a `top_up_url`, and a message reporting the shortfall — and no import is
created. A workspace weekly credit limit returns `403` with
`code: "workspace_limit_exceeded"` instead. See
[Credit and limit errors](https://docs.pipecorn.com/api-reference/errors.md).

## Filters

Accepts the same filters as
[preview](https://docs.pipecorn.com/api-reference/endpoints/signals/tech_stack_preview.md)
(`stacks`, `stack_match`, `excluded_stacks`, `countries`,
`included_industries`, `excluded_industries`, `company_size`), plus:

* `webhook_url` **(required)** — where results are POSTed
* `limit` — caps how many companies are imported (and billed). Defaults to
  1000, which is also the hard ceiling.
* `streaming` — when `true`, companies are POSTed one at a time instead of in a
  single payload
* `name` — optional import name

Any other key is rejected with `422`, listing the keys it refused and every
key the endpoint accepts:

```json theme={null}
{
  "error": "Unauthorized parameters detected",
  "unauthorized_params": ["country"],
  "permitted_params": ["stacks", "stack_match", "excluded_stacks", "countries", "included_industries", "excluded_industries", "company_size", "webhook_url", "limit", "streaming", "name"]
}
```

Resolve technology names to slugs with the
[Technology slug lookup](https://docs.pipecorn.com/api-reference/endpoints/miscellaneous/technologies.md)
endpoint.

## Example request

```json theme={null}
{
  "stacks": ["shopify"],
  "stack_match": "and",
  "countries": ["US"],
  "limit": 200,
  "webhook_url": "https://your-company.com/webhooks/stack"
}
```

## Example response

```json theme={null}
{
  "message": {
    "total_count": 200,
    "total_available": 428,
    "message": "Stack intent search started successfully. You will receive the results on your webhook shortly.",
    "id": "b3f1c2d4-0000-0000-0000-000000000000"
  }
}
```

* `total_available` is the full match count; `total_count` is what will be
  imported (capped by `limit`, then the 1000 ceiling).
* When nothing matches, the response is `200` with `{ "total_count": 0, ... }`
  and no import is created.

## Webhook payload

Companies are delivered to your `webhook_url` using the same field names as the
other company imports: `name`, `description`, `website`, `logo`, `industry`,
`location`, `linkedin_id`, `linkedin_url`, `employee_count`, `employee_range`.
Blank fields are omitted.


## OpenAPI

````yaml POST /intents/accounts/stack
openapi: 3.0.1
info:
  title: Pipecorn Signals API
  description: Pipecorn Accounts API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /intents/accounts/stack:
    post:
      summary: Find companies by tech stack
      description: >-
        Start an async import of companies matching a technology-stack query.
        Results are delivered to `webhook_url`. Spends 3 enrichment credits per
        imported company. Only documented fields are allowed; unknown keys
        return 422.
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - stacks
                - webhook_url
              properties:
                webhook_url:
                  type: string
                  format: uri
                  description: URL that receives the imported company records.
                  example: https://your-company.com/webhooks/stack
                stacks:
                  type: array
                  items:
                    type: string
                  description: >-
                    Technology slugs to match. Resolve names to slugs with GET
                    /accounts/technologies.
                  example:
                    - shopify
                    - webflow
                stack_match:
                  type: string
                  enum:
                    - or
                    - and
                  default: or
                  description: >-
                    How `stacks` combine. `or` matches companies using any
                    listed technology; `and` requires all of them.
                  example: or
                excluded_stacks:
                  type: array
                  items:
                    type: string
                  description: Technology slugs to exclude.
                  example:
                    - wordpress
                countries:
                  type: array
                  items:
                    type: string
                  description: ISO country codes, OR-matched against the company's country.
                  example:
                    - US
                    - FR
                included_industries:
                  type: array
                  items:
                    type: string
                  description: LinkedIn industry IDs to include, OR-matched.
                  example:
                    - '2190'
                    - '34'
                excluded_industries:
                  type: array
                  items:
                    type: string
                  description: LinkedIn industry IDs to exclude.
                  example:
                    - '27'
                company_size:
                  type: array
                  items:
                    type: string
                    enum:
                      - Self-employed
                      - 1-10
                      - 11-50
                      - 51-200
                      - 201-500
                      - 501-1000
                      - 1001-5000
                      - 5001-10000
                      - 10001+
                  description: Company size display buckets to include.
                  example:
                    - 11-50
                    - 51-200
                limit:
                  type: integer
                  minimum: 1
                  maximum: 1000
                  default: 1000
                  description: >-
                    Caps how many companies are imported (and billed). Defaults
                    to 1000, which is also the hard ceiling.
                  example: 200
                streaming:
                  type: boolean
                  description: >-
                    When true, companies are POSTed to the webhook one at a time
                    instead of in a single payload.
                  example: false
                name:
                  type: string
                  description: Optional import name.
                  example: Shopify prospects
      responses:
        '200':
          description: No matching companies; no import created
          content:
            application/json:
              schema:
                type: object
                required:
                  - total_count
                  - total_available
                  - message
                properties:
                  total_count:
                    type: integer
                    example: 0
                  total_available:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: No results found
          headers:
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
        '201':
          description: Stack intent search started successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                  - status_url
                properties:
                  message:
                    type: object
                    required:
                      - total_count
                      - total_available
                      - message
                      - id
                    properties:
                      total_count:
                        type: integer
                        description: >-
                          Companies that will be imported (capped by `limit`,
                          then the 1000 ceiling).
                        example: 200
                      total_available:
                        type: integer
                        description: Full match count.
                        example: 428
                      message:
                        type: string
                        example: >-
                          Stack intent search started successfully. You will
                          receive the results on your webhook shortly.
                      id:
                        type: string
                        format: uuid
                        description: Import job UUID.
                        example: b3f1c2d4-0000-0000-0000-000000000000
                  status_url:
                    type: string
                    format: uri
                    description: >-
                      Where to poll the import: `GET /lists/{id}`. Same value as
                      the `Location` header.
                    example: >-
                      https://app.pipecorn.com/api/v2/lists/8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
              example:
                message:
                  total_count: 200
                  total_available: 428
                  message: >-
                    Stack intent search started successfully. You will receive
                    the results on your webhook shortly.
                  id: b3f1c2d4-0000-0000-0000-000000000000
                status_url: >-
                  https://app.pipecorn.com/api/v2/lists/8e1dcba0-f0bb-4071-99fc-f18ba6559ccc
          headers:
            Location:
              description: Status URL of this import, `GET /lists/{id}`.
              schema:
                type: string
                format: uri
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
        '400':
          description: Bad request (stacks or webhook_url missing)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Not enough enrichment credits for the companies that would be
            imported (3 credits per company). No import is created and nothing
            is spent. The message reports the shortfall.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsufficientCreditsError'
              example:
                error: >-
                  Not enough enrichment credits. You need 30 credits but only
                  have 5 available.
                code: insufficient_credits
                top_up_url: https://app.pipecorn.com/settings/subscriptions/credits
        '403':
          description: >-
            The workspace weekly enrichment credit limit is reached. Buying
            credits does not lift it, so no `top_up_url` is returned, and no
            import is created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceLimitError'
              example:
                error: >-
                  You have reached your weekly enrichment credit limit for this
                  workspace
                code: workspace_limit_exceeded
        '409':
          $ref: '#/components/responses/IdempotencyConflict'
        '422':
          description: >-
            Unprocessable entity (invalid filters, or keys the endpoint does not
            accept: the body lists them in `unauthorized_params`, next to every
            accepted key in `permitted_params`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unknown_parameter:
                  summary: Unknown key in the body
                  value:
                    error: Unauthorized parameters detected
                    unauthorized_params:
                      - country
                    permitted_params:
                      - stacks
                      - stack_match
                      - excluded_stacks
                      - countries
                      - included_industries
                      - excluded_industries
                      - company_size
                      - webhook_url
                      - limit
                      - streaming
                      - name
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        A unique value you generate per operation, such as a UUID. Retrying with
        the same key and the same body returns the stored response instead of
        running the request again, so a retry after a timeout never charges
        twice. Successful responses are kept for 24 hours; a failed request is
        not stored and can be retried with the same key.
      schema:
        type: string
        maxLength: 255
        example: 4f1c2e9a-8a7d-4c1b-9f63-2d6e0b5a7c11
  headers:
    Idempotent-Replayed:
      description: >-
        `true` when this response is a replay of an earlier request sent with
        the same `Idempotency-Key`. Nothing was run or charged again.
      schema:
        type: string
        enum:
          - 'true'
    Retry-After:
      description: >-
        Seconds to wait before retrying. Sent when the plan limit or a request
        still in progress caused the error.
      schema:
        type: integer
        example: 42
  schemas:
    Error:
      required:
        - error
      type: object
      properties:
        error:
          description: >-
            Human-readable error message. A few validation errors return a list
            of messages instead of a single string.
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        message:
          type: string
          description: >-
            Longer explanation, sent by validators that add context. Such errors
            may also carry extra top-level keys like `valid_values` or
            `example`.
        details:
          type: string
          description: >-
            Parser message, sent with `"Invalid JSON format in request body"`
            when the request body is not valid JSON.
        unauthorized_params:
          type: array
          items:
            type: string
          description: >-
            The request keys the endpoint does not accept, sent with
            `"Unauthorized parameters detected"`.
        permitted_params:
          type: array
          items:
            type: string
          description: >-
            Sent with `"Unauthorized parameters detected"`. The stack endpoints
            list every key they accept; hiring and growth list the accepted keys
            present in the request.
    InsufficientCreditsError:
      required:
        - error
        - code
        - top_up_url
      type: object
      properties:
        error:
          type: string
          description: >-
            Human-readable message. Endpoints priced per result report the
            shortfall instead, e.g. "Not enough enrichment credits. You need 30
            credits but only have 5 available."
          example: Not enough enrichment credits left
        code:
          type: string
          enum:
            - insufficient_credits
          description: Machine-readable error code
        top_up_url:
          type: string
          format: uri
          description: >-
            Absolute URL of the credits page. Buy credits there, then replay the
            request.
          example: https://app.pipecorn.com/settings/subscriptions/credits
    WorkspaceLimitError:
      required:
        - error
        - code
      type: object
      properties:
        error:
          type: string
          example: >-
            You have reached your weekly enrichment credit limit for this
            workspace
        code:
          type: string
          enum:
            - workspace_limit_exceeded
          description: >-
            Machine-readable error code. A 403 without this code is not a
            spending limit: the account is closed, LinkedIn refused access to
            the resource, or the plan does not include the endpoint.
  responses:
    IdempotencyConflict:
      description: >-
        A request with this `Idempotency-Key` is still being processed. Wait for
        the `Retry-After` delay and retry with the same key.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              code:
                type: string
                enum:
                  - idempotency_key_in_use
          example:
            error: A request with this Idempotency-Key is still being processed
            code: idempotency_key_in_use
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.