Signal AI Affinity API

The Affinity API endpoints allow API users to leverage the power of the Signal AI Knowledge Graph, derived from billions of documents and updated regularly. The Signal AI Knowledge Graph consists of: * **nodes** which represent concepts such as entities and topics * **edges** represent connections describing relationships between these concepts Using the Affinity API, users can retrieve data for hundreds of thousands of entities and topics. The sole relationship type currently accessible via the Affinity API is proximity. ## Proximity Proximity represents how closely entities and topics are associated in the news and other types of content processed by Signal AI. ### What is proximity? The proximity between an entity (e.g. Tesla) and a topic (e.g. Product recall) is a measure of how they are related over a period of time (e.g. a certain month) as perceived in the news (almost all sources we ingest into the Signal platform). It reflects the likelihood of the entity and topic in question being mentioned together, with 0 meaning the two are very unlikely to appear together, and 1 meaning they are most likely to appear together (NB: the scale is not linear.) We measure this by observing the mentions of the topic, the (salient) mentions of the entity and their (salient) co-mentions. As opposed to relying only on the volume of co-mentions, the proximity score captures how significant these co-mentions are based on the overall volume of coverage for both the entity and the topic. **For example, if the entity has a high number of co-mentions with a topic, but the topic is very common (e.g Social Media), we may assign a low proximity score. On the other hand if there are only a few co-mentions with a very niche topic, we may assign a high proximity score.** The proximity score is based on the normalized Google Distance (from Information distance theory) and it has a value between 0 and 1: - A score of 0 means the two concepts are not related and never or rarely co-mentioned together; - The higher the score is, the more related the concepts are and the higher the chance is of observing significant co-mentions. - A proximity close to 1 means that if one of the concepts is mentioned in an article, it is most likely that the other concept will also be mentioned in the article. To illustrate how proximity is implemented, consider this conceptual representation of the Signal AI Knowledge Graph below: ![](/assets/img/affinity_example.svg) In this graph, we see four nodes: two organizations (PepsiCo and American Chemical Society) and two topics (Food and Beverage and Chemicals). We also see three edges each representing a proximity relationship: (PepsiCo and Food and Beverage), (PepsiCo and Chemicals) and (American Chemical Society and Chemicals). We can infer from these edges that PepsiCo has a closer association to Food and Beverage than Chemicals. Also we can infer that American Chemical Society has a stronger connection to Chemicals than PepsiCo. ### Using the proximity score The proximity score can be used in different ways: #### 1. Discovery We can identify the closest topics to an entity by ranking them according to their proximity score. Note that if we simply use the volume of co-mentions to rank topics, we will end up with the common topics (which might be considered noise). Likewise, we can do the opposite and identify the organizations (or any other type of entities) that are closest to a certain topic. Note, if we simply use the volume of co-mentions to rank organizations, we will end up with the common ones which are often mentioned in news articles, e.g. BBC, NASDAQ, UK, US #### 2. Comparison - **Comparing Entities**: We can compare two entities on how they are related to certain topics, ie. which one is more related. A higher proximity score means more relatedness to a topic. Note that this is different from comparing them based on the volume (number of articles on topic). For example one big company may have way more articles on a topic than a smaller company, but the smaller company may have a higher proximity. This is because it has way fewer mentions than the big company overall and a few articles on the topic contribute to a higher proximity score. - **Comparing Topics**: Likewise, we can compare two topics on how they are related to certain entities. A higher proximity score means more relatedness to an entity. - **Comparison over time**: We can say if the proximity between an entity and topic has increased or decreased from one month to another by comparing their proximity score in those months. NB: While the proximity scores are ordered, they are not linear. *This means you can't easily interpret the difference between proximity scores i.e. the difference between 0 and 0.1 proximity is not the same as the difference between 0.4 and 0.5 proximity.* ### Proximity metadata Each proximity relationship returned contains the following metadata: - `proximity-score`: the proximity score in the range `[0..1]` as described above - `sentiment-score`: for a proximity relationship between an entity and a topic, this score represents the sentiment towards the entity with regards to its relationship to the topic. The sentiment score ranges between `[-1..1]` and is computed as follows (taking into account salient entity mentions only: ``` #(positive entity/topic co-mentions) - #(negative entity/topic co-mentions) / #(entity/topic co-mentions) ``` ### Using proximity Using proximity relationships, one can uncover unknowns and insights on a large scale. The API offers one endpoint to allow the users to query and explore proximity relationships. Please note that only the last 15 months of data can be queried.

