Skip to content
//Text Analytics: Sentiment, Topics & Keywords example\\

A web page and a CSV column

Analyse the text of a web page as one document and the product titles of a CSV file (the text column is found automatically), with topics written in Spanish.

Updated November 12, 2026

What this example returns

This example returns up to 12 analysed texts.

The dataset’s “Sentiment” view shows 17 columns: Text, Sentiment, Score (-1 to 1), Positive, Neutral, Negative, Confidence, Emotion, Topics, Keywords, Categories, Aspect sentiment, Summary, Language, Source, Row, and Error. See every output field.

What each setting does

The input this example runs Text Analytics: Sentiment, Topics & Keywords with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

File or page links fileUrls

https://en.wikipedia.org/wiki/Sentiment_analysis, https://raw.githubusercontent.com/plotly/datasets/master/amazon-purchases-sample.csv

Links to CSV, TSV, JSON, JSON Lines or plain text files (one text per row or line), or to web pages (the readable text of the page is analysed as one text). Exports from spreadsheets, storage buckets and other runs work too.

Max texts maxItems

12

Stop after this many texts have been analysed. Leave empty or 0 to analyse everything you gave. Empty texts are skipped and not counted.

Keywords keywords

No

Up to 5 key words or phrases per text, taken from the text as written.

Default: Yes → this example uses No

Language for topics and summaries outputLanguage

Spanish

Topics and summaries are written in this language, whatever the language of the text, so results from many languages can be compared. Keywords stay as written in the text.

Default: English → this example uses Spanish

AI model model

openai/gpt-4.1-nano

The AI model that reads the texts, as author/model (for example google/gemini-2.5-flash-lite or openai/gpt-4.1-mini). The default is fast and accurate for sentiment. A larger model costs more AI model usage per text.

Default: google/gemini-2.5-flash-lite → this example uses openai/gpt-4.1-nano

.json
{
  "fileUrls": [
    "https://en.wikipedia.org/wiki/Sentiment_analysis",
    "https://raw.githubusercontent.com/plotly/datasets/master/amazon-purchases-sample.csv"
  ],
  "maxItems": 12,
  "model": "openai/gpt-4.1-nano",
  "keywords": false,
  "outputLanguage": "Spanish"
}

What it costs

From about $0.021 for 12 analysed texts

An estimate at the lowest plan price: 12 × $0.00174 per analysed text (One text analysed and saved: sentiment with scores, language, and the emotion, topics, keywords, categories and summary you chose. Empty texts and texts that could not be analysed are free). A run is charged for the events it reports, so one that finds fewer analysed texts costs less. Platform usage is billed on top, typically about $0.02 per 1,000 results.

Full pricing

When to use this example

From the Text Analytics: Sentiment, Topics & Keywords readme:

How accurate is the sentiment?

It comes from a current AI language model that reads each text in context, so sarcasm, negation ("not bad at all"), emojis and mixed reviews are taken into account. The scores are the model's own confidence, not a calibrated probability; for borderline texts check the neutralScore.

Can I analyse the results of a scraper automatically?

Yes. Add an integration or webhook to the scraper run that starts this one with datasetId set to the run's defaultDatasetId. Set textFields to the field that holds the text, for example text, commentText or reviewText.

Other ways to run Text Analytics: Sentiment, Topics & Keywords

  • Product reviews in five languagesTen short reviews and comments in English, German, Spanish, French and Japanese with aspect sentiment for price, quality, delivery and customer service, plus a one-sentence summary of each.

All examples of Text Analytics: Sentiment, Topics & Keywords

About Text Analytics: Sentiment, Topics & Keywords

Score the sentiment of reviews, comments, posts or any text column, and get emotion, topics, keywords, your own categories with aspect sentiment, and a run summary. Texts, datasets of other runs, CSV/JSON files or web pages, in any language.

Price:
from $1.74 / 1,000 results
Developer:
Querystone

Text Analytics: Sentiment, Topics & Keywords pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.