Optional: Specify a custom model ID here to override the default Alchemy entity extraction model. You can also choose from the following public models: en-news: trained on English news content, es-news: trained on Spanish news content, ar-news: trained on Arabic news content

url

String

Optional: Input here will appear as the url value in the response.

coreference

String

Optional: Set this to 0 to treat coreferences as separate entities (coreferences are resolved into detected entities by default).

disambiguate

String

Optional: Set this to 0 to hide entity disambiguation information in the response.

knowledgeGraph

String

Optional: Set this to 1 to include knowledge graph information in the results. This incurs an additional transaction charge.

linkedData

String

Optional: Set this to 0 to hide Linked Data content links in the response.

quotations

String

Optional: Set this to 1 to include quotations that are linked to detected entities.

emotion

String

Optional: Set this to 1 to analyze emotions associated with each detected entity. This incurs an additional transaction charge.

sentiment

String

Optional: Set this to 1 to analyze the sentiment towards each detected entity. This incurs an additional transaction charge.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

structuredEntities

String

Optional: Set this to 0 to ignore structured entities, such as Quantity, EmailAddress, TwitterHandle, Hashtag, and IPAddress.

Optional: Specify a custom model ID here to override the default Alchemy entity extraction model. You can also choose from the following public models: en-news: trained on English news content, es-news: trained on Spanish news content, ar-news: trained on Arabic news content

coreference

String

Optional: Set this to 0 to treat coreferences as separate entities (coreferences are resolved into detected entities by default).

disambiguate

String

Optional: Set this to 0 to hide entity disambiguation information in the response.

knowledgeGraph

String

Optional: Set this to 1 to include knowledge graph information in the results. This incurs an additional transaction charge.

linkedData

String

Optional: Set this to 0 to hide Linked Data content links in the response.

quotations

String

Optional: Set this to 1 to include quotations that are linked to detected entities.

emotion

String

Optional: Set this to 1 to analyze emotions associated with each detected entity. This incurs an additional transaction charge.

sentiment

String

Optional: Set this to 1 to analyze the sentiment towards each detected entity. This incurs an additional transaction charge.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

structuredEntities

String

Optional: Set this to 0 to ignore structured entities, such as Quantity, EmailAddress, TwitterHandle, Hashtag, and IPAddress.

Optional: Specify a custom model ID here to override the default Alchemy entity extraction model. You can also choose from the following public models: en-news: trained on English news content, es-news: trained on Spanish news content, ar-news: trained on Arabic news content

coreference

String

Optional: Set this to 0 to treat coreferences as separate entities (coreferences are resolved into detected entities by default).

disambiguate

String

Optional: Set this to 0 to hide entity disambiguation information in the response.

knowledgeGraph

String

Optional: Set this to 1 to include knowledge graph information in the results. This incurs an additional transaction charge.

linkedData

String

Optional: Set this to 0 to hide Linked Data content links in the response.

quotations

String

Optional: Set this to 1 to include quotations that are linked to detected entities.

emotion

String

Optional: Set this to 1 to analyze emotions associated with each detected entity. This incurs an additional transaction charge.

sentiment

String

Optional: Set this to 1 to analyze the sentiment towards each detected entity. This incurs an additional transaction charge.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

structuredEntities

String

Optional: Set this to 0 to ignore structured entities, such as Quantity, EmailAddress, TwitterHandle, Hashtag, and IPAddress.

Optional: Set this to 1 to identify keywords in detected relations. This incurs an additional transaction charge.

entities

String

Optional: Set this to 1 to identify named entities in detected relations. This incurs an additional transaction charge.

requireEntities

String

Optional: Set this to 1 to restrict results to relations that contain at least one named entity.

coreference

String

Optional: Set this to 0 to treat coreferences as separate entities (coreferences are resolved into detected entities by default).

disambiguate

String

Optional: Set this to 0 to hide entity disambiguation information in the response.

knowledgeGraph

String

Optional: Set this to 1 to include knowledge graph information in the results. This incurs an additional transaction charge.

linkedData

String

Optional: Set this to 0 to hide Linked Data content links in the response.

sentiment

String

Optional: Set this to 1 to analyze the sentiment towards each result. This incurs an additional transaction charge.

sentimentExcludeEntities

String

Optional: Set this to 1 to exclude named entity text from sentiment analysis. For exapmle, do not analyze "New" in "New York".

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

AlchemyText.getTypedRelationsFromHtml

Use custom models to identify typed relations between detected entities in HTML document. Source text in Typed Relations calls is truncated to 5 KB. Typed relations identify different types of connections between detected entities. For example, the entities "Oscar" and "Leonardo DiCaprio" might be linked by an "awardedTo" relation. To tailor results for your domain, you can specify your own custom entities and relations with custom models in Watson Knowledge Studio.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

