Skip to main content
Send source text, a question, and an answer. Small requests need no signup or API key.

1. Send a document, question, and answer

2. Read the response

The curl request above returned:
TokenPath picked out green and yellow as the phrase in the answer that carries a fact. It then found the text that supports it in the document at characters 115 to 131. Results come back in answer order. Loop over them like this:
Two cases to handle:
  • spans is empty. TokenPath found nothing in the answer that it could tie to the document. Render the answer without links. This is not an error.
  • source is null. TokenPath selected an answer phrase but found no supporting text for it. Render that phrase without a link.

Next steps