Operations 1

POST /affinity Explore concept connections (powered by the Signal AI Knowledge Graph) #

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/signal-ai-affinity-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

signal-ai-affinity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Signal AI Affinity API
  description: '# Overview


    The Signal AI API is an HTTP+JSON API offering programmatic access to Signal AI''s decision augmentation platform.'
  version: v1.3
servers:
- url: https://api.signal-ai.com
security:
- OAuth2:
  - default
tags:
- name: Affinity
  description: 'The Affinity API endpoints allow API users to leverage the power of the Signal

    AI Knowledge Graph, derived from billions of documents and updated regularly.'
paths:
  /affinity:
    post:
      operationId: post-affinity
      security:
      - OAuth2:
        - affinity
      tags:
      - Affinity
      summary: Explore concept connections (powered by the Signal AI Knowledge Graph)
      description: 'This endpoint allows you to query the relationships from a source concept (entity or topic) to a set of target concepts (topics or entities) and how these relationships evolve over different months.


        The `relationship.type` parameter allows you to specify the type of relationships you are interested in.

        Currently, the only type of relationship supported is `proximity`


        There are two ways to use this endpoint:


        a. **Querying for specific concepts**: you need to provide as input a list of target-concepts IDs (`target-concepts.ids`) for known concepts that you want to query.


        b. **Discovery**: when you don''t specify an explicit list of target-concepts IDs, the results will be the top relationships in order of proximity to the source-concept for any given month (these entities might differ month-on-month).

        You can also filter the results by concept type(s) of interest (`target-concepts.types` with values: `topic`, `entity/organisation`, `entity/people`, `entity/location`, etc.)

        You can also exclude specific concepts from the results (`target-concepts.exclude.ids`).'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostAffinityQuery'
            examples:
              affinity-request:
                $ref: '#/components/examples/post-affinity-request'
      responses:
        '200':
          description: Returns a list of relationships matching the query
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostAffinityResponse'
              examples:
                affinity-response:
                  $ref: '#/components/examples/post-affinity-response'
