Word filter problem

Hello there! I am a student I doing some code-y thing so I good at python and I want to make a word game where people need to answer the request alphabet and you need to think a word that contain alphabet like word bomb on roblox but I have some issue I don't know how to send a request to oxford api that have a request alphabet to let it search entire dictionary and get that word contain that alphabet to place it on "fake" api data store and I don't know how filter the word like I just want what it mean but it keep sending a lot of message that my eyeball can't believe what I just saw and I trying to do dictionary which is not go at broswer just go to my python program and there you go
help me please. D:I'm 13.

Comments

  • SimoneSimone Administrator admin

    Hi @mooping9383
    Apologies for the late reply.
    I think I need a bit more clarification about what are you trying to do.
    Could you elaborate a bit more on what types of endpoints you are trying to get, and what you are getting instead?
    If possible, please the section of your code where the problem is happening, as that will help us understand the issues you are facing.

  • I mean I don't know how to filter just a word when my game have request alphabet I didn't see any documentation about this like I just want words any word that it can find in dictionary to use that word to be answer to save in my variable

  • TaisFukushimaTaisFukushima Member, Administrator, Moderator admin
    edited September 30

    Hello @mooping9383

    I am afraid that in the OD-API you won't be able to filter and make calls for words based on the alphabet. However, you could use the prefix search as a similar solution.

    You can use the parameter prefix in the Search endpoint. However, we have limited the number of results that can be retrieved to avoid performance issues. The max number of results you can retrieve from the API is 10000 entries using the pagination, in each page the max number of results is 5000.

    Here is an example query with a prefix. It returns all the words in the dictionary starting with "ma", the total number of results of this query is 5467. As the results are limited to 5000, you will get the first 5000 entries, because you're not using the offset parameter:

    https://od-api.oxforddictionaries.com:443/api/v2/search/en-gb?q=ma&prefix=true

    This is an example query with the prefix and the offset (we use this to paginate the results) parameters. This way, you will get the remaining 457 entries that were not included in the previous query:

    https://od-api.oxforddictionaries.com:443/api/v2/search/en-gb?q=ma&prefix=true&offset=5000

    I hope it helps let us know if you have more questions.
    You can also explore the API in our Documentation page.

  • That mean I can't request a random alphabet to let it search and let it get only word?

  • TaisFukushimaTaisFukushima Member, Administrator, Moderator admin

    Hello @mooping9383

    The API does not support this functionality. You won't be able to get random words or random words based on the alphabet.

Sign In or Register to comment.