Skip to content
Menu
SilktideDevelopers

Get answers in full, with their text, mentions and sources

GET/v1/results/accounts/presence/answers
View as Markdown

Returns every answer assistants gave, in full: the text, the brands it mentions and the pages it cites. Use it to keep a copy of your answers in your own database, as Load Presence into a warehouse does. To list answers without their text, or only those that cite a site, use List answers.

Send marketId for one market, or workspaceId for every market the API key's user can see. Someone who can see only some of an account's markets gets only those markets' answers.

Reading every answer#

Answers come a page at a time, up to 200. When nextAfter is not null, send the same request with after set to it, until it is null. Each answer comes once.

The first request settles the dates. With after, from and to are ignored, so answers that arrive while you read do not move the pages. Pages are grouped by topic and oldest first within a topic, so do not expect one run of dates across them.

Read one page after another, and stay within the rate limit. A page of 200 is often more than a megabyte.

Keeping your copy up to date#

Save each answer under its responseId, replacing the one you have. Then read recent days again on each run:

  • An answer can arrive hours after it was asked for, and keeps the time it was asked for as requestedAt.
  • Its mentions can be worked out again later, which gives them new mentionIds. Replace an answer's mentions and sources together, rather than one at a time.
  • An answer can be removed. It stops being returned, so replace a whole day rather than only adding to it.

topicName, marketIds, region, brandId and the names of brands are as they are now, not as they were when the answer was given.

Matching Silktide's figures#

Reports in Silktide leave out some of what is here:

  • They count ok and not_shown answers, and leave out unavailable and failed, when nothing was measured.
  • They leave out mentions with a relevance of 0 when they work out sentiment, and anything named in a search engine's results page.
  • They rank only the brands you track. position here is the place among every name in the answer.
  • They count a source only when cited is true. Only some assistants say what they read and did not cite. For the rest, every source is one the answer cites.

Fact checks have no topic. Ask for them with arena=fact. In a market, they are those about the brands in that market, whether yours or a competitor. Fact checks of a fact that has been deleted for good are only in a read of the whole account.

Request
curl "https://api.eu.silktide.com/v1/results/accounts/presence/answers?marketId=3&from=1793577600&to=1793663999&limit=1" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
Response: One day's answers in one market
{
  "result": {
    "workspaceId": 1,
    "from": 1793577600,
    "to": 1793663999,
    "limit": 1,
    "responses": [
      {
        "responseId": 83810,
        "promptId": 12,
        "promptText": "Who sells used oak barrels to small wineries?",
        "topicId": 7,
        "topicName": "Used barrels",
        "workspaceId": 1,
        "marketIds": [
          3
        ],
        "arena": "market",
        "region": {
          "regionId": 2,
          "name": "United States",
          "countryCode": "US",
          "stateCode": "",
          "language": "en-US"
        },
        "requestedAt": 1793610000,
        "platformId": "gemini",
        "model": "",
        "status": "ok",
        "error": null,
        "truncated": false,
        "answer": "Small wineries usually buy from one of these:\n\n1. **Fake Wine Barrel** is the best choice for small orders [1].\n2. **Example Cooperage** sells by the truckload.",
        "mentions": [
          {
            "mentionId": 410221,
            "surfaceText": "Fake Wine Barrel",
            "position": 1,
            "portrayal": "positive",
            "quotes": [
              {
                "text": "the best choice for small orders",
                "tone": "praise",
                "superlative": true
              }
            ],
            "relevance": 2,
            "entityId": 91,
            "brandId": 4,
            "url": "https://fakewinebarrel.com/",
            "name": "Fake Wine Barrel",
            "brandName": "Fake Wine Barrel"
          },
          {
            "mentionId": 410222,
            "surfaceText": "Example Cooperage",
            "position": 2,
            "portrayal": "neutral",
            "quotes": [],
            "relevance": 2,
            "entityId": 137,
            "brandId": null,
            "url": "",
            "name": "Example Cooperage",
            "brandName": null
          }
        ],
        "sources": [
          {
            "sourceId": 902114,
            "url": "https://blog.fakewinebarrel.com/buying-used",
            "host": "blog.fakewinebarrel.com",
            "domain": "fakewinebarrel.com",
            "title": "How to buy a used barrel",
            "position": 1,
            "cited": true
          },
          {
            "sourceId": 902115,
            "url": "https://example.com/barrel-prices",
            "host": "example.com",
            "domain": "example.com",
            "title": "Barrel prices this year",
            "position": 0,
            "cited": false
          }
        ]
      }
    ],
    "nextAfter": "1793577600-1793663999-7-1793610000-83810"
  },
  "selector": "/v1/results/accounts/presence/answers",
  "duration": 0.05
}