components:
  examples:
    post-affinity-response:
      summary: Affinity response
      value:
        source-concept:
          id: d6341968-83df-441c-a869-fa7ae9c22c73
          name: Toyota
          type: entity/organisation
        results:
        - relationship:
            date: 2022-01
            type: proximity
            proximity-score: 0.29267539274752596
            sentiment-score: 0.8865404714899547
          target-concept:
            id: fc31abf2-7b11-4ed5-a7d2-35266057c0dd
            name: Innovation
            type: topic
        - relationship:
            date: 2022-02
            type: proximity
            proximity-score: 0.2751201557751357
            sentiment-score: 0.8560551124002901
          target-concept:
            id: fc31abf2-7b11-4ed5-a7d2-35266057c0dd
            name: Innovation
            type: topic
    post-affinity-request:
      summary: Affinity request
      value:
        relationship:
          type: proximity
          date:
            start: 2022-01
            end: 2022-02
          interval: month
          limit-per-interval: 10
        source-concept:
          id: d6341968-83df-441c-a869-fa7ae9c22c73
        target-concepts:
          ids:
          - fc31abf2-7b11-4ed5-a7d2-35266057c0dd
  schemas:
    Concept:
      type: object
      additionalProperties: false
      required:
      - id
      - type
      - name
      properties:
        id:
          $ref: '#/components/schemas/ResourceId'
        type:
          $ref: '#/components/schemas/ConceptTypeEnum'
        name:
          type: string
    IntervalType:
      type: string
      enum:
      - month
    RelationshipType:
      type: string
      enum:
      - proximity
    ResourceId:
      type: string
      format: uuid
      pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
      example: bcd2d868-ed38-4382-b94a-622a30fc3215
    YearMonth:
      type: string
      pattern: ^20[0-9]{2}-(0[1-9]|1[0-2])$
      description: A year and month encoded as `YYYY-MM` (e.g. `2023-01`)
      example: 2023-01
    PostAffinityResponse:
      type: object
      required:
      - source-concept
      - results
      additionalProperties: false
      properties:
        source-concept:
          $ref: '#/components/schemas/Concept'
        results:
          type: array
          items:
            type: object
            required:
            - relationship
            - target-concept
            additionalProperties: false
            properties:
              relationship:
                type: object
                required:
                - date
                - type
                - proximity-score
                - sentiment-score
                additionalProperties: false
                properties:
                  date:
                    $ref: '#/components/schemas/YearMonth'
                  type:
                    $ref: '#/components/schemas/RelationshipType'
                  proximity-score:
                    type: number
                    minimum: 0.0
                    maximum: 1.0
                  sentiment-score:
                    type: number
                    minimum: -1.0
                    maximum: 1.0
              target-concept:
                $ref: '#/components/schemas/Concept'
    ConceptIdsObject:
      type: object
      required:
      - ids
      additionalProperties: false
      properties:
        ids:
          type: array
          items:
            $ref: '#/components/schemas/ResourceId'
          uniqueItems: true
          minItems: 1
          maxItems: 100
    PostAffinityQuery:
      type: object
      required:
      - relationship
      - source-concept
      additionalProperties: false
      properties:
        relationship:
          type: object
          required:
          - type
          - date
          - interval
          properties:
            type:
              $ref: '#/components/schemas/RelationshipType'
            date:
              type: object
              required:
              - start
              - end
              properties:
                start:
                  $ref: '#/components/schemas/YearMonth'
                end:
                  $ref: '#/components/schemas/YearMonth'
            interval:
              $ref: '#/components/schemas/IntervalType'
            limit-per-interval:
              type: integer
              default: 10
              minimum: 1
              maximum: 100
        source-concept:
          type: object
          required:
          - id
          properties:
            id:
              $ref: '#/components/schemas/ResourceId'
        target-concepts:
          anyOf:
          - $ref: '#/components/schemas/ConceptIdsObject'
          - type: object
            anyOf:
            - required:
              - types
            - required:
              - exclude
            additionalProperties: false
            properties:
              types:
                type: array
                items:
                  $ref: '#/components/schemas/ConceptTypeEnum'
                uniqueItems: true
                minItems: 1
              exclude:
                $ref: '#/components/schemas/ConceptIdsObject'
    ConceptTypeEnum:
      type: string
      enum:
      - entity
      - entity/person
      - entity/organisation
      - entity/location
      - entity/substance
      - entity/disease
      - entity/product
      - entity/regulation
      - topic
  securitySchemes:
    OAuth2:
      type: oauth2
      description: "To obtain the Bearer Token using the Client ID / Secret pair provided to you:\n\n```bash\ncurl -X POST \\\n  -d 'grant_type=client_credentials' \\\n  -d 'client_id=YOUR_CLIENT_ID' \\\n  -d 'client_secret=YOUR_CLIENT_SECRET' \\\n  https://api.signal-ai.com/auth/token\n```\n\nThis will return the following JSON response:\n\n```json\n{\n    \"access_token\": \"eyJhbGciOi…\",\n    \"expires_in\": 86400,\n    …\n}\n```\n\nYou must send the `access_token` from this response in the Authorization header when making requests to other API endpoints:\n\n```bash\ncurl -H \"Authorization: Bearer eyJhbGciOi…\" \\\n  https://api.signal-ai.com/…\n```\n\nAccess tokens will expire 24 hours from the time they were issued.\n"
      flows:
        clientCredentials:
          tokenUrl: https://api.signal-ai.com/auth/token
          scopes:
            default: Access to discovery endpoints
            search: Access to content search endpoint
            metrics: Access to content metrics endpoint
            affinity: Access to concept affinity endpoints
            events: Access to events endpoint
            risk-events: Access to risk events
            manage-organisation: Access to organisation administration endpoints
x-tagGroups:
- name: Concept Discovery
  tags:
  - Publication sources
  - Topics
  - Entities
  - Categories
- name: Search
  tags:
  - Content Search
- name: Metrics
  tags:
  - Content Metrics
- name: Affinity
  x-displayName: Affinity
  tags:
  - Affinity
- name: Events
  x-displayName: Events
  tags:
  - Events
- name: Risk (Alpha)
  tags:
  - Risk Events
- name: Organisation
  tags:
  - Organisation