Skip to content

bigfunctions > get_webpage_structured_data

get_webpage_structured_data

Call or Deploy get_webpage_structured_data ?

✅ You can call this get_webpage_structured_data bigfunction directly from your Google Cloud Project (no install required).

  • This get_webpage_structured_data function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions --> Read Getting Started. This is particularly useful if you want to create private functions (for example calling your internal APIs).
  • For any question or difficulties, please read Getting Started.
  • Found a bug? Please raise an issue here

Public BigFunctions Datasets are like:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

get_webpage_structured_data(url)

Description

Get webpage Structured Data that Google shows in search results.

Examples

select bigfunctions.eu.get_webpage_structured_data('https://apps.apple.com/fr/app/nickel-compte-pour-tous/id1119225763')
select bigfunctions.us.get_webpage_structured_data('https://apps.apple.com/fr/app/nickel-compte-pour-tous/id1119225763')
select bigfunctions.europe_west1.get_webpage_structured_data('https://apps.apple.com/fr/app/nickel-compte-pour-tous/id1119225763')
+-----------------+
| structured_data |
+-----------------+
| {...}           |
+-----------------+

screenshot

Use cases

A use case for the get_webpage_structured_data function is SEO analysis and monitoring.

Imagine you have a database of competitor websites or a list of your own web pages. You could use this function within BigQuery to:

  1. Extract structured data at scale: Periodically run a query that iterates through your list of URLs and calls get_webpage_structured_data for each one. This allows you to collect the structured data for a large number of pages efficiently.

  2. Identify missing or incorrect structured data: Analyze the returned JSON for specific schema types (e.g., Product, Article, LocalBusiness) to ensure your competitors or your own pages have correctly implemented structured data markup. This helps identify opportunities to improve search engine visibility.

  3. Track changes in structured data: By running the function regularly, you can monitor changes in structured data implementations over time. This could indicate updates to content, changes in SEO strategy, or technical issues.

  4. Competitive analysis: See what structured data your competitors are using. This can inform your own SEO strategy. For example, if competitors are using a specific schema type that you aren't, it might be worth investigating.

  5. Automated reporting: Build dashboards and reports in BigQuery to visualize structured data trends and identify areas for improvement.

Example Scenario:

Let's say you want to check if your competitors are using the Product schema correctly on their product pages. You have a table called competitor_products with a column product_url. You can use the get_webpage_structured_data function in a query like this:

SELECT
    competitor_products.product_url,
    bigfunctions.us.get_webpage_structured_data(competitor_products.product_url) AS structured_data
FROM
    `your_project.your_dataset.competitor_products`;

This query will return the structured data for each product URL. You can then further process the JSON within BigQuery to check for the presence and correctness of the Product schema, allowing you to identify competitors who are doing a better job with structured data and learn from their implementation.