TheirStack Credit Consumption API

The Credit Consumption API from TheirStack — 2 operation(s) for credit consumption.

GitHub OpenAPI

Operations 2

GET /v0/teams/credits_consumption Get Daily Credit Usage #
GET /v0/teams/credits_consumption/facets List Credit Usage Sources #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/theirstack-com:theirstack-com-credit-consumption-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

theirstack-com-credit-consumption-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TheirStack API Reference Credit Consumption API
  description: '# Introduction


    Welcome to the TheirStack API - the largest database of jobs and technographics. You can use this API to access all our API endpoints, such as the Jobs endpoint to get real-time and historical jobs from more than 100 countries, the Companies endpoint to get a list of companies by the technology they use or by the roles they are hiring for, or

    the Technographics endpoint to get a list of technologies used by a company. The API is organized around REST. All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON. A Swagger UI of these docs is also available at /openapi. ---


    # Authentication


    Authentication is done via the API key which you can find in your account settings. When making a call, you''ll have to specify this API key with the Authorization header. Here''s an example:


    ```sh

    Authorization: Bearer

    ```


    ---


    # Pagination


    Responses that return a list of items are paginated. We offer two different pagination strategies:


    - **Page-based**: This method allows you to navigate through paginated data by specifying the `page` and `limit` parameters. The `page` parameter indicates the page number you wish to retrieve, while the `limit` parameter specifies the maximum number of items to return per page. For POST requests, include these parameters in the request body. For GET requests, use them as query parameters. - **Offset-based**: This method allows you to navigate through paginated data by specifying the `offset` and `limit` parameters. The `offset` parameter indicates the starting point within the collection of results, while the `limit` parameter specifies the maximum number of items to return. For POST requests, include these parameters in the request body. For GET requests, use them as query parameters. Some of these endpoints also support the `include_total_results` body or query parameter. If you set it to `false`, the responses will be faster, and the field `total_results` of the response will be `null`. ---


    # Rate Limit


    All API endpoints are rate limited to ensure reliability and fair usage. When a limit is exceeded, the API returns **HTTP 429 Too Many Requests**. Limits are applied **per user** (or per API key) with sliding windows; multiple windows may apply simultaneously. ## Tiered endpoints and limits


    Endpoints covered by tier-based limits:


    * POST `/v1/jobs/search` (Jobs Search)

    * POST `/v1/companies/search` (Companies Search)

    * POST `/v1/companies/technologies` (Technographics)


    Shared limits across all three endpoints:


    | Tier | API limits |

    | ---- | ------------------------------------- |

    | Free | 4/second, 10/minute, 50/hour, 400/day |

    | Paid | 4/second |


    - **Paid tier** applies to users who have made at least one payment. - **Free tier** applies to all other users (users who have never paid or users without any payments done). Multiple limits are applied simultaneously. A request is rejected if it exceeds **any** active window. ## Rate limit headers


    The API returns rate limit information in every response. We follow the **IETF HTTPAPI draft** for RateLimit headers: RateLimit header fields for HTTP. When multiple rate limits apply, header items are comma-separated and ordered consistently across headers. ### IETF compliant headers


    - `RateLimit`: Current quota status per policy. Format: `""; r=; t=; pk=`. - `RateLimit-Policy`: Applied policy definition. Format: `""; q=; w=`. ### Other headers


    These are included for client convenience:


    - `RateLimit-Limit`: Total allowed requests for each window

    - `RateLimit-Remaining`: Requests remaining in each window

    - `RateLimit-Reset`: Seconds until the current window resets


    The order of values in legacy headers **matches the order of `RateLimit` items**.'
  version: 1.0.0
servers:
- url: https://api.theirstack.com
  description: Production
