cambridge dictionary scraper avatar

cambridge dictionary scraper

Try for free

1 day trial then $5.00/month - No credit card required now

Go to Store
cambridge dictionary scraper

cambridge dictionary scraper

dev_bodex/cambridge-dictionary-scraper
Try for free

1 day trial then $5.00/month - No credit card required now

This Cambridge Dictionary Scraper Apify Actor automates extracting word definitions, synonyms, examples, and translations from the Cambridge Dictionary. Built with Node.js and Puppeteer, it returns structured data, ideal for language processing, research, and educational use.

This Apify actor is designed to scrape word definitions, phonetics, pronunciations, example sentences, and other relevant linguistic data from the Cambridge Dictionary. This actor automates the process of extracting dictionary entries for specified words, making it easy to collect language data for learning, research, or integration into apps.

Features

  • Input Word List: Accepts a list of words to search for on the Cambridge Dictionary website.

  • Rich Data Collection: Scrapes various details about each word, including: Word definitions, Word phonetics (UK/US), Pronunciation audio links (UK/US), Part of speech (noun, verb, adjective, etc.), Example sentences, Synonyms and antonyms (if available)

  • Output Formats: Results can be downloaded in JSON format for easy integration or analysis.

How It Works

This actor navigates the Cambridge Dictionary website and retrieves the requested data for each word input. It can also retrieve translations if they are provided on the dictionary page for a specific word.

Input

The input is a JSON object with a list of words to scrape:

1{
2  "words": "Iron"
3}
  • *words: The words for which you want to retrieve dictionary entries.

Output

The output is an array of objects where each object contains the information for one word. For example:

1[{
2  "searchWord": "Iron",
3  "result": {
4    "UK Dictionary": {
5      "partOfSpeech": "noun",
6      "pronounce": {
7        "UK": {
8          "audioList": [
9            "https://dictionary.cambridge.org/media/english/uk_pron/u/uki/ukiri/ukiridi009.mp3",
10            "https://dictionary.cambridge.org/media/english/uk_pron_ogg/u/uki/ukiri/ukiridi009.ogg"
11          ],
12          "pron": "/aɪən/"
13        },
14        "US": {
15          "audioList": [
16            "https://dictionary.cambridge.org/media/english/us_pron/i/iro/iron_/iron.mp3",
17            "https://dictionary.cambridge.org/media/english/us_pron_ogg/i/iro/iron_/iron.ogg"
18          ],
19          "pron": "/aɪrn/"
20        }
21      },
22      "details": [
23        {
24          "defintion": "a chemical element that is a common greyish-coloured metal. It is strong, used in making steel, and exists in very small amounts in blood:",
25          "example": [
26            "Iron rusts easily.",
27            "Liver is a particularly rich source of dietary iron.",
28            "iron ore",
29            "an iron deficiency"
30          ]
31        },
32        {
33          "defintion": "a piece of equipment for making clothes flat and smooth that has a handle and a flat base and is usually heated with electricity:",
34          "example": [
35            "a steam iron",
36            "a travel iron"
37          ]
38        },
39        {
40          "defintion": "a stick that has an iron or steel part at the end that is used to hit the ball in golf:",
41          "example": [
42            "He'll probably use a 2 or 3 iron for the shot."
43          ]
44        },
45        {
46          "defintion": "chains tied around someone to prevent them from escaping or moving:",
47          "example": [
48            "It was common practice for the prisoners to be clapped in irons (= tied with chains)."
49          ]
50        },
51        {
52          "defintion": "to make clothes flat and smooth using an iron:",
53          "example": [
54            "It takes about five minutes to iron a shirt properly.",
55            "Synonym\npress"
56          ]
57        },
58        {
59          "defintion": "very strong physically, mentally, or emotionally:",
60          "example": [
61            "I think you have to have an iron will to make some of these decisions."
62          ]
63        }
64      ]
65    },
66    "AMERICAN DICTIONARY": {
67      "partOfSpeech": "noun",
68      "pronounce": {
69        "US": {
70          "audioList": [
71            "https://dictionary.cambridge.org/media/english/us_pron/i/iro/iron_/iron.mp3",
72            "https://dictionary.cambridge.org/media/english/us_pron_ogg/i/iro/iron_/iron.ogg"
73          ],
74          "pron": "/ˈɑɪ·ərn/"
75        }
76      },
77      "details": [
78        {
79          "defintion": "a common, silver-colored, metal element that is magnetic and strong, is used in making steel, and is found in small amounts in blood and in all living things:",
80          "example": [
81            "Iron rusts easily.",
82            "Liver is a rich source of dietary iron."
83          ]
84        },
85        {
86          "defintion": "a device with a handle and a flat metal base that can be heated and pressed against cloth to make the cloth smooth"
87        },
88        {
89          "defintion": "to make cloth smooth using an iron:",
90          "example": [
91            "I have to iron this skirt.",
92            "[ M ] Let me iron out the wrinkles in this tablecloth."
93          ]
94        },
95        {
96          "defintion": "made of or containing iron:",
97          "example": [
98            "iron ore",
99            "an iron railing along the steps",
100            "fig. Her success depended on physical strength and an iron will (= strong determination)."
101          ]
102        }
103      ]
104    },
105    "BUSINESS ENGLISH": {
106      "partOfSpeech": "noun",
107      "pronounce": {
108        "UK": {
109          "audioList": [
110            "https://dictionary.cambridge.org/media/english/uk_pron/u/uki/ukiri/ukiridi009.mp3",
111            "https://dictionary.cambridge.org/media/english/uk_pron_ogg/u/uki/ukiri/ukiridi009.ogg"
112          ],
113          "pron": "/aɪən/"
114        },
115        "US": {
116          "audioList": [
117            "https://dictionary.cambridge.org/media/english/us_pron/i/iro/iron_/iron.mp3",
118            "https://dictionary.cambridge.org/media/english/us_pron_ogg/i/iro/iron_/iron.ogg"
119          ]
120        }
121      },
122      "details": [
123        {
124          "defintion": "a common metal element used in making steel:",
125          "example": [
126            "Heavy industries, like iron and steel, can take advantage of the government's increased public-works spending."
127          ]
128        }
129      ]
130    }
131  }
132}]

