I would like to retrieve a random image resource from a server that comply IIIF standard.
Using the IIIF search API, is it possible to retrieve a random resource instead of specifying a search query?
No unfortunately not. The IIIF Content Search API has been developed to search specifically within resources that may have a textual description. The compatible response from a IIIF Content Search API server is an annotation list, thus it does not make sense here to provide back a random resource.
Some IIIF adopters do provide search interfaces that could be used to retrieve random resources, but there are no IIIF specifications around this at the moment.
Example random search result: https://exhibits.stanford.edu/fitch/catalog?utf8=%E2%9C%93&exhibit_id=fitch&search_field=search&q=&sort=random+asc
Related
How can I retrieve all Arabic speaking channels locally in Israel.
Using the API explorer, I don't see such an option.
Which fields are mandatory for search to call the search API?
Is there any way to fulfill this task?
Update:
API Explorer
I couldn't get results
There are lots of parameters in the API v3 Docs for Search that you can play around with, some in particular you might find helpful are:
location
locationRadius
regionCode
relevanceLanguage
and you'll need to set type = "channel" to return only channels.
The only mandatory parameter is part which is what data you want returned from your results. For this search call, you only have one option for part, which is "snippet".
This is the only way to do it simply within your multiple parameters, and it will take 100 quota per search, assuming you have an API key already.
If you press 'Try This API' on the right, it'll even give you code snippets you can copy in a variety of languages, since you didn't specify one in the prompt.
Depending on the language, a call could look like the following:
GET https://youtube.googleapis.com/youtube/v3/search?part=snippet&location=Israel®ionCode=IL&relevanceLanguage=ar&type=channel&key=[YOUR_API_KEY] HTTP/1.1
I am trying to do a filter by urls but no result is being returned.
From the following doc, it shows it is possible https://developer.twitter.com/en/docs/tweets/rules-and-filtering/overview/premium-operators
but I think it's a premium feature. Is this true? If yes then is there any other way to filter by urls without using the premium feature?
Standard Twitter streaming API provide us with 'track' parameter. This is a Standard streaming API parameter (see the doc). It matches Tweets as by phrases as by URLs. A common use case according to the doc:
a common use case where you may want to track all mentions of a particular domain name (i.e., regardless of subdomain or path), you should use “example com” as the track parameter for “example.com”
This parameter value Will match...:
example.comwww.example.com foo.example.com foo.example.com/bar I hope my startup isn’t merely another example of a dot com boom!
I tested the option by means of twitter-hbc library for Java. It works as expected!
To avoid confusion, please, take the note:
The text of the Tweet and some entity fields are considered for matches. Specifically, the text attribute of the Tweet, expanded_url and display_url for links and media, text for hashtags, and screen_name for user mentions are checked for matches.
I need to get sharePoint sites which contain specific type of items.
As I see on this docs
https://learn.microsoft.com/en-us/graph/query-parameters
searching is only supported for messages and persons, so I would need to know up-front in which sites and lists to look for the items of the given type or use the sharePoint api not the msGraph.
Am I correct or there is some other way?
For the files, you can use /search endpoint to perform search in the OneDrive and inside SharePoint/Group document libraries. Per documentation, you can use one of the following:
GET /drives/{drive-id}/root/search(q='{search-text}')
GET /groups/{group-id}/drive/root/search(q='{search-text}')
GET /me/drive/root/search(q='{search-text}')
GET /me/drive/search(q='{search-text}')
GET /sites/{site-id}/drive/root/search(q='{search-text}')
GET /users/{user-id}/drive/root/search(q='{search-text}')
For example, to retrieve all Excel files in user's OneDrive, you would perform such request:
GET /me/drive/root/search(q='.xlsx')
More info: https://learn.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0
I have been using Ms Graph API, to download the files of OneDrive successfully.
I was looking for a way to read only the text content (for indexing purpose in my application) using Graph API, for different types of files(pdf,xls,zip,Images etc.) instead of going by the conventional approach of downloading the complete file and then extracting the text using some "Text extracting api" and then index the file, which would be a time consuming task. I am aware GraphAPI has its own search features, but it lacks ability to do complicated search like regular expression search (please correct me if I am wrong). I am sure OneDrive does its own indexing for each file which helps a user to do the basic search.
So, is there any way I can get the text content of the documents using the Graph API?
I don't believe getting a 'preview' of text-based documents is currently available through the API. You will need to make a GET request to fetch the content. If you don't want the full document, you can request a partial range of bytes that you believe would be enough for the document. In addition, to make it easier to handle different file types, we currently support converting common file formats to PDF (to possibly standardize your file parsing logic).
I can search lat/long with YouTube v3 successfully,
https://www.googleapis.com/youtube/v3/search?part=snippet,id&maxResults=50&type=video& videoType=any&key=foobar&location=40.7127,74.0059&locationRadius=100km
However, the response doesnt give me the individual videos lat/lng in the results.
The API doc says:
The part parameter specifies a comma-separated list of one or more
search resource properties that the API response will include. Set the
parameter value to snippet.
I cannot find any other search resource properties besides id and snippet in Search:list.
(Why would the API include that first sentence if there are only 2 options?) I digress.
Question-
Is there any way that I can retrieve YT videos lat/long based on lat/long search?
You can have lat/long parameters of the videos you own or manage. But due to privacy reasons (been able to locate people from their uploads.) you won't be able to get specific geolocations of other people's uploads.