Wikidata talk:Data access

From Wikidata
Jump to navigation Jump to search

SPARQL access[edit]

Other SPARQL endpoints:

--Erik Moeller (WMF) (talk) 21:18, 20 March 2015 (UTC)[reply]

I'll add this to the content page. --Denny (talk) 14:55, 26 March 2015 (UTC)[reply]

Alternative access url[edit]

Why not mentioning the alternative access option here?

http://www.wikidata.org/wiki/Special:ItemByTitle/enwiki/Douglas%20Adams

instead of the Q42 url? This human-readable url really eases data usage...

It is not a good idea: it's not permanent, and depends on Wikipedia where the title of the page can be changed anytime. -Ash Crow (talk) 00:08, 24 August 2015 (UTC)[reply]

Is Special:EntityData/Qnnn obsolete?[edit]

Page says

the concept URI of Douglas Adams is http://www.wikidata.org/entity/Q42 ... When doing so, an HTTP redirect is triggered to forward the client to the data URL of Wikidata's description of Douglas Adams: http://www.wikidata.org/wiki/Special:EntityData/Q42. The namespace for Wikidata's descriptions of entities is

http://www.wikidata.org/wiki/Special:EntityData/

but Special:EntityData now redirects to plain http://www.wikidata.org/wiki/Q42. What's the canonical URL these days? -- SPage (WMF) (talk) 21:02, 31 August 2015 (UTC)[reply]

This is all as it should be. /entity does content negotiation and redirect you to the right content based on what you request. In a webbrowser this usually means the actual html view of the item. --Lydia Pintscher (WMDE) (talk) 21:05, 31 August 2015 (UTC)[reply]
Ah, I missed that it's two redirects in a row.
  1. Requesting /entity/Q42 triggers a WMF Apache rewrite rule that always responds with a 303 "See Other" redirect to Special:EntityData/Q42 (no content negotiation).
  2. Then Special:EntityData/Q42 does the content negotation: it responds with a second 303 "See Other" that redirects to /wiki/Q42 because a browser sends Accept: text/html,other formats; or it redirects to Special:EntitytData/Q42.json, or possibly Special:EntityData/Q42.rdf, etc. depending on what other Accept: header the client sends.
I updated that section, but didn't describe this second redirect. It just says "the special page applies content negotiation to determine the format of Wikidata's output". So others may be confused about never seeing a Special:EntityData/Q42 URL in between /entity/Q42 and the final /wiki/Q42.-- SPage (WMF) (talk) 00:31, 1 September 2015 (UTC)[reply]

Please update SPARQL access[edit]

wikidataldf.com should be replaced with http://wikidataldf.wmflabs.org/

✓ Done. Feel free to do such things yourself the next time ;-). Tpt (talk) 16:32, 23 January 2016 (UTC)[reply]

http://wikidataldf.wmflabs.org/ Jackson Radebe (talk) 05:00, 9 May 2021 (UTC)[reply]

Wikidata Query deprecation[edit]

Hello,

Wikidata Query is currently down, and these messages from its author indicate that it is not bound to have more uptime, and pleases users to switch to SPARQL:

I think this page should be updated accordingly by someone with the relevant edit rights. --Crou (talk) 09:54, 28 December 2016 (UTC)[reply]

.ttl (or turtle-rdr)[edit]

I would like to confirm (before making any changes to the main page) that the format returned for examples like http://www.wikidata.org/wiki/Special:EntityData/Q42.ttl is in fact turtle-rdr (Reification Done Right) as documented on this page. On the main page, it is documented as .ttl Jsamwrites (talk) 15:18, 14 April 2017 (UTC)[reply]

dead link[edit]

Not able to remove wdq.wmflabs.org d1g (talk) 06:44, 19 May 2017 (UTC)[reply]

Warning about data access[edit]

I've removed the following from the page as it was added without discussion:

Please discuss whether we want to include this warning in the page or not. There is already some off wiki discussion of the topic in general here: phab:T193728. Mvolz (talk) 10:09, 10 December 2019 (UTC)[reply]

