Best Of
Categories
- 276 All Categories
- 4 LexiStats Corner
- 12 Review my code
- 6 Tutorials and presentations
- 89 Frequently asked questions
- 5 How to get useful technical help
- 2 Member guidelines
- 12 Suggest an improvement
- 56 Report a bug
- 7 Ask the Community: Other
- 52 Ask the Community: Technical and operational questions
- 57 General
Best Of
Re: Why does search endpoint return code 200 even in cases where search query returns no search results?
Hi @shahood,
I would say, yes, code accordingly. I think this is a case of how you interpret that combination of no result and the 200 status: my reading of it is that the call functioned correctly i.e. there were no errors (200 status), however, it did not find any corresponding data.

Re: Filter for difficulty of word?
Sorry for the late reply, I just needed to confirm a couple of points.
Are you familiar with the LexiStats tool from the OD API?
It won't give you the possibility to filter by word difficulty per se, but it will provide data about word frequency.
Depending on the type of word difficulty you are talking about, you could say that infrequent words are likely to be more difficult
(Although if you are talking only about spelling difficulty, then frequency won't necessarily help).
You can access LexiStats on our documentation page (you will need to scroll down the page to find it).
I hope this is useful, albeit not being a direct way of finding what you need!

Re: Filter for difficulty of word?
p.s.: and if you think LexiStats can indeed be useful for you, you can find out more about how it works on this presentation we had some time ago.

Re: How do I assign a variable to the definitions in JSON?
I'm not an expert, but you seem to have pulled one element successfully (audioFile); what is stopping you using the same method for definitions?

Re: How to apply exclude filter on dictionary entries
Hi @shahood,
Whether you call it confusion or not, the fact is that you cannot apply a domain filter in an entries call (but you can in a wordlist call).

Re: Google sheets integration
Hi @jharcombe0,
In principle we think it ought to be possible but none of us have actually tried it in anger. My understanding is that Google's Apps Script is based on JavaScript which is hopeful, however, there does seem to be some kind of limitation on connectivity which may yet scupper you in some way.
Essentially, all you need to do is be able to send the fully constructed request URL along with headers containing your app_id & app_key and to receive the information returned. We think all of that is possible from Google Apps Script but no one, so far as we know, has tried it out to make sure it works.

Re: What are the specifications of the MP3 file in the pronounciation
Hi @nwagh404,
The API MP3 files are MPEG-1, 160 kbps, 44,100 kHz.
We only have UK and US English audio available at the moment.
Thanks,
Robin

Re: How to use Node.js to write client-side application
Hi @nwagh404,
I've just had a chat with one of our developers and it looks like your code is sending the request to your own machine. Neither of us are particularly hot with JavaScript but if you compare your script with an auto-generated script from a tool I use called Postman (below) we think the root cause might be that you used uri
when hostname
(or maybe url
) might be more appropriate. If you're still stuck after that, unfortunately, we're both about to head home for the weekend, but maybe the Postman script might yield some other clues for you.
var http = require("https"); var options = { "method": "GET", "hostname": "od-api.oxforddictionaries.com", "port": "443", "path": "/api/v1/entries/en/ace", "headers": { "app_id": "XXXXXXXX", "app_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "cache-control": "no-cache", "postman-token": "7036f406-7b96-a8ba-7bb4-673e2c0bdc60" } }; var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Re: How to use Node.js to write client-side application
Hi @nwagh404,
FYI: I have removed the link you posted to protect your credentials.
Have you had a read through this thread yet?

Re: Is there a way to filter my word results to only characters of the alphabet?
Hi @kurtwilliam,
Good work so far and nice to see you are already thinking of ways to improve. A couple of suggestions from me: [1] write some instructions, please!; [2] you sometimes get unintended valid words created as a result of the 'sandwiching' process so maybe you could find a way to accept those words (even if they weren't in the list you pulled out). Regarding the second point, if you can get a script together to confirm whether or not a text string is valid (separately from whether or not it was on the API output list), then you could feed that text string back into one of the API endpoints to confirm whether or not that text string is a valid word.
Regarding word frequency data, we do already keep such records (although not currently for API access); there is also some demand for this type of information so it is possible that we may develop that functionality in the future.