Key Scraped Data For the word, the scraper retrieves:

  • Word: The original word.
  • Phonetics: The UK and US pronunciation phonetic spellings.
  • Pronunciation: Links to UK and US pronunciation audio files.
  • Definitions: The primary meaning of the word.
  • Part of Speech: Whether the word is a noun, verb, adjective, etc.
  • Example Sentences: Sentences that show the word in context.
  • Synonyms and Antonyms: Related words, if available.

Output Formats

JSON

Usage

On the Apify Platform

  1. Go to the Cambridge Dictionary Scraper actor on Apify.
  2. Click Try for Free.
  3. Provide a the words in the input.
  4. Run the actor and wait for it to complete.
  5. Download the results.

Locally via Apify CLI

  1. Install Apify CLI.
  2. Run the actor locally using the following command:
apify run your-username/cambridge-dictionary-scraper --input='{"words": "Iron"}'

Input Example

1{
2  "words": ["Iron"]
3}

This input will fetch the dictionary data for the words "Iron".

Versioning

v1.0.0: Initial release with support for word scraping and detailed data extraction.

Use Cases

  • Language Learning Apps: Enrich your app with accurate word definitions, example sentences, and audio pronunciations.
  • Translation Platforms: Retrieve word translations from the Cambridge Dictionary to enhance your platform.
  • Education Tools: Create language exercises or vocabulary quizzes using the scraped data.
  • Research and Linguistic Analysis: Collect large datasets of words, definitions, and usage examples for research purposes.

Limitations

--Only words available on the Cambridge Dictionary can be scraped. --Some words may not have translations or synonyms/antonyms available.

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • 1 star

  • >99% runs succeeded

  • Created in Oct 2024

  • Modified a month ago