tags:
- name: Credit Consumption
paths:
  /v0/teams/credits_consumption:
    get:
      tags:
      - Credit Consumption
      summary: Get Daily Credit Usage
      description: 'Retrieve daily API and UI credit consumption for your team, by charge date. Set group_by=search_pattern to group each day''s credits by search patterns with the same stable filters. Charges without a search pattern appear as Other usage. Filter by types, exact endpoint path, origin, API key or search_pattern_key. Each group includes observed endpoints and origins. Choose exactly one group_by dimension: search_pattern, endpoint or origin. Omit it for daily totals. endpoints and origins are independent multiselect filters (OR within each, AND between them). Unfiltered grouped totals include all credits.'
      operationId: get_teams_credits_consumption_v0
      security:
      - Bearer: []
      parameters:
      - name: start_datetime
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: Start datetime in ISO format (e.g., 2023-01-01T00:00:00)
          title: Start Datetime
        description: Start datetime in ISO format (e.g., 2023-01-01T00:00:00)
      - name: end_datetime
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          description: End datetime in ISO format (e.g., 2023-01-01T23:59:59)
          title: End Datetime
        description: End datetime in ISO format (e.g., 2023-01-01T23:59:59)
      - name: group_by
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - search_pattern
            - endpoint
            - origin
            type: string
          - type: 'null'
          title: Group By
      - name: search_pattern_key
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            maxLength: 64
          - type: 'null'
          description: Only charges associated with this canonical search pattern.
          title: Search Pattern Key
        description: Only charges associated with this canonical search pattern.
      - name: is_origin_app
        in: query
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Origin App
      - name: origin
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/RequestSource'
          - type: 'null'
          title: Origin
      - name: api_key_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Api Key Id
      - name: types
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/RequestType'
          - type: 'null'
          description: Filter by search type.
          title: Types
        description: Filter by search type.
      - name: endpoints
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: string
          - type: 'null'
          description: Match any exact request URL path; unassigned selects charges without a recorded endpoint. Intersects the singular endpoint filter.
          title: Endpoints
        description: Match any exact request URL path; unassigned selects charges without a recorded endpoint. Intersects the singular endpoint filter.
      - name: status_codes
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              type: integer
          - type: 'null'
          description: Match any HTTP response status code.
          title: Status Codes
        description: Match any HTTP response status code.
      - name: origins
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/UsageOrigin'
          - type: 'null'
          description: Match any recorded origin; webhook requires a linked webhook event and unassigned selects missing attribution. Intersects the singular origin filter.
          title: Origins
        description: Match any recorded origin; webhook requires a linked webhook event and unassigned selects missing attribution. Intersects the singular origin filter.
      - name: endpoint
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
            maxLength: 2048
            pattern: ^/[^?#]*$
          - type: 'null'
          description: Exact request URL path, e.g. /v1/jobs/search; host and query string are ignored.
          title: Endpoint
        description: Exact request URL path, e.g. /v1/jobs/search; host and query string are ignored.
      - name: timezone
        in: query
        required: false
        schema:
          type: string
          description: IANA timezone, such as Europe/Madrid.
          default: UTC
          title: Timezone
        description: IANA timezone, such as Europe/Madrid.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreditsConsumption'
                title: Response Get Teams Credits Consumption V0
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Payment Required
  /v0/teams/credits_consumption/facets:
    get:
      tags:
      - Credit Consumption
      summary: List Credit Usage Sources
      description: List the endpoints and origins that charged credits to the team in a date range (the last 30 days by default). Use it to pick values for the endpoint and origin filters of the daily credit consumption. `unassigned` stands for charges with no recorded endpoint or origin, and `webhook` appears only for charges linked to a webhook event.
      operationId: get_credit_consumption_facets_v0
      security:
      - Bearer: []
      parameters:
      - name: start_datetime
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Start Datetime
      - name: end_datetime
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: End Datetime
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditConsumptionFacets'
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Payment Required
components:
  schemas:
    Error:
      properties:
        code:
          anyOf:
          - type: string
          - type: 'null'
          title: Code
          description: 'The error code. Eg: `E-001`, `E-002`, `E-003`, `E-004`, `E-005`, `E-006`, `E-007`, `E-008`, `E-009`, `E-010`, `E-011`, `E-012`, `E-013`, `E-014`, `E-015`, `E-016`'
          examples:
          - E-001
          - E-002
          - E-003
          - E-004
          - E-005
        title:
          type: string
          title: Title
          description: The error title.
          examples:
          - Not allowed exception
          - Invalid re2 expression exception
          - Invalid country code exception
          - Connection reset by peer exception
          - Too many requests exception
          - Internal server error
          - Validation error
          - Timeout error
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: The error description
      type: object
      required:
      - title
      title: Error
    CreditsConsumption:
      properties:
        group_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Key
          description: 'Key of the selected grouping dimension: search pattern hash, endpoint path or origin.'
        group_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Name
          description: Display name for the selected grouping dimension.
        search_pattern_filters:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Search Pattern Filters
          description: Canonical identity filters when grouped by search pattern.
        endpoints:
          items:
            type: string
          type: array
          title: Endpoints
          description: Distinct request URL paths without host/query; unassigned marks missing paths.
        origins:
          items:
            type: string
          type: array
          title: Origins
          description: Recorded request origins, webhook only when a webhook event is linked, or unassigned when attribution is missing.
        period_start:
          type: string
          format: date-time
          title: Period Start
          description: Start of the period.
        api_credits_consumed:
          type: integer
          title: Api Credits Consumed
          description: Number of API credits consumed.
        ui_credits_consumed:
          type: integer
          title: Ui Credits Consumed
          description: Number of UI credits consumed.
        search_type:
          anyOf:
          - type: string
            enum:
            - jobs
            - companies
            - technologies
          - type: 'null'
          title: Search Type
          description: Search type when grouped by search pattern; null for other usage.
        search_pattern_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Pattern Key
          description: Stable search pattern key when grouped by search pattern.
        search_pattern_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Search Pattern Name
          description: Search summary naming this search pattern.
      type: object
      required:
      - period_start
      - api_credits_consumed
      - ui_credits_consumed
      title: CreditsConsumption
    ErrorResponse:
      properties:
        request_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Request Id
          description: The request id. This is useful to contact us to help you debug the issue. The request_id won't be present in all errors.
          examples:
          - null
        error:
          $ref: '#/components/schemas/Error'
      type: object
      required:
      - error
      title: ErrorResponse
    RequestSource:
      type: string
      enum:
      - api
      - app
      - web
      - mcp
      - admin_mcp
      title: RequestSource
    CreditConsumptionFacets:
      properties:
        endpoints:
          items:
            type: string
          type: array
          title: Endpoints
        origins:
          items:
            type: string
          type: array
          title: Origins
      type: object
      title: CreditConsumptionFacets
    UsageOrigin:
      anyOf:
      - $ref: '#/components/schemas/RequestSource'
      - type: string
        enum:
        - unassigned
        - webhook
    RequestType:
      type: string
      enum:
      - jobs
      - companies
      - technologies
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer