-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
182 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+11.4 KB
docs/knowledge-graph/images/google-search-console-copy-paste-the-resource-id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.5 KB
docs/knowledge-graph/images/google-search-console-select-website-or-domain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.43 KB
...aph/images/google-search-console-use-duckduckgo-to-urldecode-url-copy-paste.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.9 KB
...nowledge-graph/images/google-search-console-use-duckduckgo-to-urldecode-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 0 | ||
--- | ||
|
||
# Knowledge Graph | ||
|
||
The Knowledge Graph constitutes the basic representation of the Knowledge Domain for a website or an account. | ||
|
||
There are several way to populate data in a Knowledge Graph. | ||
|
||
In this section you can populate data using URLs by providing a `sitemap.xml` file or manually by using the [Sitemap Import API](./sitemap-import.md). | ||
|
||
Once the web pages have been imported it is possible to populate the Analytics data by using the [Analytics API](./analytics-api.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
sidebar_position: 20 | ||
toc_min_heading_level: 2 | ||
toc_max_heading_level: 5 | ||
--- | ||
|
||
# Sitemap Import API | ||
|
||
It is possible to jumpstart a Knowledge Graph by importing the URLs from a simple sitemap.xml file (i.e. a sitemap with a list of URLs; sitemap.xml with references to other sitemap files isn't yet supported). It is also possible to specify a list of URLs. | ||
|
||
## Import | ||
|
||
You can import web pages by providing a `sitemap.xml`` file or a list of URLs. | ||
|
||
### Import URLs from a sitemap.xml file | ||
|
||
Call the Sitemap import API by specifying the `sitemap.xml` URL in the `sitemap_url` property: | ||
|
||
```sh | ||
curl -X "POST" "https://api.wordlift.io/sitemap-imports" \ | ||
-H 'Authorization: Key <key>' \ | ||
-H 'Content-Type: application/json; charset=utf-8' \ | ||
-d $'{ | ||
"sitemap_url": "https://example.org/sitemap.xml" | ||
}' | ||
``` | ||
|
||
The response is of type [NDJSON](https://ndjson.org/). Each line is a valid JSON with the details about the imported web page. | ||
|
||
### Import URLs by providing them to the request | ||
|
||
Call the Sitemap import API by specifying a list of URLs `urls` property: | ||
|
||
```sh | ||
curl -X "POST" "https://api.wordlift.io/sitemap-imports" \ | ||
-H 'Authorization: Key <key>' \ | ||
-H 'Content-Type: application/json; charset=utf-8' \ | ||
-d $'{ | ||
"urls": [ | ||
"https://example.org/file1.html", | ||
"https://example.org/file2.html", | ||
"https://example.org/file3.html" | ||
] | ||
}' | ||
``` | ||
|
||
The response is of type [NDJSON](https://ndjson.org/). Each line is a valid JSON with the details about the imported web page. | ||
|
||
## Import Analytics data | ||
|
||
To import Analytics data see the [Analytics API](./analytics-api.md) | ||
|
||
## Query the data | ||
|
||
Query the imported data by using the GraphQL endpoint. This is an example GraphQL query: | ||
|
||
```graphql | ||
query { | ||
entities( | ||
page: 0 | ||
rows: 1000 | ||
) { | ||
id: iri | ||
headline: string(name: "schema:headline") | ||
text: string(name: "schema:text") | ||
types: refs(name: "rdf:type") | ||
url: string(name: "schema:url") | ||
seoKeywords: strings(name: "seovoc:seoKeywords") | ||
topThreeMonthsKeywords: topN( | ||
name: "seovoc:seoKeywords" | ||
sort: { field: "seovoc:3MonthsImpressions", direction: DESC } | ||
limit: 3 | ||
) { | ||
name: string(name: "seovoc:name") | ||
impressions: int(name: "seovoc:3MonthsImpressions") | ||
clicks: int(name: "seovoc:3MonthsClicks") | ||
} | ||
source: strings(name: "seovoc:source") | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters