Twinword provides powerful text analysis APIs. These natural language processing (NLP) APIs work simply out-of-the-box. This is what makes us unique. You won’t have to deal with training data. If you simply want to know the relationship score between two documents, just make an API call and you got it. Best of all, it is provided as a REST API with the results in JSON format that can be easily parsed.
Essentially there are two ways to consume our APIs: through RapidAPI or AWS Marketplace. Regardless of which way works best for you, the API results will be exactly the same even though the endpoint URLs are different.
Here is a basic tutorial for the two methods: “Connecting Through RapidAPI” and “Connecting Through AWS Marketplace”.
Connecting Through RapidAPI
Twinword APIs are listed on RapidAPI. The benefit of using this platform is the ability to leverage their ecosystems. They have many different APIs from different providers all listed.
Furthermore, RapidAPI has SDKs for Node.js, PHP, Python, Ruby, Objective-C, Java (Android), Go, C# (.NET), Elixir, and Javascript. With these SDKs, developers can easily jump in and start making API calls almost immediately to many different APIs from one account.
Get Started
The good thing is that both platforms have very similar methods of getting started.
- Visit RapidAPI and find the API you are interested in.
- Sign up for an account and create an “App” or “Project”.
- Select an API and click the “pricing” tab to select a plan (free plan available).
- Follow the sample code and install any necessary SDKs.
You can also visit the RapidAPI Consumer Quick Start Guide for more details. It is the same guide for both platforms.
Connecting Through AWS Marketplace
Also, if you already have an Amazon account and would like your API subscription charges to be billed to your AWS account, this method is for you.
Get Started
- Visit our main API page and see our full list of APIs.
- Once you’ve selected an API, under the “Consume API” section of the API’s web demo page, click the “Subscribe on AWS Marketplace” button.
- Once on the AWS Marketplace showing the API you selected, click the “Continue” button. If prompted to, login to your AWS account.
- Then select one of the plans and click the “Create Contract” button.
- Then make sure to complete your subscription setup by clicking “Click here to setup your account” link. (Clicking this link should take you back to the Twinword site to complete the setup. Please make sure to allow any pop-ups that may have been blocked by your browser.)
- After clicking the link, you’ll be taken back to the Twinword API My Account login page. Simply login with your Amazon account, not AWS account. For your information, Amazon Web Services uses information from your Amazon.com account to identify you and allow access to Amazon Web Services. (Caution: Each user needs their own Amazon account. Shared Amazon accounts are not possible).
- After logging in, you should now see the API you subscribed to in your “Subscribed APIs” list. When you make requests to the API, please include your API key in the header as instructed in your account page. You can also track your API usage on this same page.
If your Subscription still does not show up on your “Subscribed APIs” list, check out Troubleshooting: Twinword API Account Setup via AWS Marketplace
Web Demos
If you would like to see the capabilities of our APIs, you can simply visit any of their web demo pages.
Documentation
If you are looking for the API documentation, you can find the “See Documentation” button in the “Documentation” section of each API’s web demo pages.
Our documentation is hosted on RapidAPI and are mostly the same for AWS Marketplace as well. The only differences are the API keys and the API endpoints. To confirm your keys and endpoints are working correctly, you might want to use the below CURL command in a terminal shell to test.
- RapidAPI code example:
curl --request GET \
--url 'https://twinword-word-associations-v1.p.rapidapi.com/associations/?entry=sound' \
--header 'X-RapidAPI-Key: SIGN-UP-RAPIDAPI-FOR-KEY'
- AWS Marketplace code example:
curl --request GET \
--url 'https://api.twinword.com/api/word/associations/latest/?entry=sound' \
--header 'X-Twaip-Key: LOGIN-TO-TWINWORD-API-SITE-FOR-KEY'
If you are going through RapidAPI, you’ll use the endpoint URLs listed in their code examples.
If you are connecting through AWS, check your Twinword API My Account page for the URL endpoints of the API listed in your “Subscribed APIs” list.
API Keys and Authentication
If you are going through RapidAPI, you’ll need to create an “App” or “Project” to generate an API key for it. After creating it, your unique API keys will be automatically included in the code examples.
If you are connecting through AWS, check your Twinword API My Account page for your unique API key and how to include it in your requests. This one API key will authenticate you for all APIs that you subscribed to and consume through AWS.
Check out our full API list and get started using the power of NLP right out of the box. If you have any questions, feel free to contact us or leave a comment below.
Troubleshooting: Twinword API Account Setup via AWS
If you can’t find your Twinword API subscription on your “Subscribed APIs” list, your browser’s pop-up blocker might be the issue. Enable pop-ups in your browser by clicking “always allow pop-ups and redirects from https://aws.amazon.com”. Afterwards, click again on “Click here to setup your account” for the pop-up to open automatically.
Check out the video below where we show you how to do it correctly.
We would love it if you leave us a review. A few sentences is all it takes. This enables us to continue providing the best experience possible for you, and helps others understand how Twinword API can make their life easier.
3 Comments
how to integrate this api in the vscode?
Have you got the way?? if yes then please tell
Twinword API is REST API. If you want to integrate REST API with Visual Studio Code, this blog post might be helpful: https://medium.com/refinitiv-developer-community/how-to-test-rest-api-with-visual-studio-code-rest-client-extensions-9f2e061d0299 or, https://blog.bitsrc.io/vs-codes-rest-client-plugin-is-all-you-need-to-make-api-calls-e9e95fcfd85a