×

ContextualWeb Web, News and Image Search APIs - Quick Start Guide

Step 4: Use your engine programmatically

To get actual code snippets to embed in your application, simply choose your programming language from the dropdown menu:

Then, choose which snippet you'd like to see:

And check out the code snippet and response example:

If you need more help with Rapid API, feel free to head on over to their tutorial.

If you need a primer on how APIs work, check out this awesome guide by Smashing Magazine.

Example

Below, you'll find an example of the a GET request and a corresponding response 200.

https://contextualwebsearch-websearch-v1.p.rapidapi.com/api/Search

/WebSearchAPI?q="Taylor Swift"

{
  "_type": "news",
  "didUMean": "",
  "totalCount": 2311,
  "relatedSearch": [
    "scooter braun",
    "cats",
    "concerts",
    "ariana grande",
    "judi dench",
    "jennifer hudson",
    "taylor swift score 10",
    "trailer",
    "prime day",
    "off drama with fun",
    "new york",
    "stars"
  ],
  "value": [
    {
      "title": "Article title",
      "url": "Article URL",
      "description": "Article description",
      "body": "Body of article",
      "language": "en",
      "isSafe": true,
      "datePublished": "2019-07-29T21:06:00",
      "provider": {
        "name": "Publisher name"
      },
      "image": {
        "url": "Image URL",
        "height": 480,
        "width": 480,
        "thumbnail": "https://contextualwebsearch.com/api/thumbnail/get?value=8452069667708416433",
        "thumbnailHeight": 240,
        "thumbnailWidth": 240,
        "base64Encoding": null
      }
    }
  ]
} 

Wrap up

That was easy! Now you're up and running with ContextualWeb Search API. You can now embed powerful web, image or news search in your app or website. If you need any help getting started, please don’t hesitate to reach out - we’d love to hear from you.