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

# Resolve entity from text

> Resolve a short piece of text to the Specter entities it refers to. Pass a passage to pull out the entities mentioned, or a natural-language query (e.g. "competitors of rippling.com" or "fintech investors") to get the entities that match. Each result includes the entity's Specter ID, type, and how central it is to the text.

<Note> Costs 1 credit per request. </Note>

## What you need

A plain-English query or a passage of text to resolve. No IDs or prior setup are required.

## Behaviour

- Accepts up to 1,000 characters.
- Each match carries a `context`: `primary` (a main subject or direct match), `active` (a meaningful supporting role, e.g. an investor in a round), or `passive` (mentioned in passing).
- People aren't supported yet.
- No matches returns an empty list.

## What you do next

- **Resolve the matches.** Each match returns an entity ID; pass company matches to [Get company by ID](/api-reference/companies/get-company-by-id) and investor matches to [Get investor by ID](/api-reference/investors/get-investor-by-id) for full records.




## OpenAPI

````yaml /api-ref/bundle_api.yaml post /entities/text-search
openapi: 3.0.0
info:
  title: Specter API
  termsOfService: https://tryspecter.com/terms/
  contact:
    name: API support
    email: api-support@tryspecter.com
  version: 1.0.0
servers:
  - description: Production
    url: https://app.tryspecter.com/api/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Enrich
    description: >
      Look up a company, person, or investor and, if Specter does not already
      hold it, fetch it on demand. Includes email-based person enrichment.
  - name: Search
    description: |
      Find records across every product from a single plain-English query.
  - name: Companies
    description: >
      Company profiles, funding, headcount, traction, the per-company signals
      and sub-resources attached to a single company, and identifier resolution.
  - name: People
    description: >
      Specter people records: profile data, contact details, and per-person
      lookups for a known person ID.
  - name: Investors
    description: >
      Specter investor records: profile, activity, targeting, funds, portfolio
      companies, and the funding rounds they have participated in.
  - name: Transactions
    description: |
      Transaction detail by ID: funding rounds, acquisitions, and IPOs.
  - name: News Signals
    description: |
      Company-level news signals: by ID, and for a saved list or company search.
  - name: Revenue Signals
    description: >
      Revenue and profitability signals: by ID, by date, and for a saved list or
      company search.
  - name: Talent Signals
    description: |
      Talent signals: by ID and in bulk by ID.
  - name: Investor Interest Signals
    description: |
      Investor interest signals: by ID and in bulk by ID.
  - name: Company Lists
    description: |
      Create, query, and maintain lists of companies, including their results.
  - name: Investor Lists
    description: |
      Create, query, and maintain lists of investors, including their results.
  - name: People Lists
    description: |
      Create, query, and maintain lists of people, including their results.
  - name: Saved Searches
    description: |
      List and delete searches saved via tryspecter.com.
  - name: Company Saved Searches
    description: |
      Details and results for saved company searches.
  - name: People Saved Searches
    description: |
      Details and results for saved people searches.
  - name: Investor Saved Searches
    description: |
      Details and results for saved investor searches.
  - name: Talent Signals Saved Searches
    description: |
      Details and results for saved Talent Signals searches.
  - name: Investor Interest Saved Searches
    description: |
      Details and results for saved Investor Interest Signals searches.
  - name: Network
    description: >
      Your team's LinkedIn network: the people and companies your teammates are
      connected to, and your reach into a given company.
  - name: Account
    description: >
      Organisation-level resources: your team's members, API call logs, and
      credit balance.