I'm not sure if we should include this warning or not (and where, wouldn't Wikidata:General disclaimer be a better place? and how, etc.) but I'm sure it should not be included without discussion. Cheers, VIGNERON (talk) 10:50, 10 December 2019 (UTC)[reply]

Wikidata API's action=query list=search seems to ignore P1476[edit]

Hi, all! I'm using Wikidata API (through Wikidata reconciliation service) to check whether an item exists in Wikidata before offering to create a new one in Cita, to avoid creation of duplicates.

The reconciliation service uses Wikidata API's action=wbsearchentitites (which searches labels and aliases) and action=query&list=search (which searches page contents).

However, this last one seems to be ignoring title (P1476), which might be of relevance for items with long titles (where label and title may differ, due to 250-character limit on labels).

Take Manuel de l'amateur de la gravure sur bois et sur métal au XVe siècle (Q106923254) as an example. If I query its label (here), or parts of its full work available at URL (P953) (here), it returns the expected result.

However, if I query parts of its title (P1476) (which are not included in the label; here), it returns an empty results array.

Does anyone know why this may be happening? Thanks! --Diegodlh (talk) 00:04, 1 June 2021 (UTC)[reply]

Proposed update on main page content[edit]

Hi everyone,

We are working on a draft to update the content on the main page, the background of which comes from discussions had at the Wikidata Data Reuse Days 2022. We are doing these updates to ensure that the page is not missing the suggestions that came out of the presentation. Primarily, the changes we intend to make include expanding the section on Data best practices and detailing how to use each of the different access methods. You are welcome to edit the draft page or leave a comment on the draft talk page until May 31. If you have any question please do not hesitate to ask. -Mohammed Sadat (WMDE) (talk) 07:56, 12 May 2022 (UTC)[reply]

Could one request a particular Property from the item?[edit]

Could this interface be extended so one could request a particular property? E.g. if I want a number of employees at WMDE and not the rest of the mountain of information, perhaps I could put:

https://www.wikidata.org/wiki/Special:EntityData/Q8288.json?property=112

I understand JSON will come back, with various complexities like time qualifiers, but it's much less stuff than the whole entity, maybe saving resources or transmission time, and maybe easier to debug at the client end. -- econterms (talk) 18:27, 27 December 2022 (UTC)[reply]

Yes, you can use the new Wikidata:REST API, which does exactly this. Midleading (talk) 15:47, 22 March 2023 (UTC)[reply]

HTTP redirect not working?[edit]

The following request (on a Ubuntu desktop) results in an error:

curl -v -I http://www.wikidata.org/entity/Q42

  • Trying 91.198.174.192:80...
  • Trying 2620:0:862:ed1a::1:80...
  • Immediate connect fail for 2620:0:862:ed1a::1: Network is unreachable

The same result when doing a GET request on https://reqbin.com/ with DE set for server location. When switching the server location to US, it results in the expected behavior and comes back with the data. The same when pasting the url in in my (firefox) browser. I am located in the Netherlands. Any idea what is going here? Ennomeijers (talk) 14:54, 1 March 2023 (UTC)[reply]

Reported this as a bug. Seems to be a technical issue, general advise is to use only HTTPS URIs.
If using HTTPS URIs becomes to default approach then the WD Linked Data access strategy needs to be revised. The WD Linked Data approach is currently completely based on HTTP URIs, see the results of SPARQL queries and the access to linked data described here. Ennomeijers (talk) 09:14, 2 March 2023 (UTC)[reply]

When I search for items in Wikidata, I get an error[edit]

When I search for something using the searchbox, I get an error. The text of the error: "An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later." Is that someone peculiar to me, or is that an error that others get? Trilotat (talk) 04:28, 18 June 2023 (UTC)[reply]

We are looking into it in phab:T339811. Lydia Pintscher (WMDE) (talk) 08:19, 18 June 2023 (UTC)[reply]