Request

Query parameters

  • marketIdintegerat least 1

    Only this market: the number after /presence/ in the market's address in Silktide. Needed unless you send workspaceId.

  • workspaceIdintegerat least 1

    Every market the API key's user can see, when sent without marketId. Get the workspace answers with it.

  • frominteger

    Only answers asked for at or after this time, in Unix seconds. Defaults to 30 days before to.

  • tointeger

    Only answers asked for at or before this time, in Unix seconds. Defaults to now.

  • platformsstring

    Only these assistants, by id, comma-separated, such as chatgpt,gemini. Left out, all of them. An unknown id matches nothing.

  • topicsstring

    Only these topics, by id, comma-separated. Left out, all of them.

  • regionsstring

    Only these regions, by regionId, comma-separated. Left out, all of them.

  • promptintegerat least 1

    Only answers to this prompt, by id.

  • arenastring

    Which prompts' answers to read: market for prompts about a subject, reputation for prompts about a brand itself, all for both, or fact for fact checks, which the others leave out. Defaults to all.

    One ofallmarketreputationfact

  • statusesstring

    Only answers with these statuses, comma-separated: ok, not_shown, unavailable, failed. Left out, all four.

  • limitinteger1 to 200

    How many answers to return, up to 200. Defaults to 100.

  • afterstring

    Where to carry on from: the nextAfter of the last answers you read. Send it as it came, with everything else unchanged.

Response