paths:
  /entities/text-search:
    post:
      tags:
        - Companies
      summary: Resolve entity from text
      description: >
        Resolve a short piece of text to the Specter entities it refers to. Pass
        a passage to pull out the entities mentioned, or a natural-language
        query (e.g. "competitors of rippling.com" or "fintech investors") to get
        the entities that match. Each result includes the entity's Specter ID,
        type, and how central it is to the text.


        <Note> Costs 1 credit per request. </Note>


        ## What you need


        A plain-English query or a passage of text to resolve. No IDs or prior
        setup are required.


        ## Behaviour


        - Accepts up to 1,000 characters.

        - Each match carries a `context`: `primary` (a main subject or direct
        match), `active` (a meaningful supporting role, e.g. an investor in a
        round), or `passive` (mentioned in passing).

        - People aren't supported yet.

        - No matches returns an empty list.


        ## What you do next


        - **Resolve the matches.** Each match returns an entity ID; pass company
        matches to [Get company by
        ID](/api-reference/companies/get-company-by-id) and investor matches to
        [Get investor by ID](/api-reference/investors/get-investor-by-id) for
        full records.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: The text to resolve.
              properties:
                text:
                  type: string
                  description: The text to resolve (max 1,000 characters).
                  maxLength: 1000
                  example: Competitors of rippling.com worldwide
              required:
                - text
              additionalProperties: false
            example:
              text: >-
                Stripe announced a new funding round led by Sequoia Capital to
                expand its payments platform across Europe.
      responses:
        '200':
          description: >
            The entities resolved from the text. Returns an empty list when
            there are no matches.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    source_name:
                      type: string
                      description: The matched entity's name.
                      example: Stripe
                    context:
                      type: string
                      description: >
                        How central the entity is to the text: `primary` (a main
                        subject or direct match), `active` (a meaningful
                        supporting role, e.g. an investor in a round), or
                        `passive` (mentioned incidentally).
                      enum:
                        - primary
                        - active
                        - passive
                      example: primary
                    entity_id:
                      type: string
                      description: 'The entity''s Specter ID: a company ID or an investor ID.'
                      example: 5e3bc2b700c8f4c966ad2bbd
                    entity_type:
                      type: string
                      description: >
                        Entity category. Companies are returned as `company`,
                        investors as `investors`.
                      enum:
                        - company
                        - investors
                      example: company
        '400':
          $ref: '#/components/responses/EnrichmentBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimits'
components:
  responses:
    EnrichmentBadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                type: string
                description: The type of error.
              message:
                type: string
                description: >
                  A message with information about why the request was bad, will
                  be either a single message, or a path to the validation
                  issues.
          examples:
            no-request-body:
              summary: No request body
              value:
                errorCode: VALIDATION_ERROR
                message: Cannot get item with no request body.
            bad-linkedin-id:
              summary: Bad LinkedIn Id
              value:
                errorCode: VALIDATION_ERROR
                message: >
                  {"code":"invalid_type","expected":"number","received":"string","path":["linkedin_id"],"message":"Expected
                  number, received string"}
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ApiKeyMissing'
              - $ref: '#/components/schemas/ApiKeyNotValid'
    Forbidden:
      description: Forbidden - There is no permissions to use the endpoint
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                description: NOT_PERMITTED
                type: string
                example: NOT_PERMITTED
              message:
                type: string
                description: You do not have permission to access this resource.
                example: You do not have permission to access this resource.
            required:
              - errorCode
              - message
    RateLimits:
      description: Too Many Requests - API Rate limit exceeded
      content:
        application/json:
          schema:
            type: object
            required:
              - errorCode
              - message
            properties:
              errorCode:
                type: string
                description: RATE_LIMITED
              message:
                type: string
                description: You have been rate-limited
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: The total rate limit allowed for this endpoint
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: The number of requests remaining
        X-RateLimit-Reset:
          schema:
            type: number
            format: float
          description: The number of seconds until the rate limit resets
  schemas:
    ApiKeyMissing:
      properties:
        errorCode:
          description: API_KEY_MISSING
          example: API_KEY_MISSING
          type: string
        message:
          description: No API Key was presented on the header X-API-KEY
          example: No API Key was presented on the header X-API-KEY
          type: string
    ApiKeyNotValid:
      properties:
        errorCode:
          description: API_KEY_NOT_VALID
          example: API_KEY_NOT_VALID
          type: string
        message:
          description: API key present, but not valid
          example: API key present, but not valid
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````