html

File

Required: File with HTML content.

url

String

Optional: Input here will appear as the url value in the response.

model

String

Optional: The unique alphanumeric identifier for your custom model. You can also choose from the following public models: en-news: trained on English news content (default); es-news: trained on Spanish news content; ar-news: trained on Arabic news content.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

AlchemyText.getTypedRelationsFromUrl

Use custom models to identify typed relations between detected entities from a webpage. Source text in Typed Relations calls is truncated to 5 KB. Typed relations identify different types of connections between detected entities. For example, the entities "Oscar" and "Leonardo DiCaprio" might be linked by an "awardedTo" relation. To tailor results for your domain, you can specify your own custom entities and relations with custom models in Watson Knowledge Studio.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

url

String

Required: HTTP URL.

model

String

Optional: The unique alphanumeric identifier for your custom model. You can also choose from the following public models: en-news: trained on English news content (default); es-news: trained on Spanish news content; ar-news: trained on Arabic news content.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

AlchemyText.getTypedRelationsFromText

Use custom models to identify typed relations between detected entities in plain text. Source text in Typed Relations calls is truncated to 5 KB. Typed relations identify different types of connections between detected entities. For example, the entities "Oscar" and "Leonardo DiCaprio" might be linked by an "awardedTo" relation. To tailor results for your domain, you can specify your own custom entities and relations with custom models in Watson Knowledge Studio.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

text

File

Required: File with text content.

url

String

Optional: Input here will appear as the url value in the response.

model

String

Optional: The unique alphanumeric identifier for your custom model. You can also choose from the following public models: en-news: trained on English news content (default); es-news: trained on Spanish news content; ar-news: trained on Arabic news content.

AlchemyText.getTextFromHtml

Extract primary text content from an HTML document. Cleaned page text is obtained by default in other HTML and URL functions. You can view the results of page cleaning in responses from most of the other methods by passing showSourceText=1.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

html

File

Required: File with HTML content.

url

String

Optional: Input here will appear as the url value in the response.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

extractLinks

String

Optional: Set this to 1 to include hyperlinks in the extracted text.

useMetadata

String

Optional: Set this to 0 to ignore description information in webpage metadata.

Optional: An XPath query to apply to the web page. Required when sourceText is set to one of the XPath values. Parameter is only used if indicated html or url parameter.

sourceText

String

Optional: How to obtain the source text from the webpage. For more details see This page Parameter is only used if indicated html or url parameter.

AlchemyText.getTextFromUrl

Extract primary text content from a webpage. Cleaned page text is obtained by default in other HTML and URL functions. You can view the results of page cleaning in responses from most of the other methods by passing showSourceText=1.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

url

String

Required: HTTP URL.

showSourceText

String

Optional: Set this to 1 to include the source text in the response.

extractLinks

String

Optional: Set this to 1 to include hyperlinks in the extracted text.

useMetadata

String

Optional: Set this to 0 to ignore description information in webpage metadata.

Optional: An XPath query to apply to the web page. Required when sourceText is set to one of the XPath values. Parameter is only used if indicated html or url parameter.

sourceText

String

Optional: How to obtain the source text from the webpage. For more details see This page Parameter is only used if indicated html or url parameter.

AlchemyText.getRawTextFromHtml

Extract the plain text from an HTML document.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

html

File

Required: File with HTML content.

url

String

Optional: Input here will appear as the url value in the response.

AlchemyText.getRawTextFromUrl

Extract the plain text from a webpage.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

url

String

Required: HTTP URL.

AlchemyText.getTitleFromHtml

Extract the page title from an HTML document.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

html

File

Required: File with HTML content.

url

String

Optional: Input here will appear as the url value in the response.

useMetadata

String

Optional: 1 or 0. Whether to use title information from the web page metadata (default = 1: enabled).

AlchemyText.getTitleFromUrl

Extract the page title from a webpage.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

url

String

Required: HTTP URL.

useMetadata

String

Optional: 1 or 0. Whether to use title information from the web page metadata (default = 1: enabled).

AlchemyText.getModels

This endpoint allow you to manage custom models that are deployed to your AlchemyAPI service instance. With an Advanced pricing plan and access to Watson Knowledge Studio, you can create your own custom model that specializes in understanding entities and relations that are unique to your domain.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

AlchemyText.deleteSingleModel

Deletes a custom model that was deployed to your AlchemyAPI service instance from Watson Knowledge Studio.

Field

Type

Description

apiKey

credentials

Required: API key obtained from AlchemyAPI.

modelId

credentials

Required: The unique identifier for the model that you want to delete.