200JSON.

  • resultobjectrequired

    The answer.

    Show 6 fields
    • workspaceIdintegerrequiredat least 1

      Where the account's markets live.

    • fromintegerrequired

      The first moment read.

    • tointegerrequired

      The last moment read.

    • limitintegerrequired1 to 200

      The most answers this could return.

    • responseslist of objectsrequired

      The answers, one per response, grouped by topic, oldest first within each.

      Show 18 fields
      • responseIdintegerrequiredat least 1

        The answer: one prompt put to one assistant, once. Save each answer under this id.

      • promptIdintegerrequiredat least 1

        The prompt.

      • promptTextstringrequired

        The prompt, as it was put to this assistant.

      • topicIdintegerrequiredcan be nullat least 1

        The prompt's topic. Null for a fact check.

      • topicNamestringrequiredcan be null

        The topic's name now. Null for a fact check.

      • workspaceIdintegerrequiredat least 1

        Where the account's markets live.

      • marketIdslist of integersrequired

        The markets the prompt's topic is in now, of those the API key's user can see. A topic can be in several. Empty for a fact check.

      • arenastringrequiredcan be null

        What the prompt was about: market for a subject, reputation for a brand itself, or fact for a fact check. Null for some answers from before this was recorded.

        One ofmarketreputationfact

      • regionobjectrequiredcan be null

        Where and in which language the prompt was asked. Null when the region no longer exists.

        Show 5 fields
        • regionIdintegerrequiredat least 1

          The region.

        • namestringrequired

          The region's name.

        • countryCodestringrequired

          The country, as two letters: US.

        • stateCodestringrequired

          The state or subdivision, such as TX. Empty for a whole country.

        • languagestringrequired

          The language the prompt was asked in, such as en-US.

      • requestedAtintegerrequired

        When the answer was asked for. Prompts asked together share it. The answer may have come hours later.

      • platformIdstringrequired

        The assistant, by id, such as chatgpt.

      • modelstringrequired

        The model that answered, where the assistant says which. Otherwise empty.

      • statusstringrequired

        ok when the assistant answered, not_shown when it showed no answer to this prompt, unavailable when its service returned nothing usable, or failed.

        One ofoknot_shownunavailablefailed

      • errorstringrequiredcan be null

        Why there is no answer, in words. Null when there is one, or no more to say.

      • truncatedbooleanrequired

        Whether the assistant stopped before it had finished, so the answer is cut short.

      • answerstringrequiredcan be null

        The whole answer, as Markdown. Null when there is none.

      • mentionslist of objectsrequired

        Every name of a brand, company or product in the answer, in the order it names them.

        Show 11 fields
        • mentionIdintegerrequiredat least 1

          The mention.

        • surfaceTextstringrequired

          The name as the answer wrote it.

        • positionintegerrequired

          Where the name comes among every name in the answer, from 1. Counts names you do not track too.

        • portrayalstringrequired

          How the answer speaks of it: praised, both praised and criticized, neither, or criticized.

          One ofpositivemixedneutralnegative

        • quoteslist of objectsrequired

          The parts of the answer that praise or criticize it. Up to three of each. Often empty.

          Show 3 fields
          • textstringrequired

            The words, exactly as the answer has them.

          • tonestringrequired

            Whether they praise or criticize.

            One ofpraisecriticism

          • superlativebooleanrequired

            Whether they call it the best, or the worst, outright.

        • relevanceintegerrequired0 to 2

          2 when the answer offers it as an answer to the prompt, 1 when it is connected to the prompt but not offered, 0 when it is only named in passing.

        • entityIdintegerrequiredcan be nullat least 1

          The company, product or other thing named. The same id wherever it is named. Null when it was not identified.

        • brandIdintegerrequiredcan be nullat least 1

          The brand you track that this is. Null when you do not track it.

        • urlstringrequired

          Its website. Empty when not known.

        • namestringrequired

          Its name, whichever way this answer wrote it.

        • brandNamestringrequiredcan be null

          The name of the brand you track. Null when you do not track it.

      • sourceslist of objectsrequired

        The pages behind the answer: those it cites, in order, then any it read and did not cite.

        Show 7 fields
        • sourceIdintegerrequiredat least 1

          The source.

        • urlstringrequired

          The page.

        • hoststringrequired

          The page's host, such as blog.fakewinebarrel.com.

        • domainstringrequired

          The domain the host is under, such as fakewinebarrel.com.

        • titlestringrequired

          The page's title, as the assistant gave it. Empty when it gave none.

        • positionintegerrequired

          Where the page comes among those the answer cites, from 1. 0 for a page it did not cite.

        • citedbooleanrequired

          Whether the answer cites the page. False when the assistant read it and did not cite it.

    • nextAfterstringrequiredcan be null

      What to send as after to carry on. Null when there are no more.

  • selectorstringrequired

    The query that answered, as its path: /v1/results/scores.

  • durationnumberrequired

    Seconds Silktide took to answer.

Errors

StatusTypeWhen
200InvalidRequestNeither marketId nor workspaceId was sent. The error's own status is 400 and properties.field is marketId. The body is an error despite the status.
200InvalidRequestlimit is not a whole number from 1 to 200. The error's own status is 400 and properties.field is limit. The body is an error despite the status.
200InvalidRequestafter is not a nextAfter this query sent. Another argument it cannot read is named in the same way. The error's own status is 400 and properties.field is after. The body is an error despite the status.
200AccessDeniedNo such workspace or market exists in the account, or the API key's user cannot see it. Its status is 403. The body is an error despite the status.
200EditionNotAvailableThe account does not have Silktide 5. Its status is 403. The body is an error despite the status.
401NotLoggedInNo API key was sent, or it is not a key for this region.(any operation)
429TooManyRequestsToo many requests to this path in five seconds. Retry after the number of seconds in the Retry-After header, which properties.retryAfter repeats.(any operation)
503-Silktide is busy. Retry after the number of seconds in the Retry-After header.(any operation)

Every error has the same body. See Errors.

Access

Permission
Can see this market
Plan feature
None
Edition
Silktide 5 only
Cost
Free
Available since
v1.2.0

Try it

Sends a real request to your account from this browser. Your key stays in this tab and goes only to the Silktide API.