GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — unifapi-sdk-python/docs/NewsApi.md at main · unifapi-agent/unifapi-sdk-python

Expand file tree

/

NewsApi.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
96 lines (67 loc) · 3.07 KB
/

NewsApi.md

Copy path

File metadata and controls

96 lines (67 loc) · 3.07 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

unifapi.NewsApi

All URIs are relative to https://api.unifapi.com

Method HTTP request Description
news_search_post POST /news/search Search News

news_search_post

NewsSearchPost200Response news_search_post(news_search_request=news_search_request)

Search News

Run one live News search and receive the ranked news articles and top-stories blocks for a query, including title, publisher domain, snippet, image, and publish time.

Example

  • Bearer Authentication (bearerAuth):
import unifapi
from unifapi.models.news_search_post200_response import NewsSearchPost200Response
from unifapi.models.news_search_request import NewsSearchRequest
from unifapi.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.unifapi.com
# See configuration.py for a list of all supported configuration parameters.
configuration = unifapi.Configuration(
    host = "https://api.unifapi.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = unifapi.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with unifapi.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = unifapi.NewsApi(api_client)
    news_search_request = unifapi.NewsSearchRequest() # NewsSearchRequest |  (optional)

    try:
        # Search News
        api_response = api_instance.news_search_post(news_search_request=news_search_request)
        print("The response of NewsApi->news_search_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NewsApi->news_search_post: %s\n" % e)

Parameters

Name Type Description Notes
news_search_request NewsSearchRequest [optional]

Return type

NewsSearchPost200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Validation or invalid-id error -
401 Missing, invalid, disabled, revoked, or expired UnifAPI API key -
402 Insufficient workspace credits -
404 Resource not found -
429 Rate limited -
500 Internal error -
502 Source error -
503 Source unavailable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.